mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
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:
parent
aafc29484a
commit
a0af1045bf
1 changed files with 16 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue