tinygrad/test
Ahmed Harmouche 10618aba98
Bring back WebGPU (#7063)
* Start from andredaprato:webgpu-clean

* Fix infs

* inf wgsl function is not needed

* Emulated ulong for threefry, more tests passing

* Randomness tests passing

* Update model export to support new changes in webgpu, efficientnet export works again

* Simplify shift emulation in wgsl

* Delete test file

* Fix bigger than u32 u32 literal

* Why was skip copies added here?

* Python3.12 for webgpu tests

* Fix model export syntax error

* Get test ops passing with some skips

* Fix lint

* Much simpler shift

* Run more tests

* Timestamp queries are not supported in CI, so skip search tests

* All fancy indexing passing

* r is ctx

* Run more dtype tests by using is_dtype_supported

* Cleanup ulong shift rendering

* UPat -> Pat, UOps -> Ops

* Pat -> UPat

* Refactor render_ushift if-else

* Pattern to avoid ulong mul

* Remove vals_dtype

* is_nan trick + rewrite, test_isnan passing

* Rewrite a * select(1, nan, gate) -> select(a, nan, gate)

* No arg, just op

* Support char, uchar, short, ushort

* Run test_index_mnis now that we have uint8

* Fix pyling

* Save 3 lines by using base Compiler

* No more long emulation

* Remove fixup_binops

* No more external_local_bufx wgsl specific cstyle modif, use base extra_pm

* Simpler, faster copyin/out

* Skip some new tests that use long

* Fix typo

* copyout touchup

* Save lines by using render_cast

* WebGL is not supported in core, delete it from is_dtype_supported

* More narrow test skips for some unary tests

* TernaryOps, UnaryOps -> Ops

* TinyGrad supports WebGPU

* StableDiffusion demo: f16tof32 gpu is a lib, update UI

* Packed load/store, no more scale_size, no core tinygrad changes

* Rename copyin, copyout

* Device -> dev

* Fix lint

* Pattern matcher rule for packed load/store

* Refactor

* Shorter packed load/store

* this should fix lint

* Fix mypy

* SD compile script working

* New SD webgpu UI

* New default prompt

* New SD weights

* Fix title when webgpu not available

* Run symbolic tests, simplify is_nan, use round_up

* Show step time on UI

* Bump minimum wgpu version to v0.19

* Fix latent

---------

Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
2024-11-26 12:26:40 +08:00
..
external small changes from block linearizer [pr] (#7888) 2024-11-25 15:27:04 +08:00
imported node cleanup + local metal test speed [pr] (#6880) 2024-10-04 18:14:23 +08:00
models move is_dtype_supported to device [pr] (#7575) 2024-11-07 20:38:03 +08:00
testextra Hook memoryview via class instead of a function (#7627) 2024-11-11 09:07:06 +08:00
unit Revert "move attention upcast (#7830)" (#7903) 2024-11-25 18:59:51 -05:00
web Bring back WebGPU (#7063) 2024-11-26 12:26:40 +08:00
__init__.py All devices are equal! (#196) 2020-12-15 23:44:08 -08:00
Dockerfile new cloud is cloudy [pr] (#7631) 2024-11-11 20:18:04 +08:00
helpers.py move is_dtype_supported to device [pr] (#7575) 2024-11-07 20:38:03 +08:00
test_arange.py Bring back WebGPU (#7063) 2024-11-26 12:26:40 +08:00
test_assign.py Add replicate mode to Tensor.pad (#7608) 2024-11-18 10:55:38 -05:00
test_compile_failures.py enable a few tests that work now (#7721) 2024-11-15 14:30:52 -05:00
test_const_folding.py Remove UnaryOps, BinaryOps, TernaryOps, MetaOps [pr] (#7725) 2024-11-16 20:56:56 +08:00
test_conv.py db in wal mode (#5388) 2024-07-12 20:43:36 -07:00
test_conv_shapetracker.py s/UOps/Ops (#7500) 2024-11-03 11:26:10 +08:00
test_copy_speed.py node cleanup + local metal test speed [pr] (#6880) 2024-10-04 18:14:23 +08:00
test_device_speed.py remove iter from uopgraph (#6110) 2024-08-16 15:58:29 -07:00
test_dtype.py Bring back WebGPU (#7063) 2024-11-26 12:26:40 +08:00
test_dtype_alu.py Bring back WebGPU (#7063) 2024-11-26 12:26:40 +08:00
test_fusion_op.py Ops.VALID cleanup, move recursive tests [pr] (#7713) 2024-11-15 20:22:46 +08:00
test_fuzz_shape_ops.py faster ci [pr] (#7348) 2024-10-29 14:01:44 +08:00
test_gc.py small changes from block linearizer [pr] (#7888) 2024-11-25 15:27:04 +08:00
test_graph.py view doesn't have buffer, fix the tests [pr] (#7841) 2024-11-22 20:41:55 +08:00
test_hcq.py _prg to match _buf [pr] (#7816) 2024-11-21 12:44:48 +08:00
test_image_dtype.py image dtype fusion tests [pr] (#7530) 2024-11-04 22:00:16 +08:00
test_jit.py skip test_jit_batch_split if JIT >= 2 (#7561) 2024-11-05 14:59:04 -05:00
test_kernel_cache.py test_kernel_cache_in_action: fix test (#7792) 2024-11-19 13:34:56 -05:00
test_lazybuffer.py assert view degrade to const tests post scheduler graph_rewrite [pr] (#7822) 2024-11-21 19:00:41 +08:00
test_linearizer.py metal bf16 tc support [pr] (#7408) 2024-11-20 14:39:08 -05:00
test_linearizer_dumb.py Remove UnaryOps, BinaryOps, TernaryOps, MetaOps [pr] (#7725) 2024-11-16 20:56:56 +08:00
test_linearizer_failures.py Remove UnaryOps, BinaryOps, TernaryOps, MetaOps [pr] (#7725) 2024-11-16 20:56:56 +08:00
test_linearizer_overflows.py Remove UnaryOps, BinaryOps, TernaryOps, MetaOps [pr] (#7725) 2024-11-16 20:56:56 +08:00
test_masked_st.py multitensor start (#2676) 2023-12-07 17:07:05 -08:00
test_metal.py METAL raise RuntimeError with no compiler and bad src (#7603) 2024-11-08 17:09:12 -05:00
test_method_cache.py simple LoadOps.ASSIGN (#3745) 2024-03-14 20:44:34 -07:00
test_multitensor.py fix Tensor(MultiLazyBuffer) with different dtype should fail (#7757) 2024-11-17 21:05:45 -05:00
test_net_speed.py nv mockgpu (#4600) 2024-05-15 23:46:08 +03:00
test_nn.py Raise error when model architecture does not match state dict (#7772) 2024-11-20 00:11:54 +08:00
test_ocl.py Fix GPT2 with OpenCL backend. (#6821) 2024-10-01 16:57:22 +08:00
test_ops.py Bring back WebGPU (#7063) 2024-11-26 12:26:40 +08:00
test_optim.py move is_dtype_supported to device [pr] (#7575) 2024-11-07 20:38:03 +08:00
test_pickle.py Revert "s/UPat/Pat (#7506)" [pr] (#7517) 2024-11-03 16:33:02 -05:00
test_profiler.py _prg to match _buf [pr] (#7816) 2024-11-21 12:44:48 +08:00
test_randomness.py add tiny test for randomness + remove ulong buffers (#7648) 2024-11-12 12:45:52 +08:00
test_rearrange_einops.py Missing features from rearrange (#6184) 2024-08-19 11:19:07 -07:00
test_renderer_failures.py BufferSpec and ProgramSpec [pr] (#7814) 2024-11-21 12:18:05 +08:00
test_sample.py UOp.variable (#7010) 2024-10-12 18:20:44 +08:00
test_schedule.py fix uop swizzle on BUFFER, new tests (#7875) 2024-11-24 17:11:09 +08:00
test_search.py Remove UnaryOps, BinaryOps, TernaryOps, MetaOps [pr] (#7725) 2024-11-16 20:56:56 +08:00
test_setitem.py fix advanced setitem with 1 in shape (#7797) 2024-11-19 20:04:59 -05:00
test_specific_conv.py move is_dtype_supported to device [pr] (#7575) 2024-11-07 20:38:03 +08:00
test_speed_v_torch.py fix HALF=1 in test_speed_v_torch (#7642) 2024-11-11 14:29:37 -05:00
test_subbuffer.py move lazy to engine [pr] (#6886) 2024-10-04 23:19:26 +08:00
test_symbolic_jit.py UOp.variable (#7010) 2024-10-12 18:20:44 +08:00
test_symbolic_ops.py UOp.variable (#7010) 2024-10-12 18:20:44 +08:00
test_symbolic_shapetracker.py fix view add with symbolic shape (#7569) 2024-11-06 11:39:20 -05:00
test_tensor.py simpler rand_like (#7680) 2024-11-13 12:28:41 -05:00
test_tensor_data.py [BUGFIX] Tensor([]).data() (#7884) 2024-11-24 16:42:57 -05:00
test_tensor_variable.py combine pad2d with pad (#7677) 2024-11-14 17:56:02 +08:00
test_tiny.py add tiny test for randomness + remove ulong buffers (#7648) 2024-11-12 12:45:52 +08:00
test_to_numpy.py Apply ruff linting rules to tests (#2473) 2023-11-27 21:24:06 -08:00
test_transcendental.py move is_dtype_supported to device [pr] (#7575) 2024-11-07 20:38:03 +08:00
test_uop_graph.py Remove UnaryOps, BinaryOps, TernaryOps, MetaOps [pr] (#7725) 2024-11-16 20:56:56 +08:00
test_uops.py BufferSpec and ProgramSpec [pr] (#7814) 2024-11-21 12:18:05 +08:00
test_uops_stats.py update tests (#7554) 2024-11-05 11:35:15 -05:00
test_viz.py viz with bottom_up=True (#7894) 2024-11-25 17:56:48 +08:00
test_winograd.py fix wino conv output dtype for half inputs (#7829) 2024-11-21 12:13:54 -05:00
test_zero_copy.py remove numpy from device (#3123) 2024-01-14 19:36:05 -08:00