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

Function create_cuda_gpu_on

python/singa/device.py:103–114  ·  view source on GitHub ↗

Create a CudaGPU device on the given device ID. Args: device_id (int): GPU card ID. Returns: a swig converted CudaGPU device.

(device_id)

Source from the content-addressed store, hash-verified

101
102
103def create_cuda_gpu_on(device_id):
104 '''Create a CudaGPU device on the given device ID.
105
106 Args:
107 device_id (int): GPU card ID.
108
109 Returns:
110 a swig converted CudaGPU device.
111 '''
112 assert singa.USE_CUDA, 'SINGA has not been compiled with CUDA enabled.'
113 devices = create_cuda_gpus_on([device_id])
114 return devices[0]
115
116
117def create_opencl_device():

Callers 1

create_cuda_gpuFunction · 0.85

Calls 1

create_cuda_gpus_onFunction · 0.85

Tested by

no test coverage detected