Variable.num -> NumNode (#2354)

This commit is contained in:
chenyu
2023-11-18 15:45:52 -05:00
committed by GitHub
parent 40246d35bc
commit f02e17a967
8 changed files with 30 additions and 33 deletions

View File

@@ -3,7 +3,7 @@ import unittest
import numpy as np
from tinygrad.helpers import prod, DEBUG
from tinygrad.shape.shapetracker import ShapeTracker, View, get_contraction
from tinygrad.shape.symbolic import Variable
from tinygrad.shape.symbolic import Variable, NumNode
from itertools import product
def shapetracker_getitem(st, val):
@@ -136,7 +136,7 @@ class TestIndexExpressions2d(unittest.TestCase):
shapes = [(30, 5), (15, 10), (15, 1), (5, 10), (5, 1)] # Make sure dim0 is a multiple of 5, one of the tests divides this dimension by 5
offsets = [0, 1, 15, 28, 10000]
self.sts = [ShapeTracker((View.create(base_shape, offset=offset),)) for base_shape in shapes for offset in offsets]
self.offset = [Variable.num(offset) for base_shape in shapes for offset in offsets]
self.offset = [NumNode(offset) for base_shape in shapes for offset in offsets]
self.shapes = [shape for shape in shapes for offset in offsets]
self.node_exprs = []
self.idxs_exprs = []