From 42748ccb922c7ea073e4473fae20d2b7f984f44c Mon Sep 17 00:00:00 2001 From: b1tg <33436708+b1tg@users.noreply.github.com> Date: Wed, 1 Oct 2025 14:33:47 +0800 Subject: [PATCH] rangeify: fix test_prequant_conv2d_1x1 (#12391) --- test/test_quantize_onnx.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/test_quantize_onnx.py b/test/test_quantize_onnx.py index b15cdf12ce..005d978902 100644 --- a/test/test_quantize_onnx.py +++ b/test/test_quantize_onnx.py @@ -3,7 +3,6 @@ import numpy as np import unittest from dataclasses import replace from tinygrad import Tensor, Context, Device, dtypes -from tinygrad.helpers import RANGEIFY from tinygrad.uop.ops import Ops from tinygrad.codegen.opt import Opt, OptOps from tinygrad.engine.realize import CompiledRunner, ExecItem, lower_schedule_item, get_program @@ -94,8 +93,7 @@ class TestQuantizeOnnx(unittest.TestCase): X = Tensor(np.random.uniform(0, 255, size=(1, 32, 128, 128)).astype(np.uint8)) W = Tensor(np.random.uniform(0, 255, size=(64, 32, 1, 1)).astype(np.uint8)) out = X.conv2d(W, dtype=X.dtype) - # rangeify merges axis in a different order - opts = [Opt(op=OptOps.UPCAST, axis=0 if RANGEIFY else 1, arg=128), Opt(op=OptOps.UNROLL, axis=0, arg=4)] + opts = [Opt(op=OptOps.UPCAST, axis=1, arg=128), Opt(op=OptOps.UNROLL, axis=0, arg=4)] sexec(out, opts) def test_prequant_gemm(self):