MCPcopy Create free account
hub / github.com/apache/singa / CreateCudaGPUs

Method CreateCudaGPUs

src/core/device/platform.cc:114–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114const vector<shared_ptr<Device>> Platform::CreateCudaGPUs(
115 const size_t num_devices, size_t init_size) {
116 const vector<int> gpus = GetGPUIDs();
117 CHECK_LE(num_devices, gpus.size());
118 vector<int> use_gpus(gpus.begin(), gpus.begin() + num_devices);
119 return CreateCudaGPUsOn(use_gpus, init_size);
120}
121
122const vector<shared_ptr<Device>> Platform::CreateCudaGPUsOn(
123 const vector<int>& devices, size_t init_size) {

Callers 1

create_cuda_gpusFunction · 0.80

Calls 2

sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected