Skip to content

copy(slice) O(n^2) python time regression - #18081

Draft
Qazalin wants to merge 4 commits into
tinygrad:masterfrom
Qazalin:slice_copy
Draft

copy(slice) O(n^2) python time regression#18081
Qazalin wants to merge 4 commits into
tinygrad:masterfrom
Qazalin:slice_copy

Conversation

@Qazalin

@Qazalin Qazalin commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

adds ~1 minute to llama 8b startup time, the regression is also visible in the LLAMA_LAYERS=2 CI job
previously view.buffer was cached,
after #17913 contiguous_view() is recomputed.

It can be fixed by caching def contiguous_view, but i wanna first track down why it's called so many times.

@github-actions

Copy link
Copy Markdown
Contributor

Changes

Name                   Lines    Diff    Tokens/Line    Diff
-------------------  -------  ------  -------------  ------
tinygrad/uop/ops.py     1484      +2           16.5    -0.0


total lines changes: +2

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