Commit Graph

5859 Commits

Author SHA1 Message Date
qazal
cf64f8bb40 start with the UOps.VALID spec [run_process_replay] (#6435)
* document UOps.VALID [run_process_replay]

* now the assert
2024-09-10 08:00:19 +08:00
Tim Becker
58a1b4f427 Faster UOp hashing (#6447)
* Faster hashing of Enums and UOp

* NOp should not define __eq__

---------

Co-authored-by: George Hotz <72895+geohot@users.noreply.github.com>
2024-09-10 07:16:04 +08:00
George Hotz
92e4126793 Revert "Revert "RewriteContext [run_process_replay] (#6428)" (#6438)" (#6443)
This reverts commit e7dd08448f.
2024-09-10 07:00:26 +08:00
George Hotz
904f6a63fa Revert "Revert "cleanup process_replay/* namings [run_process_replay] (#6429)…" (#6442)
This reverts commit eda177da84.
2024-09-10 07:00:16 +08:00
nimlgen
8d3450ceab qcom remove unused commands (#6445)
* qcom remove unused commands

* linetr
2024-09-09 20:26:07 +03:00
nimlgen
f63a9fd649 hcq _cur_cmd_idx for readability (#6444)
* hcq _cur_cmd_idx for readability

* linter
2024-09-09 20:04:45 +03:00
George Hotz
dbd4536167 Revert "add UOps.VALID (#6387)" (#6441)
This reverts commit 8186e4e7d6.
2024-09-09 21:33:00 +08:00
George Hotz
e7dd08448f Revert "RewriteContext [run_process_replay] (#6428)" (#6438)
This reverts commit e1d61b048b.
2024-09-09 18:53:18 +08:00
George Hotz
eda177da84 Revert "cleanup process_replay/* namings [run_process_replay] (#6429)" (#6437)
This reverts commit f4e83b30b4.
2024-09-09 18:52:36 +08:00
George Hotz
d5bd38c278 add min max rule for expand [run_process_replay] (#6434) 2024-09-09 18:30:20 +08:00
George Hotz
42e5c8335e remove args from min/max [run_process_replay] (#6430)
* remove args from min/max [run_process_replay]

* it's a ConstType

* sconst_like unused

* any const is fine
2024-09-09 18:18:20 +08:00
qazal
f4e83b30b4 cleanup process_replay/* namings [run_process_replay] (#6429) 2024-09-09 16:59:04 +08:00
George Hotz
8186e4e7d6 add UOps.VALID (#6387)
* uops valid

* broke full_shape

* fixup that st (hardcoded asts still red)

* fixup DEFINE_VAR

debug

more debug

* start moving stuff to ast_const

* move test_linearizer

* move test_linearizer_failures to ast_const

* fixup test_schedule

* small diff change

* regenerate dataset

* fixup test_multitensor

* regen dataset try 2

---------

Co-authored-by: qazal <qazal.software@gmail.com>
2024-09-09 16:58:43 +08:00
George Hotz
e1d61b048b RewriteContext [run_process_replay] (#6428) 2024-09-09 16:49:02 +08:00
qazal
935b6b658f delete seen from the scheduler api [run_process_replay] (#6427)
docs
2024-09-09 16:26:34 +08:00
George Hotz
6c7abd18df non-optional bounds (faster) [run_process_replay] (#6425)
* non-optional bounds (faster) [run_process_replay]

* pre-fetch min/max

* Revert "pre-fetch min/max"

This reverts commit cdd71840c5.
2024-09-09 16:00:16 +08:00
qazal
c5bae55ec8 new generate_dataset.sh (#6423)
* new generate_dataset.sh

* keep those there

* test: rm expected failures

* rename to extract
2024-09-09 15:13:07 +08:00
chenyu
1941e66cc9 real strides with uops (#6365)
* real strides with uops [run_process_replay]

* compare with old

* Revert "compare with old"

This reverts commit f53a8d4276.

* make those @unittest.expectedFailure
2024-09-09 03:06:27 -04:00
chenyu
ac98f5056e move lt-folding to a function [run_process_replay] (#6422)
and added more tests (some failed to match symbolic)
2024-09-09 02:04:52 -04:00
qazal
ff8a9ac3c1 test new style gated store rendering (#6413)
* test new style gated store rendering

* switch to lidx

* make lidx optional

* fixup [run_process_replay]
2024-09-09 13:59:22 +08:00
George Hotz
90fb17304f put rewrite back in ops [run_process_replay] (#6421) 2024-09-09 13:53:51 +08:00
chenyu
047ab7d256 minor Program post_init size cleanup [run_process_replay] (#6415) 2024-09-08 23:41:27 -04:00
qazal
442150a8df more ast_const for hardcoding consts [run_process_replay] (#6418) 2024-09-09 11:35:08 +08:00
chenyu
25af78c593 failed uop_symbolic divmod test by variable (#6414) 2024-09-08 23:08:58 -04:00
qazal
88941bcf16 fold bitwise noops (#6412)
from `8269a721cd6f5c6030ce120e1139095d7ba117eb`

Co-authored-by: timmy <timmy0x@proton.me>
2024-09-09 10:18:38 +08:00
chenyu
ad05302232 tests of real_stride of symbolic shape (#6409)
these would have failed in #6365
2024-09-08 21:37:19 -04:00
Obada Khalili
0fbd141038 tinygrad Tensor Puzzles (#6315)
* Update index.md

* update readme

* Revert "update readme"

This reverts commit 8415a8e90c.

* update readme

* remove mention

* update index.md
2024-09-09 09:32:38 +08:00
qazal
935b4ddff6 use ast_const in test_linearizer asts [run_process_replay] (#6407) 2024-09-09 08:46:58 +08:00
qazal
750696a026 use uop vars for ast DEFINE_VAR [run_process_replay] (#6404)
prereq for UOps.VALID.
2024-09-08 17:52:51 +08:00
qazal
9a67ec6174 refactor to list of kernels [run_process_replay] (#6403) 2024-09-08 17:19:45 +08:00
chenyu
7df4373fd9 tensor reduction touchup (#6402)
- fixing spacing
- use get_args to get valid Literal values and raise ValueError to match, and a test for that
- use `Y` to be consistent
2024-09-08 03:55:51 -04:00
geohotstan
65da03e186 remove _slice [run_process_replay] (#6395)
* try

* pass

* clean up

* done

* I'm becoming dumber

* clean up 2

* remove useless max

* useless but make computer brrr [run_process_replay]

* try process replay

* try again

* 1 less line, just use pad2d
2024-09-08 09:12:39 +08:00
nimlgen
22e3379578 qcom sampler touchups (#6400) 2024-09-07 22:37:46 +03:00
chenyu
3b2e1b922d Tensor.roll touchup (#6398)
simplified a bit.
it might be able to write it with only movements, but the backward would contain a reduce.
2024-09-07 04:48:43 -04:00
Irakli Salia
2e01efc35f tensor roll (#6375)
* tensor roll function and tests

* fix type annotations

* reduce line count

* more readable
2024-09-07 05:14:28 +08:00
Tim Becker
dfb818788e Support reduction parameter in more loss functions (#6302) 2024-09-07 05:11:20 +08:00
nimlgen
d3f38faeed tiny qcom touchups (#6396) 2024-09-06 22:49:21 +03:00
nimlgen
40e49b6b1a hcq share singal wait (#6394)
* hcq share singal wait

* linter
2024-09-06 18:35:06 +03:00
chenyu
26c5d8346a remove Variable from UOp.DEFINE_VAR (#6393)
now it's just arg = (expr as str, min as UOp.const, max as UOp.const)
2024-09-06 05:55:19 -04:00
chenyu
9ed2b8b818 fix DEFINE_VAR setup in test_uop_graph [run_process_replay] (#6392)
making sure arg always have 3 items
2024-09-06 05:32:12 -04:00
George Hotz
282af21b95 hotfix: DEBUG_EXPAND -1 and NOOPT in benchmark schedule 2024-09-06 17:22:30 +08:00
George Hotz
6c15bd960b flip radd to be correct [run_process_replay] (#6390) 2024-09-06 17:09:46 +08:00
chenyu
9a9fea7b8c move DEFINE_VAR min/max from src to arg (#6388)
new arg is (Variable, min as CONST, max as CONST)
2024-09-06 05:01:02 -04:00
qazal
f1bd2a5519 fix BUFFER_UOPS sts in verify_ast [run_process_replay] (#6389) 2024-09-06 16:59:22 +08:00
chenyu
cc05016fa8 move test_pattern_matcher to test/unit (#6386) 2024-09-06 03:22:43 -04:00
George Hotz
8f6d0485e7 hotfix: resnet to obj.device 2024-09-06 13:06:02 +08:00
George Hotz
9d72119a0c minor resnet cleanups (#6382)
* minor resnet cleanups

* that should have been long

* jit

* meh
2024-09-06 12:50:21 +08:00
George Hotz
86d34daac9 UOps.PHI -> UOps.ASSIGN [run_process_replay] (#6383) 2024-09-06 12:38:35 +08:00
chenyu
002303c145 fix output of truncate_fp16 (#6381)
make sure the non-inf path returns the truncated value
2024-09-05 22:55:43 -04:00
George Hotz
c88329244b create rewrite.py [run_process_replay] (#6379)
* create rewrite.py [run_process_replay]

* fix tests

* not in rewrite or ops

* skip flaky test
2024-09-06 10:51:01 +08:00