Skip to content

Implement Multi-threading in FairGBM logic #6

@AndreFCruz

Description

@AndreFCruz

Summary

Several CPU-bound FairGBM functions are currently single threaded.

TODO:

  • Test if everything works correctly when using the following directive on (most) loops over the data: #pragma omp parallel for schedule(static)
    • The loop at ConstrainedObjectiveFunction::GetConstraintGradientsWRTModelOutput should be the focus, as it is where most CPU time is spent;
    • AFAIK the loop seems to be parallelizable: no variables seem to be changed in the same location (arrays are changed but always at the position of the given row index, therefore no race conditions should occur);
    • If not, adapt the loop such that each thread does not alter variables in common (or use locks when it's impossible to separate the logic);

Metadata

Metadata

Assignees

No one assigned

    Labels

    XS effortT-shirt effort weighing: XSenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions