forked from tinygrad/tinygrad
Some new tests (#440)
* Make test run * Added new tests: sub pow constant_sub * Fix indentation * Added one to many lines * Fix indentation * Update test_cl_tiler.py * Delete test_cl_tiler.py
This commit is contained in:
@@ -80,6 +80,22 @@ class TestSpeed(unittest.TestCase):
|
||||
global prefix
|
||||
prefix = " " if prefix is None else ""
|
||||
return super().setUp()
|
||||
|
||||
def test_sub(self):
|
||||
def f(a, b): return a-b
|
||||
helper_test_generic_square('sub', 4096, f, f)
|
||||
|
||||
def test_constant_sub(self):
|
||||
def f(a, b): return 1.0-a
|
||||
helper_test_generic_square('sub', 4096, f, f)
|
||||
|
||||
def test_constant_zero_sub(self):
|
||||
def f(a, b): return 0.0-a
|
||||
helper_test_generic_square('sub', 4096, f, f)
|
||||
|
||||
def test_pow(self):
|
||||
def f(a, b): return a.pow(b)
|
||||
helper_test_generic_square('pow', 2048, f, f)
|
||||
|
||||
def test_sum(self):
|
||||
def f(a, b): return a.sum()
|
||||
|
||||
Reference in New Issue
Block a user