MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / VisibleDeviceCount

Method VisibleDeviceCount

tensorflow/stream_executor/rocm/rocm_platform.cc:93–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91Platform::Id ROCmPlatform::id() const { return rocm::kROCmPlatformId; }
92
93int ROCmPlatform::VisibleDeviceCount() const {
94 // Throw away the result - it logs internally, and this [containing] function
95 // isn't in the path of user control. It's safe to call this > 1x.
96
97 if (!gpu::GpuDriver::Init().ok()) {
98 return -1;
99 }
100
101 return GpuDriver::GetDeviceCount();
102}
103
104const string& ROCmPlatform::Name() const { return name_; }
105

Callers

nothing calls this directly

Calls 2

InitFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected