Fix wrong weight reference in dynamic EPLB (#6818)
This commit is contained in:
@@ -2257,3 +2257,16 @@ except:
|
||||
|
||||
def cpu_has_amx_support():
|
||||
return torch._C._cpu._is_amx_tile_supported() and is_intel_amx_backend_available
|
||||
|
||||
|
||||
class LazyValue:
|
||||
def __init__(self, creator: Callable):
|
||||
self._creator = creator
|
||||
self._value = None
|
||||
|
||||
@property
|
||||
def value(self):
|
||||
if self._creator is not None:
|
||||
self._value = self._creator()
|
||||
self._creator = None
|
||||
return self._value
|
||||
|
||||
Reference in New Issue
Block a user