From 0dedf4063c96928e48c8569f2a4116ba07be41d1 Mon Sep 17 00:00:00 2001 From: chenyu Date: Mon, 9 Feb 2026 20:40:29 -0500 Subject: [PATCH] minor test_setitem cleanup (#14654) --- test/test_setitem.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/test_setitem.py b/test/test_setitem.py index 1f6cdc02d6..6173ad0c9f 100644 --- a/test/test_setitem.py +++ b/test/test_setitem.py @@ -1,8 +1,6 @@ -import unittest -import random -from os import getenv +import unittest, random from tinygrad import Tensor, TinyJit, Variable, dtypes, Device -from tinygrad.helpers import Context +from tinygrad.helpers import Context, getenv import numpy as np class TestSetitem(unittest.TestCase): @@ -113,8 +111,6 @@ class TestSetitem(unittest.TestCase): def test_setitem_consecutive_inplace_operator(self): t = Tensor.arange(4).reshape(2, 2).contiguous() t[1] += 2 - t = t.contiguous() - # TODO: RuntimeError: can't double realize in one schedule t[1] -= 1 np.testing.assert_allclose(t.numpy(), [[0, 1], [3, 4]]) @@ -186,7 +182,7 @@ class TestSetitem(unittest.TestCase): t[:-1] = t[1:] self.assertEqual(t.tolist(), [[2.0], [1.0], [1.0]]) - # TODO: WEBGPU pipeline validation error + # TODO: WEBGPU pipeline validation error. this generates (1==gidx0)|(2==gidx0)|(3==gidx0)|(4==gidx0)|(5==gidx0) ... @unittest.skipIf(Device.DEFAULT == "WEBGPU", "WEBGPU pipeline validation error") def test_setitem_big(self): idx_size, val = 256, 4