only use BUFFER_VIEW in disk [pr] (#8629)

* only use BUFFER_VIEW in disk [pr]

* delete can_view

* BUFFER_VIEW op on DISK

* remove that allow_buffer_view=False

* notes

* bitcast is a low-level op too

* this passes on AMD and LLVM
This commit is contained in:
qazal
2025-01-15 12:34:15 -05:00
committed by GitHub
parent bae20e5043
commit a1f70ce7d0
5 changed files with 14 additions and 19 deletions

View File

@@ -1,6 +1,5 @@
import unittest
from tinygrad import Device, Tensor, TinyJit, Variable, dtypes
from tinygrad.helpers import CI
from tinygrad import Tensor, TinyJit, Variable, dtypes
import numpy as np
class TestSetitem(unittest.TestCase):
@@ -139,12 +138,7 @@ class TestSetitem(unittest.TestCase):
def test_setitem_overlapping_inplace1(self):
t = Tensor([[3.0], [2.0], [1.0]]).contiguous()
t[1:] = t[:-1]
if (Device.DEFAULT == "LLVM") or (CI and Device.DEFAULT == "AMD"):
# TODO: FIXME
with self.assertRaises(AssertionError):
self.assertEqual(t.tolist(), [[3.0], [3.0], [2.0]])
else:
self.assertEqual(t.tolist(), [[3.0], [3.0], [2.0]])
self.assertEqual(t.tolist(), [[3.0], [3.0], [2.0]])
def test_setitem_overlapping_inplace2(self):
t = Tensor([[3.0], [2.0], [1.0]]).contiguous()