MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / __copy__

Method __copy__

deepspeed/linear/quantization.py:107–111  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

105 return new_instance
106
107 def __copy__(self):
108 new_instance = type(self).__new__(type(self))
109 state = self.__getstate__()
110 new_instance.__setstate__(state)
111 return new_instance
112
113 def cuda(self, device=None, non_blocking=False):
114 device = "cuda" if device is None else device

Callers

nothing calls this directly

Calls 3

__getstate__Method · 0.95
__new__Method · 0.45
__setstate__Method · 0.45

Tested by

no test coverage detected