mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-02-12 07:35:16 -05:00
add symbolic_simple to the scheduler [pr] (#8419)
This commit is contained in:
@@ -10,7 +10,7 @@ from typing import List, Optional, Union, cast
|
||||
|
||||
from tinygrad import nn, dtypes, Device, Tensor
|
||||
from tinygrad.device import is_dtype_supported
|
||||
from tinygrad.dtype import DType
|
||||
from tinygrad.dtype import DType, ImageDType
|
||||
from tinygrad.shape.shapetracker import ShapeTracker
|
||||
from tinygrad.shape.view import View
|
||||
from tinygrad.ops import PatternMatcher, UOp, Ops, UPat, graph_rewrite, track_rewrites, view_supported_devices, symbolic
|
||||
@@ -1405,8 +1405,11 @@ class TestSchedule(unittest.TestCase):
|
||||
x = Tensor.randn((9, 9)).realize()
|
||||
y = Tensor.randn((9, 9)).realize()
|
||||
out = x@y
|
||||
run_schedule(check_schedule(out, 4))
|
||||
run_schedule(check_schedule(out, 3))
|
||||
np.testing.assert_allclose(out.numpy(), x.numpy()@y.numpy(), atol=1e-4, rtol=1e-4)
|
||||
self.assertIsInstance(out.dtype, ImageDType)
|
||||
self.assertIsNotNone(out.lazydata.base.realized)
|
||||
self.assertIsInstance(out.lazydata.base.realized.dtype, ImageDType)
|
||||
|
||||
def _test_fusion(self, shapes, f, cnt):
|
||||
with Context(DEBUG=0, TRACK_MATCH_STATS=0): args = [Tensor.randn(s).realize() for s in shapes]
|
||||
|
||||
Reference in New Issue
Block a user