MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / reflow_resolve_omp_threads

Function reflow_resolve_omp_threads

csrc/adam/reflow_cpu_adam_impl.cpp:54–58  ·  view source on GitHub ↗

Non-positive thread counts use all cores available to this worker.

Source from the content-addressed store, hash-verified

52
53// Non-positive thread counts use all cores available to this worker.
54static unsigned int reflow_resolve_omp_threads(int num_threads, unsigned int available)
55{
56 if (num_threads > 0) { return std::min(static_cast<unsigned int>(num_threads), available); }
57 return available;
58}
59
60int reflow_create_adam_optimizer(int optimizer_id,
61 float alpha,

Calls

no outgoing calls

Tested by

no test coverage detected