Skip to content

Draft: port sliced-assign fast path onto upstream 2026-09-28 - #7

Closed
rishavsanjay wants to merge 2 commits into
codex/sliced-assign-review-base-20260925from
codex/sliced-assign-review-20260925
Closed

rishavsanjay wants to merge 2 commits into
codex/sliced-assign-review-base-20260925from
codex/sliced-assign-review-20260925

Conversation

@rishavsanjay

@rishavsanjay rishavsanjay commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Review scope

Rebased onto current upstream tinygrad/tinygrad@824a9a07fc29d56a59af0ce384fd7b2423963516 (2026-09-28).

This keeps the focused cross-device sliced-assign work on the current tree:

  • scheduler fast path in tinygrad/schedule/__init__.py
  • regression coverage relocated with upstream to test/runtime/test_setitem_schedule.py
  • contiguous composed-view coverage
  • explicit noncontiguous fallback coverage

The branch is two commits ahead of the exact upstream base and contains only those two files.

Review requests

  • Verify the callify rewrite correctly targets contiguous destination views for cross-device copies.
  • Check aliasing/device constraints and the composed contiguous-view cases.
  • Confirm noncontiguous destinations still take the two-kernel fallback.

Validation

Unit Tests and Platform Tests were triggered by the rebased push and are currently pending.

@rishavsanjay
rishavsanjay force-pushed the codex/sliced-assign-review-20260925 branch from a376c6c to f9de67f Compare September 28, 2026 12:40
@rishavsanjay rishavsanjay changed the title Draft: port sliced-assign fast path onto upstream 2026-09-25 Draft: port sliced-assign fast path onto current upstream Sep 28, 2026
@rishavsanjay
rishavsanjay force-pushed the codex/sliced-assign-review-20260925 branch from f9de67f to 64e8289 Compare September 28, 2026 12:41
@rishavsanjay rishavsanjay changed the title Draft: port sliced-assign fast path onto current upstream Draft: port sliced-assign fast path onto upstream 2026-09-28 Sep 28, 2026
@github-actions

Copy link
Copy Markdown

Changes

