MCPcopy Create free account
hub / github.com/pytorch/pytorch / get_device_option

Function get_device_option

caffe2/python/onnx/backend.py:45–48  ·  view source on GitHub ↗
(device)

Source from the content-addressed store, hash-verified

43 return s
44
45def get_device_option(device):
46 m = {DeviceType.CPU: caffe2_pb2.CPU,
47 DeviceType.CUDA: workspace.GpuDeviceType}
48 return core.DeviceOption(m[device.type], device.device_id)
49
50
51class OnnxAttributes(dict):

Callers 3

run_nodeMethod · 0.85
prepareMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…