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

Function _IsGPUBlob

caffe2/python/data_parallel_model.py:1631–1640  ·  view source on GitHub ↗
(model, blob_name)

Source from the content-addressed store, hash-verified

1629 return model._blob_to_device[blob_name].device_type == caffe2_pb2.IDEEP
1630
1631def _IsGPUBlob(model, blob_name):
1632 if blob_name in model._blob_to_device:
1633 return core.IsGPUDeviceType(model._blob_to_device[blob_name].device_type)
1634 else:
1635 blob_name = "{}_{}/{}".format(
1636 model._device_prefix, model._devices[0], blob_name
1637 )
1638 if blob_name not in model._blob_to_device:
1639 return core.IsGPUDeviceType(model._device_type)
1640 return core.IsGPUDeviceType(model._blob_to_device[blob_name].device_type)
1641
1642
1643def _GroupByDevice(model, devices, params, non_data_params):

Callers 3

_BroadcastFunction · 0.85

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…