Name                                         Lines    Diff    Tokens/Line    Diff
-----------------------------------------  -------  ------  -------------  ------
tinygrad/uop/ops.py                           1542     +70           16.5    +0.2
tinygrad/viz/js/index.js                      1060     -20            5.4    +0.0
tinygrad/nn/onnx.py                           1040      +3           18.1    -0.0
tinygrad/runtime/ops_amd.py                    850     -22           18.0    +0.2
tinygrad/mixin/op.py                           752      -2           23.3    -0.2
tinygrad/llm/kernels/amd.py                    702    +133           21.0    -1.1
tinygrad/viz/serve.py                          647     +25           17.4    +0.3
tinygrad/runtime/ops_nv.py                     644      +8           19.4    +0.8
tinygrad/renderer/amd/sqtt.py                  587     +11            9.2    +0.2
tinygrad/runtime/support/am/ip.py              562     +20           20.2    +0.3
tinygrad/renderer/isa/x86.py                   551     -90           27.4    -2.2
tinygrad/helpers.py                            538      +7           16.3    -0.1
tinygrad/renderer/cstyle.py                    493      +1           20.4    +0.1
tinygrad/runtime/support/hcq2.py               465     -10           24.0    +0.6
tinygrad/device.py                             457     +87           15.6    +0.4
tinygrad/llm/model.py                          456     +51           16.9    -0.0
tinygrad/renderer/amd/generate.py              430      +9           15.0    +0.2
tinygrad/runtime/support/system.py             362     +14           19.9    -0.1
tinygrad/tensor.py                             355    -114           15.8    -0.5
tinygrad/runtime/support/usb.py                354     +85           21.7    +0.4
tinygrad/codegen/__init__.py                   346      -5           17.8    +0.5
tinygrad/uop/symbolic.py                       325      +1           27.9    -0.3
tinygrad/runtime/support/am/amdev.py           303      +6           18.1    -0.2
tinygrad/runtime/ops_qcom.py                   302     -11           19.0    -0.0
tinygrad/mixin/elementwise.py                  300      +3           14.4    +0.1
tinygrad/dtype.py                              278      +9           15.1    +0.1
tinygrad/renderer/nir.py                       261      -4           23.7    -0.1
tinygrad/schedule/rangeify.py                  255     -17           15.6    -0.1
tinygrad/engine/realize.py                     242     -30           20.7    -0.4
tinygrad/runtime/ops_dsp.py                    242      +0           17.1    +0.1
tinygrad/renderer/llvmir.py                    236      -8           20.0    +1.0
tinygrad/schedule/multi.py                     233      -6           18.7    -0.3
tinygrad/codegen/opt/postrange.py              230     -59           18.5    +1.4
tinygrad/schedule/__init__.py                  228     +68           16.3    +0.4
tinygrad/schedule/indexing.py                  224      +3           14.8    -0.1
tinygrad/viz/cli.py                            213      +2           19.2    -0.1
tinygrad/runtime/ops_metal.py                  212     +65           18.5    +4.1
tinygrad/runtime/support/memory.py             202      -2           18.5    +0.1
tinygrad/renderer/ptx.py                       201      -1           26.8    +0.0
tinygrad/runtime/support/rdma/bnxtdev.py       191    +191           18.4   +18.4
tinygrad/codegen/decomp/dtype.py               186      +4           29.4    -0.5
tinygrad/llm/gguf.py                           185      -2           28.0    +0.2
tinygrad/nn/state.py                           183     -28           15.9    +0.1
tinygrad/uop/spec.py                           183     +15           25.0    -1.0
tinygrad/schedule/prepare.py                   182     +42           22.3    -1.4
tinygrad/llm/cli.py                            182      +1           15.0    +0.1
tinygrad/nn/__init__.py                        177      +0           18.1    +0.2
tinygrad/runtime/ops_python.py                 166     -50           17.8    -0.7
tinygrad/runtime/ops_webgpu.py                 161      +0           15.1    +0.1
tinygrad/llm/serve.py                          159      +5           13.7    -0.2
tinygrad/codegen/opt/search.py                 152      -4           15.6    -0.3
tinygrad/engine/jit.py                         148     -80           15.3    -0.9
tinygrad/uop/upat.py                           138      +8           17.7    +0.8
tinygrad/codegen/opt/heuristic.py              136      +2           19.2    +2.6
tinygrad/uop/render.py                         132      +6           26.8    +0.2
tinygrad/codegen/late/coalesce.py              130      -3           18.3    +0.5
tinygrad/runtime/ops_rdma.py                   126     +42           21.8    +2.5
tinygrad/mixin/gradient.py                     125      +8           24.9    -0.5
tinygrad/runtime/ops_disk.py                   121      +1           14.6    +0.1
tinygrad/runtime/support/c.py                  117      +1           16.5    -0.0
tinygrad/runtime/ops_cl.py                     114      -1           18.7    +0.1
tinygrad/codegen/simplify.py                   112      -3           21.6    -1.0
tinygrad/viz/js/worker.js                      107      +0            5.0    +0.1
tinygrad/renderer/tc.py                        106    +106           25.6   +25.6
tinygrad/runtime/ops_cuda.py                   106     -10           19.7    +3.5
tinygrad/renderer/wgsl.py                      102      +5           24.8    -0.5
tinygrad/codegen/decomp/op.py                   92      -8           24.2    +0.2
tinygrad/function.py                            86      +5           14.4    +1.0
tinygrad/codegen/late/regalloc.py               85     -12           17.3    -0.3
tinygrad/uop/validate.py                        76      +3           23.4    -1.9
tinygrad/runtime/ops_cpu.py                     75    -111           17.9    -4.2
tinygrad/runtime/support/compiler_llvm.py       75      +0           13.7    -0.0
tinygrad/renderer/__init__.py                   73      -2           14.3    +0.1
tinygrad/codegen/gpudims.py                     72      -4           18.0    -0.4
tinygrad/uop/divandmod.py                       70      +0           19.4    +0.0
tinygrad/runtime/support/elf.py                 66      +3           19.3    -0.1
tinygrad/codegen/late/linearizer.py             65      +0           13.8    -0.5
tinygrad/runtime/support/objc.py                65      +4           12.7    -0.2
tinygrad/uop/weak.py                            64      -5           24.8    +1.8
tinygrad/runtime/ops_null.py                    59      +8           24.1    +7.7
tinygrad/mixin/creation.py                      58      +3           15.4    +0.1
tinygrad/runtime/ops_hip.py                     57      +0           19.8    +0.3
tinygrad/schedule/allreduce.py                  56      +9           22.2    +3.2
tinygrad/uop/__init__.py                        54      +0           15.9    -0.0
tinygrad/schedule/memory.py                     46      +0           17.6    -0.0
tinygrad/engine/worker.py                       42      +4            8.9    +0.8
tinygrad/renderer/isa/__init__.py               41      -2           11.7    +0.3
tinygrad/mixin/dtype.py                         37      +2           11.8    +0.8
tinygrad/runtime/support/amd.py                 32      +0           24.8    +0.6
tinygrad/mixin/reduce.py                        26      +0           18.5    -0.0
tinygrad/uop/movement.py                        17      +2           39.9    +0.1
tinygrad/codegen/opt/__init__.py                15      -1            9.7    -1.6
tinygrad/runtime/ops_npy.py                      3      -8           14.0    -4.5
tinygrad/runtime/support/hcq.py                  0    -367            0.0   -17.0
tinygrad/runtime/graph/cuda.py                   0     -56            0.0   -18.2
tinygrad/runtime/ops_tinyfs.py                   0    -100            0.0   -11.8
tinygrad/runtime/graph/metal.py                  0     -93            0.0   -14.0
tinygrad/runtime/graph/hcq.py                    0    -219            0.0   -19.9
tinygrad/runtime/support/mlx/mlxdev.py           0    -181            0.0   -20.6
tinygrad/codegen/opt/tc.py                       0    -148            0.0   -25.3


total lines changes: -738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant