Commit Graph
1751 Commits
Author SHA1 Message Date
George HotzandGitHub 2f970a4fc2 all realize 2 (#4527)
* all realize 2

* tests fixup

* fix more tests

* fix openpilot

* fix tests

* unneeded
2024-05-10 22:43:09 -07:00
George HotzandGitHub 347a3acb37 add renderer class (#4524)
* add renderer class

* tests pass

* fix pylint

* fix tensor cores
2024-05-10 21:40:02 -07:00
chenyuandGitHub b00b6b16f0 fix TRAIN_BEAM and Tensor.training for mlperf bert (#4525)
also hard coded bert model config instead of looking up a file
2024-05-11 00:18:36 -04:00
chenyuandGitHub 7fab8c9e17 add symbolic mean test cases in test_symbolic_ops and test_symbolic_jit (#4523)
* add symbolic mean test cases in test_symbolic_ops and test_symbolic_jit

2d symbolic mean in jit does not quite work, order of the variable inputs are not deterministic?

* skip
2024-05-10 23:19:55 -04:00
George HotzandGitHub 827058f030 update tests get_runner (#4522) 2024-05-10 20:09:22 -07:00
George HotzandGitHub d438d5698d bring buffer back to device (#4517) 2024-05-10 11:22:31 -07:00
George HotzandGitHub 4eef1ee9bf move renderer into options (#4514)
* move renderer into options

* fix tests

* renders are functions
2024-05-10 10:01:51 -07:00
George HotzandGitHub 89e119bc58 move Allocator to buffer.py (#4502)
* move Allocator to buffer.py

* move those to realize

* memory file

* cleanup
2024-05-09 19:45:56 -07:00
George HotzandGitHub 1e843d495e cleaning up search with Program (#4500)
* cleaning up search

* fix tests

* test fix

* minor compiler cleanup
2024-05-09 19:01:53 -07:00
chenyuandGitHub d3dc332c2e Tensor.logsumexp (#4442)
the subtract max part should share with safe softmax

cleaner
2024-05-09 20:49:06 -04:00
George HotzandGitHub c9e84ed0da refactor to Program class (#4476)
* refactor to Program class

* switch to Program

* fix tests

* smaller diff

* self.p

* more tests

* fix metal test

* tests

* fix openpilot

* move that to linearizer

* p.launchdims
2024-05-09 17:29:07 -07:00
nimlgenandGitHub a2e2ba380c nv tune shmem size (#4495)
* nv tune shmem size

* compare them

* linter

* linter2
2024-05-10 00:35:01 +03:00
nimlgenandGitHub e14d5b6fd7 nv fix oob qmd ptr (#4478)
* nv fix oob qmd ptr

* test kernargs no oob
2024-05-08 23:11:04 +03:00
chenyuandGitHub 36a1f38049 lazy folding: mul -1 is neg, and neg neg is noop (#4472) 2024-05-08 01:52:22 -04:00
chenyuandGitHub c508eb7425 revert the removal of CAST_BEFORE_VIEW (#4471)
this brings most of the memory gain for resnet back.
2024-05-08 00:14:29 -04:00
chenyuandGitHub 7eb035e7c5 stronger test case for half mean overflow (#4470) 2024-05-07 22:40:09 -04:00
chenyuandGitHub ca7300c783 fix half mean and its backward (#4469)
* fix half mean and its backward

cast to sum_acc_type, sum, div, then cast back

* mean dtype tests
2024-05-07 21:46:41 -04:00
Francis LamandGitHub 7da1b41f38 fuzz_linearizer: add FUZZ_REQUIRE_TC option to require TC in opts (#4468)
useful for checking late opts after TC such as GROUP, etc.
2024-05-07 17:14:21 -04:00
chenyuandGitHub 46a793111b test for LazyBuffer._view when mask out and degrade into const (#4465)
changed the condition from all 0 in masked dims to any 0 in masked. it's no-op because shapetracker rewrites whole mask to 0 if any dim has 0 as part of canonicalization
2024-05-07 12:56:23 -04:00
nimlgenandGitHub a1d350a810 nv timeline semaphores (#4464)
* nv timeline semaphores

* nv hcq fixes
2024-05-07 17:31:19 +03:00
nimlgenandGitHub e3bb85fd0e amd timeline semaphores (#4416)
* amd timeline semaphores

* v2

* fixes

* reset signals

* fix

* rollover test

* small fixes

* linter

* copyin
2024-05-07 11:17:32 +03:00
George HotzandGitHub 17faae091b optimizer shouldn't be run without training (#4460)
* optimizer shouldn't be run without training

* set training in relevant tests

* fix multitensor

* that too
2024-05-06 15:34:12 -07:00
qazalandGitHub 35dfbc6354 rand_for_dtype helper (#4459) 2024-05-07 00:03:42 +03:00
Francis LamandGitHub 47750e65fd kernel: un-reverse the order of the local indices (#4454)
no change to performance or behavior.  new LOCALS are added to the
left side of the LOCALS block (to the left of the first_reduce).
2024-05-06 15:21:27 -04:00
chenyuandGitHub 5e036cd0b3 test unary and more reduces in test_flopcounter (#4455)
cannot really catch a spec change error without testing the new spec explicitly, but we don't intended to change the lazy spec lightly

another possible way to catch reduce flopcounter shape would be type checking InterpretedFlopCounter and throw error if `in` results in `Never`
2024-05-06 15:15:16 -04:00
nimlgenandGitHub d0b8862dea fix out of resource kernels on nv (#4450)
* fix out of resource kernels on nv

* better comment

* noqa

* noqa 2

* linter
2024-05-06 19:24:20 +03:00
nimlgenandGitHub 113c2f00b9 amd doorbell size is 64bits (#4448)
* amd doorbell size ids 64bits

* add test

* test to pass 32bit boundary is more correct

* no need to round there
2024-05-06 16:59:59 +03:00
qazalandGitHub 6dbe5585b0 batchnorm + conv backward in test_schedule (#4420)
* test both optims

* batchnorm_backward
2024-05-06 16:40:17 +03:00
chenyuandGitHub afe020710d disable PADTO on upcasted axis (#4444)
fixed test_failure_31. PADTO upcasted is at best a no-op, and might fail at edge cases.
2024-05-05 21:52:03 -04:00
Francis LamandGitHub c8595a9655 update sops.gz, fix tests and add new linearizer test (#4437)
* update sops.gz, fix tests and add new linearizer test

* remove METAL CI skip for test_failure_22

* re-add skip to METAL CI to test_failure_22
2024-05-05 17:31:25 -04:00
chenyuandGitHub d0eb1540d5 helpers.diskcache_clear (#4436)
drop all tables in diskcache. added a unit test but disabled it by default because it will drop all cache...
2024-05-05 14:19:01 -04:00
geohot 595a6e3069 test_fold_conv_relu_backward test 2024-05-05 11:13:43 -07:00
geohot f95658bc3e hotfix: pickle jit works if you delete the function 2024-05-05 10:14:03 -07:00
geohotstanandGitHub 874dfc556c update setitem tests to test for currently supported cases (#4334)
* tests, tests, tests

* one more test

* tests tests tests tests

* t e s t

* a few more
2024-05-05 11:59:13 -04:00
David HouandGitHub c0a048c044 batchnorm d(var)/d(mean) = 0 (#4430)
* d(var)/d(mean) = 0

* drop the number in test_schedule!
2024-05-05 00:25:45 -04:00
George HotzandGitHub cb7289f9c9 remove clang program header (#4422)
* remove clang program header

* proper max

* bools are numbers

* fix compile enet
2024-05-04 08:38:01 -07:00
qazalandGitHub 267bbb57f9 Revert "Add insert_before to Linearizer Functions (#4320)" (#4421)
This reverts commit 664b563c91.
2024-05-04 17:50:21 +03:00
qazalandGitHub 5f3bae378f search children in fusion (#4322)
* scheduler diff

* tests diff

* new changes

* realizes

* chores

* assign

* kind of r3

* forced_realize wont do it

* with forced_realize

* start with children

* test search

* r3 with parents

* diff cleanup

* add children

* crossing assign

* late fuse descendants

* update kernel counts

* assign diff doesnt belong here
2024-05-04 17:22:15 +03:00
qazalandGitHub 249cadd106 fusing crossing diamond assign (#4403)
* refactor scheduler parents search

* assign target

* unit test

* can't chase this
2024-05-04 15:19:48 +03:00
George HotzandGitHub 9fc4465557 subbuffer support (#4397)
* subbuffer support

* diskbuffer offset

* cuda subbuffer works

* use subbuffer

* more subbuffer tests

* consecutive

* cast

* consec

* offset

* view is a better name

* offset is in nbytes

* fix view + memory planner

* delete unused DiskRunner

* reverse order

* no subbuffers on unrealized consts

* only enabled for disk

* don't reverse memory

* view supported devices

* pickle buffer view

* ring jit

* support extra view inputs in jit

* fix JIT=2 issue

* test copy jit

* p2p isn't an option anymore

* fix dep tracking issue

* fix mypy

* fix pickle

* from_nv is contents now
2024-05-03 18:05:57 -07:00
qazalandGitHub 3401734e54 infra for scheduler process replay (#4405)
* use getenv

* capture ast

* fix graph

* replay schedules

* exec
2024-05-03 20:29:13 +03:00
George-the-1standGitHub 0627e26140 Added missing unittest execution code (#4400)
same code as on every other test file, just missing from this one for some reason.
2024-05-02 22:34:30 -04:00
qazalandGitHub 0deaaf2bc8 partial fusion spec (#4398) 2024-05-03 04:14:23 +03:00
Francis LamandGitHub 5c5b40880f search: fix edge cases on screening potential ops (#4394)
* search: fix edge cases on screening potential ops

won't change correctness, but will save a little python time by
properly deduplicating potential actions

* check for de-duplication instead of exact valid actions

* refactor long line
2024-05-02 14:53:05 -04:00
George HotzandGitHub 2786dff26d new disk tensor tests (#4393) 2024-05-02 08:54:44 -07:00
George HotzandGitHub c8a2047377 testing for all reduce (#4387) 2024-05-02 06:34:10 -07:00
qazalandGitHub 0b47818e0f simpler reduceop children chasing (#4350)
* simplest case

* midreduce case

* all tests

* pending things

* unify tests
2024-05-02 15:15:30 +03:00
George HotzandGitHub f635c4d273 fix define global (#4383)
* fix define global

* remove name from DEFINE_GLOBAL

* fix fuzzing

* fix ptx

* fix python
2024-05-01 22:32:56 -04:00
chenyuandGitHub 826cccd54d fix mean underflow for half tensor (#4377)
* fix mean underflow for half tensor

divide only the reduce factor. added unit test and non-nan assertion in resnet training. also added a failed test cast for symbolic shape var

* skip for python backend
2024-05-01 13:38:57 -04:00
chenyuandGitHub 077ea6926c remove downcast_half in sum (#4376)
breaks boolean mean and other stuff
2024-05-01 11:46:44 -04:00