MCPcopy Create free account
hub / github.com/ModalityDance/Omni-R1 / device

Method device

src/transformers/src/transformers/utils/fx.py:656–659  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

654
655 @property
656 def device(self):
657 # Hack so we can track when devices are used. During meta-tensor propagation,
658 # replace these values with a constant 'meta'
659 return MetaDeviceAttribute(self, "device")
660
661 def __len__(self):
662 if hasattr(self, "_metadata") and self._metadata is not None:

Callers 15

testing_utils.pyFile · 0.45
__init__Method · 0.45
_setup_devicesMethod · 0.45
__init__Method · 0.45
device_placementMethod · 0.45
forwardMethod · 0.45
export_pytorchFunction · 0.45

Calls 1

MetaDeviceAttributeClass · 0.85