tinygrad/test
Christopher Milan 0aabc1e938
Mesa NIR backend (NAK/LLVMpipe) (#12089)
* nak works

* TestOps::test_add works

* testop has no crashes

* fix bool casts

* fix typo

* add disassemble

* RANGE and locals/regs

* simplify NAKCompiler

* disass cleanup

* cleanup nir codegen

* almost all tests passing

* cleanup notes in extra/

* old notes

* only import nak if NIR=1

* fix new SPECIAL syntax

* fix local/shared memory

* more tests passing

* add DEFINE_VAR support

* llvmpipe kinda works

* diskcache

* some mypy stuff

* lvp passing test_ops.py

* fix imports

* actually fix imports

* remove 'stdout'

* fix llvm import

* fix mypy issues

* nicer errors

* simpler test_dtype skips

* test lvp in CI

* fix github action syntax

* fix more actions typos

* switch to mesa 25.1.0

* diskcache_put

* better generation for lvp nir_options

* b64encode shader blobs

* Revert diskcache changes

This reverts commits 930fa3de8a and 8428c694b3.

* general cleanup

* better error messages

* fix llvm import

* fix windows tests

* link with libm and libgcc_s

* fix some errors

* dont check for 'float4'

* NIR uses pointer arithmetic

* use tinymesa

* bump tinymesa

* bump tinymesa again

* update lvp nir_options

* print nir shader with DEBUG

* simplify LVPCompiler

* more tests

* "gated" STORE

* NAK is cacheable

* more tests

* all tests pass locally for NAK

* test autogen in CI

* autogen deps

* more deps

* fix uop_gc

* fix macos

* mypy

* save 2 lines

* save two more lines

* save 1 line

* save 4 lines

* save more lines

* Revert "save more lines"

This reverts commit dd3a720c5a.

* save more lines

* fix LVP on windows

* refactor

* reorganize some code

* refactor lib_gpu

* move LVP check

* out of order loads

* remove support.mesa

* bump tinymesa version

* simplify LVP jit

* macos

* macos ci

* shell: bash

* testing

* more testing

* compute brew prefix

* stupid typo

* actually fix

* lib

* stdout on macos

* inline gallivm_compile_module

* Revert "inline gallivm_compile_module"

This reverts commit b65983b151.

* elf macos

* semicolon

* inherit from CPULLVMCompiler

* ruff

* disas test

* fix libm linking

* default is fine actually

* arm works

* add elf loader link test

* fix NAK beam

* pylint is too smart by half

---------

Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
Co-authored-by: nimlgen <138685161+nimlgen@users.noreply.github.com>
2025-10-15 17:38:33 +08:00
..
device Support bfloat16 on NULL backend (#12340) 2025-09-30 00:02:30 -04:00
external fix up some slow tests that launch python (#12672) 2025-10-14 19:13:55 +08:00
mockgpu fix ruff 0.14.0 [pr] (#12547) 2025-10-09 01:52:30 -04:00
models fast RANGEIFY (#12504) 2025-10-08 19:38:06 +08:00
opt update padto opts tests (#12679) 2025-10-14 17:00:42 -04:00
speed ops_gpu -> ops_cl (#12103) 2025-09-10 15:15:48 -04:00
testextra break swizzle into three chunks [pr] (#11153) 2025-07-09 15:30:34 -07:00
unit Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
web time viz (#10763) 2025-06-17 19:39:34 +03: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 remove trivial use of RANGEIFY flag (#12550) 2025-10-09 02:29:38 -04:00
test_arange.py remove trivial use of RANGEIFY flag (#12550) 2025-10-09 02:29:38 -04:00
test_assign.py remove assign contiguous hack (#12659) 2025-10-14 16:42:14 +08:00
test_compile_failures.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_const_folding.py clean up more RANGEIFY flag (#12556) 2025-10-09 03:06:48 -04:00
test_dtype.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_dtype_alu.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_edgecases.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_fusion_op.py just schedule in test_recursive_pad [pr] (#8860) 2025-02-02 15:01:24 +02:00
test_gc.py s/lb_refcount/uop_refcount [pr] (#10865) 2025-06-18 21:48:04 +03:00
test_graph.py hcq: cpu can be graphed (#11474) 2025-08-02 21:01:19 +03:00
test_image_dtype.py clean up more RANGEIFY flag (#12556) 2025-10-09 03:06:48 -04:00
test_interop.py hotfix: interop example (#9237) 2025-02-25 10:32:00 +03:00
test_jit.py remove RANGEIFY flag [pr] (#12577) 2025-10-09 21:52:54 -04:00
test_jit_cases.py enumerate cases of Tensors in the JIT (#10548) 2025-05-28 11:51:27 -07:00
test_kernel_cache.py make method_cache account for compiler (#12156) 2025-09-13 17:00:11 +03:00
test_linearizer.py drop unused invalid conditions (#12635) 2025-10-13 10:52:21 +02:00
test_linearizer_dumb.py remove Ops.VIEW and related UOp methods (#12522) 2025-10-08 14:47:02 +03:00
test_linearizer_failures.py split ranges (#12411) 2025-10-02 12:57:22 +08:00
test_memory_planner.py memplan: fix large buffers planning (#11878) 2025-08-27 23:54:27 +03:00
test_method_cache.py make method_cache account for compiler (#12156) 2025-09-13 17:00:11 +03:00
test_multitensor.py use UOp.shape property instead of UOp.st (#12664) 2025-10-15 10:01:34 +08:00
test_nn.py remove FUSE_ARANGE (#12511) 2025-10-08 04:54:07 -04:00
test_ops.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_opt_gemm.py delete more tests (#12043) 2025-09-05 15:31:30 -07:00
test_optim.py fast RANGEIFY (#12504) 2025-10-08 19:38:06 +08:00
test_opts.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_outerworld.py TestOuterworldReduce works (#12608) 2025-10-10 20:06:41 +08:00
test_outerworld_range.py remove dtype from range, it will be dtypes.index soon [pr] (#11914) 2025-08-29 09:52:07 -07:00
test_pickle.py rangeify: update test_pickle asserts (#12366) 2025-09-30 13:27:41 +03:00
test_profiler.py remove PROFILE=1 option, it's just VIZ=1 [pr] (#12176) 2025-09-15 12:51:50 +03:00
test_quantize_onnx.py move frontend dir to nn [pr] (#12470) 2025-10-07 10:42:22 +08:00
test_randomness.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_rangeify.py outerworld uses expand (#12578) 2025-10-10 10:25:25 +08:00
test_remote.py skip more multi remote tests (#12410) 2025-10-02 04:50:46 +03:00
test_renderer_failures.py Move Ops.SPECIAL arg to src (#11918) 2025-09-04 09:31:44 +02:00
test_schedule.py improve typing (#12611) 2025-10-11 16:20:23 +08:00
test_setitem.py Add test for 2D tensor indexing in setitem (#12193) 2025-09-16 14:57:25 -04:00
test_softmax_fusion.py clean up more RANGEIFY flag (#12556) 2025-10-09 03:06:48 -04:00
test_stunning.py remove FUSE_ARANGE (#12511) 2025-10-08 04:54:07 -04:00
test_subbuffer.py redundant code (#11014) 2025-06-29 09:06:10 -07:00
test_symbolic_jit.py remove trivial use of RANGEIFY flag (#12550) 2025-10-09 02:29:38 -04:00
test_symbolic_ops.py Shrink instead of reshape to unregister symbolic (#12241) 2025-09-19 06:04:35 +02:00
test_tensor.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_tensor_uop.py update tests that depend on SPLIT_REDUCEOP (#12534) 2025-10-08 21:53:30 -04:00
test_tensor_variable.py Shrink instead of reshape to unregister symbolic (#12241) 2025-09-19 06:04:35 +02:00
test_tiny.py remove pylint from pre-commit and CI (#12658) 2025-10-14 15:39:59 +08:00
test_to_numpy.py Apply ruff linting rules to tests (#2473) 2023-11-27 21:24:06 -08:00
test_transcendental.py Mesa NIR backend (NAK/LLVMpipe) (#12089) 2025-10-15 17:38:33 +08:00
test_uop_graph.py post index symbolic (#12446) 2025-10-03 23:23:03 +02:00
test_uops.py remove Ops.VIEW and related UOp methods (#12522) 2025-10-08 14:47:02 +03:00
test_uops_stats.py remove trivial use of RANGEIFY flag (#12550) 2025-10-09 02:29:38 -04:00
test_zero_copy.py unify cpu and llvm (#11982) 2025-09-09 13:54:44 +03:00