tinygrad/test
David Friehs 275971e616
fix: align .split, .chunk and .unsqueeze with torch, add fuzz tests (#3505)
this fixes .split where self.shape[dim] is not perfectly divisible by
sizes - .chunk is always the wrong choice here:
 - tensor((5,)).split(4) should result in (tensor((4,)), tensor((1,)))
   was (tensor((3,)), tensor((2,)))

this also fixes issues in .split and .chunk where tensors with
shape[dim]==0 lead to empty tuples/lists when the tensor itself should
have been returned instead

because tinygrad is expected to fail in all cases where torch fails
tinygrad will now be strict regarding sizes having to sum up to passed
dimension in .split, num having to be non-null for .chunk and only
allowing valid dims in .unsqueeze
2024-02-28 17:06:39 -08:00
..
external enable METAL tests now runner is M1 and no fast-math (#3523) 2024-02-28 14:14:23 -05:00
imported fix pad 0 size (#3277) 2024-01-30 08:58:10 -08:00
models Remove Interpreted device & remaining CPU/TORCH ref (#3423) 2024-02-16 00:30:21 -05:00
testextra fix test extra issue (#3159) 2024-01-17 11:58:08 -08:00
unit failed test case for disk tensor assign into dtype int64 (#3527) 2024-02-28 17:52:21 -05:00
web fast path for copy (#2548) 2023-12-01 11:34:47 -08:00
__init__.py All devices are equal! (#196) 2020-12-15 23:44:08 -08:00
Dockerfile Docker fix (#1039) 2023-06-25 10:38:58 -07:00
helpers.py new lazy, benchmark (#2878) 2023-12-20 14:33:21 -08:00
test_assign.py Remove Interpreted device & remaining CPU/TORCH ref (#3423) 2024-02-16 00:30:21 -05:00
test_conv.py add back "CPU" in test_onnx_backend supports_device (#3426) 2024-02-16 00:49:30 -05:00
test_conv_shapetracker.py move create schedule and delete old API (#3377) 2024-02-12 18:10:45 +01:00
test_copy_speed.py remove cpu and torch backends (#3399) 2024-02-15 16:55:39 +01:00
test_custom_function.py move graph.py and jit.py into features (#3376) 2024-02-12 17:34:34 +01:00
test_device_speed.py compiler support (#3260) 2024-01-26 23:36:40 -08:00
test_dtype.py run f64 increased precision tests on remu (#3509) 2024-02-26 18:01:07 -05:00
test_dtype_alu.py enable METAL tests now runner is M1 and no fast-math (#3523) 2024-02-28 14:14:23 -05:00
test_fusion_op.py Remove Interpreted device & remaining CPU/TORCH ref (#3423) 2024-02-16 00:30:21 -05:00
test_fuzz_shape_ops.py fix: align .split, .chunk and .unsqueeze with torch, add fuzz tests (#3505) 2024-02-28 17:06:39 -08:00
test_gc.py fix up eye and fix gc test 2023-02-27 06:53:18 -08:00
test_image_dtype.py move dtypes to dtype.py (#2964) 2024-01-01 14:58:48 -08:00
test_jit.py hotfix: test_jit_copyin 2024-02-15 12:37:53 +01:00
test_kernel_cache.py move the compiler cache to be global (#2957) 2024-01-01 10:59:56 -08:00
test_lazybuffer.py test for the split reduce kernel (#3515) 2024-02-27 21:29:25 -05:00
test_lazyop.py move create schedule and delete old API (#3377) 2024-02-12 18:10:45 +01:00
test_linearizer.py support same uidx in multiple shape positions (#3205) 2024-02-21 19:37:03 +01:00
test_linearizer_failures.py skipIf(not( -> skipUnless( in test_linearizer_failures (#3519) 2024-02-28 13:48:47 -05:00
test_masked_st.py multitensor start (#2676) 2023-12-07 17:07:05 -08:00
test_method_cache.py add test that the compiler isn't used (#3025) 2024-01-05 17:24:01 -08:00
test_multitensor.py support MLB reshaping on-axis for evenly sharded (#3484) 2024-02-23 07:51:36 -05:00
test_net_speed.py Remove pytest markers (#2831) 2023-12-18 18:53:28 -05:00
test_nn.py Remove Interpreted device & remaining CPU/TORCH ref (#3423) 2024-02-16 00:30:21 -05:00
test_ops.py enable METAL tests now runner is M1 and no fast-math (#3523) 2024-02-28 14:14:23 -05:00
test_optim.py remove realize from optimizer (#2880) 2023-12-20 16:42:41 -08:00
test_randomness.py fix Tensor.randint ignoring kwargs (#3350) 2024-02-09 17:12:16 +01:00
test_sample.py enable test_sample for all backend (#2593) 2023-12-03 17:20:27 -05:00
test_schedule.py ops_ext to replace cpu import (#3409) 2024-02-15 13:03:42 +01:00
test_search.py move create schedule and delete old API (#3377) 2024-02-12 18:10:45 +01:00
test_specific_conv.py remove cpu and torch backends (#3399) 2024-02-15 16:55:39 +01:00
test_speed_v_torch.py move graph.py and jit.py into features (#3376) 2024-02-12 17:34:34 +01:00
test_symbolic_jit.py enable symbolic_ops and jits test of two vars (#3513) 2024-02-27 11:17:46 -05:00
test_symbolic_ops.py enable symbolic_ops and jits test of two vars (#3513) 2024-02-27 11:17:46 -05:00
test_symbolic_shapetracker.py unbind view or shapetracker also returns var_val (#3067) 2024-01-09 21:45:05 -05:00
test_tensor.py add back "CPU" in test_onnx_backend supports_device (#3426) 2024-02-16 00:49:30 -05:00
test_tensor_data.py dtype fmt (#3132) 2024-01-15 11:31:54 -08:00
test_to_numpy.py Apply ruff linting rules to tests (#2473) 2023-11-27 21:24:06 -08:00
test_uops.py fix exec_alu(UnaryOps.SQRT, <...>, (0,)) + add test (#3487) 2024-02-23 18:28:00 +01:00
test_uops_stats.py uops flop counter (#3373) 2024-02-20 09:36:30 +01:00
test_winograd.py uops flop counter (#3373) 2024-02-20 09:36:30 +01:00
test_zero_copy.py remove numpy from device (#3123) 2024-01-14 19:36:05 -08:00