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

Method getDeviceImpl

caffe2/python/docs/generator.py:102–109  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

100 self.base_op_name, self.engine = name.split("_ENGINE_", 1)
101
102 def getDeviceImpl(self):
103 deviceImplList = []
104 for device, impl in [('CPU', OpSchema.get_cpu_impl(self.op_name)),
105 ('CUDA', OpSchema.get_cuda_impl(self.op_name))]:
106 if not impl:
107 continue
108 deviceImplList.append((device, impl))
109 return deviceImplList
110
111 def generateDoc(self, formatter):
112 for device, impl in self.getDeviceImpl():

Callers 2

generateDocMethod · 0.95
generateDocMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected