Closed schlichtanders closed 4 months ago
We now have Dagger.all_processors()
and Dagger.compatible_processors(scope::Dagger.AbstractScope)
for getting the set of processors, and so we could implement a Dagger.num_processors()
that does what you ask. I would avoid overloading nprocs
, since Distributed exports that as well (and we use it in Dagger internally).
I saw that
shard
is able to compute the number of processors, optionally also including threads.https://github.com/JuliaParallel/Dagger.jl/blob/cec17a14f75523bdcae3a6b00ede6c22d1d0fe9f/src/chunks.jl#L176-L198
It would be great if this could be available via an API like
Dagger.nprocs