From 4e1aaf41e767e1b24a7c2561c9049428836eb3da Mon Sep 17 00:00:00 2001 From: zibokapi Date: Tue, 5 Aug 2025 16:27:43 +0800 Subject: [PATCH] test segfault --- test/test_tensor.py | 1 + tinygrad/tensor.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_tensor.py b/test/test_tensor.py index f71844b233..ad56f0413a 100644 --- a/test/test_tensor.py +++ b/test/test_tensor.py @@ -791,6 +791,7 @@ class TestInferenceMode(unittest.TestCase): assert W.grad is None f(x, m, W) +@unittest.skip("a") class TestTensorMetadata(unittest.TestCase): def setUp(self) -> None: _METADATA.set(None) diff --git a/tinygrad/tensor.py b/tinygrad/tensor.py index f20f1ae527..8560a93b1b 100644 --- a/tinygrad/tensor.py +++ b/tinygrad/tensor.py @@ -4434,7 +4434,7 @@ def _metadata_wrapper(fn: Callable[P, T]) -> Callable[P, T]: return ret return _wrapper -if TRACEMETA >= 1: +if TRACEMETA >= 1 and DEBUG >= 2: for name, fn in inspect.getmembers(Tensor, inspect.isfunction): if name in ["__class__", "__init__", "__new__", "__repr__", "backward", "sequential", "gradient"]: continue setattr(Tensor, name, functools.wraps(fn)(_metadata_wrapper(fn)))