MCPcopy Create free account
hub / github.com/CompVis/diff2flow / get_module_device

Function get_module_device

diff2flow/ema.py:17–18  ·  view source on GitHub ↗
(m: Module)

Source from the content-addressed store, hash-verified

15 return val is not None
16
17def get_module_device(m: Module):
18 return next(m.parameters()).device
19
20def inplace_copy(src: Tensor, tgt: Tensor, *, auto_move_device = False):
21 if auto_move_device:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected