MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / CudaGetDeviceCount

Function CudaGetDeviceCount

oneflow/api/python/env/env.h:52–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50inline Maybe<size_t> GetNodeSize() { return GlobalProcessCtx::NodeSize(); }
51inline Maybe<size_t> GetLocalRank() { return GlobalProcessCtx::LocalRank(); }
52inline Maybe<size_t> CudaGetDeviceCount() {
53 return Singleton<ep::DeviceManagerRegistry>::Get()->GetDeviceCount(DeviceType::kCUDA);
54}
55
56inline Maybe<void> SetFLAGS_alsologtostderr(bool flag) {
57 FLAGS_alsologtostderr = flag;

Callers

nothing calls this directly

Calls 2

GetFunction · 0.85
GetDeviceCountMethod · 0.45

Tested by

no test coverage detected