fix: list the pool's own worker cores for the start-up line and --aux-cpus under the NUMA split
This commit is contained in:
1 parent
5b8cdaf2d9
commit
2614b82c9a
2 files changed
+8
-5
No files matched your search
@@ -5835,9 +5835,11 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
{ // where the threads run (--host-core)
|
||||
const strata::kernels::cpu::CpuTopology ht = strata::kernels::cpu::detect_cpu_topology(true, o.pool_affinity);
|
||||
// the pool's own order, not a fresh detection's: STRATA_NUMA_SPLIT interleaves the sockets
|
||||
const std::vector<int>& wc = pool.worker_cores();
|
||||
std::string on;
|
||||
for (int i = 0; i < pool.workers() && i < (int) ht.worker_cores.size(); ++i)
|
||||
on += (i > 0 ? "," : "") + std::to_string(ht.worker_cores[(size_t) i]);
|
||||
for (int i = 0; i < pool.workers() && i < (int) wc.size(); ++i)
|
||||
on += (i > 0 ? "," : "") + std::to_string(wc[(size_t) i]);
|
||||
std::fprintf(stderr, "strata generate: %d pool workers on logical processors %s, the host thread on %d%s "
|
||||
"(--host-core %s)\n", pool.workers(), on.c_str(), ht.host_core,
|
||||
pool.host_works() ? " (draining too)" : "",
|
||||
@@ -5846,10 +5848,9 @@ int main(int argc, char** argv) {
|
||||
: "first");
|
||||
// --aux-cpus: the plan, now the workers' CPUs are known; the threads that exist already (the CUDA driver's) move
|
||||
// now when it is on, the ones created later pin themselves (strata/platform/aux_cpus.hpp)
|
||||
const size_t nw = std::min<size_t>((size_t) pool.workers(), ht.worker_cores.size());
|
||||
const size_t nw = std::min<size_t>((size_t) pool.workers(), wc.size());
|
||||
std::fprintf(stderr, "%s\n",
|
||||
strata::aux_cpus::set_topology(ht.host_core, std::vector<int>(ht.worker_cores.begin(),
|
||||
ht.worker_cores.begin() + (long) nw)).c_str());
|
||||
strata::aux_cpus::set_topology(ht.host_core, std::vector<int>(wc.begin(), wc.begin() + (long) nw)).c_str());
|
||||
}
|
||||
if (o.no_ple_prefetch) strata::kernels::ple_prefetch_enable(false);
|
||||
// ---- R4's slot storage. Allocated AFTER the weights and the session, so `cudaMemGetInfo` inside `open`
|
||||
|
||||
Reference in new issue
Block a user