MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / convert

Method convert

python/oneflow/nn/modules/module.py:1576–1577  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

1574 self._to_memory_format(memory_format)
1575
1576 def convert(t):
1577 return t.to(device, dtype if t.is_floating_point() else None)
1578
1579 return self._apply(convert)
1580

Callers

nothing calls this directly

Calls 4

to_localMethod · 0.80
toMethod · 0.45
is_floating_pointMethod · 0.45
to_globalMethod · 0.45

Tested by

no test coverage detected