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

Method VisibleDeviceCount

tensorflow/stream_executor/cuda/cuda_platform.cc:146–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146int CudaPlatform::VisibleDeviceCount() const {
147 // Throw away the result - it logs internally, and this [containing] function
148 // isn't in the path of user control. It's safe to call this > 1x.
149 if (!gpu::GpuDriver::Init().ok()) {
150 return -1;
151 }
152
153 return GpuDriver::GetDeviceCount();
154}
155
156const string& CudaPlatform::Name() const { return name_; }
157

Callers

nothing calls this directly

Calls 2

InitFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected