struct gpr::linalg::ThreadBudget

CPU threads a provider may use on one rank. workers run independent tasks (tiles, kernel blocks); each may open a nested BLAS team of nested_blas threads. The provider spends workers * nested_blas threads at most; callers hand over a budget within the rank’s CPU share.

#include <gpr/linalg/BackendInterface.h>
 
struct ThreadBudget {
    // fields
 
    int workers = 1;
    int nested_blas = 1;
 
    // methods
 
    int total() const;
    bool fits(int cpu_share) const;
};