simpler TinyJit inside TinyJit detection (#5219)

* simpler TinyJit inside TinyJit detection

suggested in 73395b998b (commitcomment-143660402)

* cannot repro...

* clear the way out

* finally clear
This commit is contained in:
chenyu
2024-07-03 12:28:53 -04:00
committed by GitHub
parent 04ef0fd328
commit 622b7bd556
2 changed files with 10 additions and 7 deletions

View File

@@ -392,6 +392,8 @@ class TestJitInsideJit(unittest.TestCase):
@TinyJit
def g(t): return f(t) * 3
# NOTE: first does not raise
g(Tensor([1])).realize()
with self.assertRaisesRegex(RuntimeError, "having TinyJit inside another TinyJit is not supported"):
g(Tensor([1])).realize()