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

Function format_device_option

caffe2/python/net_printer.py:271–277  ·  view source on GitHub ↗
(dev_opt)

Source from the content-addressed store, hash-verified

269
270
271def format_device_option(dev_opt):
272 if not dev_opt or not (
273 dev_opt.device_type or dev_opt.device_id or dev_opt.node_name):
274 return None
275 return call(
276 'DeviceOption',
277 [dev_opt.device_type, dev_opt.device_id, "'%s'" % dev_opt.node_name])
278
279
280@Printer.register(OperatorDef)

Callers 1

print_opFunction · 0.85

Calls 1

callFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…