From dafdb4bfb158d4b949cbef4adfb3a9154442e755 Mon Sep 17 00:00:00 2001 From: nimlgen <138685161+nimlgen@users.noreply.github.com> Date: Thu, 6 Nov 2025 20:09:51 +0800 Subject: [PATCH] test hcq open with pytest (#13124) * test hcq open with pytest * fi --- test/external/external_test_hcq_open.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/external/external_test_hcq_open.py diff --git a/test/external/external_test_hcq_open.py b/test/external/external_test_hcq_open.py new file mode 100644 index 0000000000..0b0f073f13 --- /dev/null +++ b/test/external/external_test_hcq_open.py @@ -0,0 +1,20 @@ +import os +if "DEV" not in os.environ: os.environ["DEV"] = "AMD" + +import unittest, time +from tinygrad import Device + +class TestOpen(unittest.TestCase): + def generate_test_open(n): + def test(self): + dev = Device[Device.DEFAULT] + for i in range(10): + dev.allocator.alloc(10 << 20) + time.sleep(0.5) + test.__name__ = f'test_open_{n}' + return test + + for i in range(64): locals()[f'test_open_{i}'] = generate_test_open(i) + +if __name__ == '__main__': + unittest.main()