@@ -371,6 +371,29 @@ jobs:
371
371
- name : Run process replay tests
372
372
uses : ./.github/actions/process-replay
373
373
374
+ testmodels :
375
+ name : Models (llvm+clang+gpu)
376
+ runs-on : ubuntu-22.04
377
+ timeout-minutes : 10
378
+ steps :
379
+ - name : Checkout Code
380
+ uses : actions/checkout@v4
381
+ - name : Setup Environment
382
+ uses : ./.github/actions/setup-tinygrad
383
+ with :
384
+ key : models
385
+ deps : testing
386
+ opencl : ' true'
387
+ llvm : ' true'
388
+ - name : Test models (llvm)
389
+ run : LLVM=1 python -m pytest -n=auto test/models --durations=20
390
+ - name : Test models (gpu)
391
+ run : GPU=1 python -m pytest -n=auto test/models --durations=20
392
+ - name : Test models (clang)
393
+ run : CLANG=1 python -m pytest -n=auto test/models --durations=20
394
+ - name : Run process replay tests
395
+ uses : ./.github/actions/process-replay
396
+
374
397
testdsp :
375
398
name : Linux (DSP)
376
399
runs-on : ubuntu-24.04
@@ -404,8 +427,8 @@ jobs:
404
427
- name : Setup Environment
405
428
uses : ./.github/actions/setup-tinygrad
406
429
with :
407
- key : webgpu
408
- deps : testing
430
+ key : webgpu-minimal
431
+ deps : testing_minimal
409
432
python-version : ' 3.11'
410
433
webgpu : ' true'
411
434
- name : Check Device.DEFAULT (WEBGPU) and print some source
@@ -414,13 +437,12 @@ jobs:
414
437
WEBGPU=1 DEBUG=4 FORWARD_ONLY=1 python3 test/test_ops.py TestOps.test_add
415
438
- name : Run selected webgpu tests
416
439
run : |
417
- WEBGPU=1 python3 -m pytest -n=auto test/ --ignore=test/external --ignore=test/ models --ignore=test/unit \
440
+ WEBGPU=1 python3 -m pytest -n=auto test/ --ignore=test/models --ignore=test/unit \
418
441
--ignore=test/test_copy_speed.py --ignore=test/test_rearrange_einops.py --ignore=test/test_speed_v_torch.py --ignore=test/test_transcendental.py \
419
442
--ignore=test/test_fuzz_shape_ops.py --ignore=test/test_linearizer_failures.py --durations=20
420
443
- name : Run process replay tests
421
444
uses : ./.github/actions/process-replay
422
445
423
-
424
446
tests :
425
447
strategy :
426
448
fail-fast : false
@@ -437,8 +459,8 @@ jobs:
437
459
- name : Setup Environment
438
460
uses : ./.github/actions/setup-tinygrad
439
461
with :
440
- key : ${{ matrix.backend }}
441
- deps : testing ${{matrix.backend=='ptx'&&',cuda'||matrix.backend=='triton'&&',triton'||''}}
462
+ key : ${{ matrix.backend }}-minimal
463
+ deps : testing_minimal ${{matrix.backend=='ptx'&&',cuda'||matrix.backend=='triton'&&',triton'||''}}
442
464
opencl : ${{ matrix.backend == 'gpu' && 'true' }}
443
465
amd : ${{ matrix.backend == 'amd' && 'true' }}
444
466
cuda : ${{ (matrix.backend == 'ptx' || matrix.backend == 'triton' || matrix.backend == 'nv') && 'true' }}
@@ -450,10 +472,10 @@ jobs:
450
472
DEBUG=5 PYTHONPATH=${{ github.workspace }} FORWARD_ONLY=1 python3 test/test_ops.py TestOps.test_add
451
473
- name : Run pytest (not cuda or amd)
452
474
if : matrix.backend!='ptx' && matrix.backend!='triton' && matrix.backend != 'amd' && matrix.backend != 'nv'
453
- run : python -m pytest -n=auto test/ --ignore=test/unit --durations=20
475
+ run : python -m pytest -n=auto test/ --ignore=test/models --ignore=test/ unit --durations=20
454
476
- name : Run pytest (cuda)
455
477
if : matrix.backend=='ptx'||matrix.backend=='triton'||matrix.backend=='nv'
456
- run : python -m pytest -n=auto test/ -k 'not (half or test_efficientnet_safetensors)' --ignore=test/external --ignore=test/ models --ignore=test/unit --ignore test/test_gc.py --durations=20
478
+ run : python -m pytest -n=auto test/ -k 'not (half or test_efficientnet_safetensors)' --ignore=test/models --ignore=test/unit --ignore test/test_gc.py --durations=20
457
479
- name : Run pytest (amd)
458
480
if : matrix.backend=='amd'
459
481
run : python -m pytest -n=auto test/test_ops.py test/test_dtype.py test/test_dtype_alu.py test/test_linearizer.py test/test_randomness.py test/imported/test_indexing.py test/test_hcq.py test/external/external_test_am.py --durations=20
@@ -478,8 +500,11 @@ jobs:
478
500
key : metal2
479
501
deps : testing
480
502
python-version : ' 3.11'
503
+ amd : ' true'
481
504
- name : Run real world test
482
505
run : JIT=2 METAL=1 python -m pytest -n=auto test/models/test_real_world.py --durations=20
506
+ - name : Test models (Metal)
507
+ run : JIT=2 METAL=1 python -m pytest -n=auto test/models --durations=20
483
508
- name : Run ONNX
484
509
run : JIT=2 METAL=1 python -m pytest -n=auto test/external/external_test_onnx_backend.py --durations=20
485
510
- name : Test tensor core ops (fake)
@@ -496,29 +521,13 @@ jobs:
496
521
# run: FUZZ_SCHEDULE=1 FUZZ_SCHEDULE_MAX_PATHS=5 python -m pytest test/models/test_train.py test/models/test_end2end.py
497
522
- name : Run TRANSCENDENTAL math
498
523
run : TRANSCENDENTAL=2 python -m pytest -n=auto test/test_ops.py::TestOps::test_sin test/test_ops.py::TestOps::test_cos test/test_ops.py::TestOps::test_tan test/test_ops.py::TestOps::test_exp test/test_ops.py::TestOps::test_log --durations=20
499
- - name : Run process replay tests
500
- uses : ./.github/actions/process-replay
501
-
502
- testmetal :
503
- name : MacOS (metal)
504
- runs-on : macos-14
505
- timeout-minutes : 10
506
-
507
- steps :
508
- - name : Checkout Code
509
- uses : actions/checkout@v4
510
- - name : Setup Environment
511
- uses : ./.github/actions/setup-tinygrad
512
- with :
513
- key : metal
514
- deps : testing
515
- python-version : ' 3.11'
516
- - name : Check Device.DEFAULT (METAL) and print some source
524
+ - name : Run pytest (amd)
525
+ env :
526
+ MOCKGPU : 1
527
+ AMD : 1
528
+ FORWARD_ONLY : 1
517
529
run : |
518
- METAL=1 python -c "from tinygrad import Device; assert Device.DEFAULT == 'METAL', Device.DEFAULT"
519
- METAL=1 DEBUG=4 FORWARD_ONLY=1 python3 test/test_ops.py TestOps.test_add
520
- - name : Run metal test
521
- run : JIT=2 METAL=1 python -m pytest -n=auto test/ --ignore=test/external --ignore=test/models --ignore=test/unit --durations=20
530
+ python3 -m pytest -n=auto test/test_hcq.py test/test_tiny.py --durations=20
522
531
- name : Run process replay tests
523
532
uses : ./.github/actions/process-replay
524
533
@@ -543,27 +552,12 @@ jobs:
543
552
- name : Run WEBGPU Efficientnet
544
553
run : node test/web/test_webgpu.js
545
554
546
- osxclang :
547
- name : MacOS (clang)
548
- runs-on : macos-15
549
- timeout-minutes : 10
550
- steps :
551
- - name : Checkout Code
552
- uses : actions/checkout@v4
553
- - name : Setup Environment
554
- uses : ./.github/actions/setup-tinygrad
555
- with :
556
- key : macos-clang
557
- deps : testing
558
- - name : Run pytest (clang)
559
- env :
560
- CLANG : 1
561
- run : |
562
- python3 -m pytest -n=auto test/ --ignore=test/unit --durations=20
563
- ! (DEBUG=7 python3 test/test_zero_copy.py 2>&1 || true) | grep -E '^0x.*[^0](x18|w18).*$'
564
-
565
555
osxtests :
566
- name : MacOS (amd+llvm)
556
+ strategy :
557
+ fail-fast : false
558
+ matrix :
559
+ backend : [metal, llvm, clang]
560
+ name : MacOS (${{ matrix.backend }})
567
561
runs-on : macos-15
568
562
timeout-minutes : 10
569
563
steps :
@@ -572,23 +566,19 @@ jobs:
572
566
- name : Setup Environment
573
567
uses : ./.github/actions/setup-tinygrad
574
568
with :
575
- key : macos-other
576
- deps : testing
577
- amd : ' true'
578
- llvm : ' true'
579
- - name : Run pytest (amd)
580
- env :
581
- MOCKGPU : 1
582
- AMD : 1
583
- FORWARD_ONLY : 1
584
- run : |
585
- python3 -m pytest -n=auto test/test_hcq.py test/test_tiny.py --durations=20
586
- - name : Run pytest (llvm)
587
- env :
588
- LLVM : 1
569
+ key : macos-${{ matrix.backend }}-minimal
570
+ deps : testing_minimal
571
+ llvm : ${{ matrix.backend == 'llvm' && 'true' }}
572
+ - name : Set env
573
+ run : printf "${{ matrix.backend == 'llvm' && 'LLVM=1' || matrix.backend == 'clang' && 'CLANG=1' || matrix.backend == 'metal' && 'METAL=1\nJIT=2'}}" >> $GITHUB_ENV
574
+ - name : Check Device.DEFAULT and print some source
589
575
run : |
590
- python3 -m pytest -n=auto test/ --ignore=test/unit --durations=20
591
- ! (DEBUG=7 python3 test/test_zero_copy.py 2>&1 || true) | grep -E '^0x.*[^0](x18|w18).*$'
576
+ python -c "from tinygrad import Device; assert Device.DEFAULT == '${{ matrix.backend }}'.upper(), Device.DEFAULT"
577
+ DEBUG=4 python3 test/test_tiny.py TestTiny.test_plus
578
+ - name : Run pytest (${{ matrix.backend }})
579
+ run : python3 -m pytest -n=auto test/ --ignore=test/models --ignore=test/unit --durations=20
580
+ - name : Run process replay tests
581
+ uses : ./.github/actions/process-replay
592
582
593
583
# ****** Windows Tests ******
594
584
0 commit comments