use Tensor.replace [pr] (#8455)

This commit is contained in:
George Hotz
2024-12-30 23:20:46 -05:00
committed by GitHub
parent 19a54ae0b4
commit e276b6eecd
3 changed files with 5 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ from tinygrad.runtime.ops_python import PythonProgram, PythonRenderer, PythonCom
def derandomize_model(model):
for p in get_parameters(model):
p.lazydata = Tensor.empty(p.shape, device=p.device, dtype=p.dtype).lazydata
p.replace(Tensor.empty(p.shape, device=p.device, dtype=p.dtype))
p.realize()
def assert_jit_cache_len(fxn, expected_len):