Simple CUDA Runtime (#480)

* factor out opencl runtime

* don't use CL outside the runtime

* cuda runtime adds

* final_dimension

* tests pass with CUDA backend

* more cuda

* cuda simpler

* retain old functionality

* linter and typing

* move globalcounters out of runtimes

* oops, GlobalCounters in cuda

* MAX_OUTPUT_SHAPE=3 is fine for CUDA
This commit is contained in:
George Hotz
2023-01-27 16:26:24 -08:00
committed by GitHub
parent 6d5e1a8029
commit bd8a5c2ced
5 changed files with 137 additions and 100 deletions
+2
View File
@@ -54,6 +54,8 @@ class TestOps(unittest.TestCase):
def test_add(self):
helper_test_op([(45,65), (45,65)], lambda x,y: x+y, Tensor.add)
def test_add_simple(self):
helper_test_op([(256), (256)], lambda x,y: x+y, Tensor.add, forward_only=True)
def test_broadcasted_add(self):
helper_test_op([(45,65), (45,1)], lambda x,y: x+y, lambda x,y: x+y)
def test_broadcasted_add_2(self):