Users/nico/moe step 0 permute bug - #722
Draft
nicolasvasilache wants to merge 18 commits into
Draft
Conversation
This PR adds a GEMM bias example and fixes some issues relating to index propagation in this case. Signed-off-by: Harsh Menon <harsh@nod-labs.com>
Signed-off-by: Harsh Menon <harsh@nod-labs.com>
Currently exposes a corner case where `resolve_threads_shapes` chokes on the result of an `tkw.reduction` with a `tkw.mma` when followed by a binary. The indexing contains quantities such as ``` '$WG0*BLOCK_B + BLOCK_B*floor($T0/64) + Piecewise((Mod($T0, 16), ~$MMA_ACC), (4*floor((Mod($T0, 64))/16), $MMA_ACC)) : Piecewise((1, ~$MMA_ACC), (4, $MMA_ACC)) : Piecewise((1, ~$MMA_ACC), (16, $MMA_ACC))' ``` and the `MMA_ACC` is not resolved, resulting in a comparison error btw static constants and Sympy expressions. Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
…ion test with new APIs for compilation and execution Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
The following procedure seems to allow to make some progress. It uses the system as a blackbox, leaving decisions to the compiler / inference and performing fixups using those decisions once bugs appear. The steps are: 1. Completely avoid vector_shapes and elements_per_thread; instead let the mma-driven inference tell us what it needs via iterative trial and error. 2. Inject roundtrip write/read to let the mma sink into a write and avoid partition_strided_operators bugs. 3. Via trial and error again, as the system complains about missing vector sizes (that cannot be inferred in the elementwise part), reinject vector sizes using values derived by the system in step 1. 4. Once stabilized, set the elements_per_thread to 4 for the elementwise trailing part. This allows producing IR that executes without crashing but produces incorrect results. Note: if BLOCK_D2 < 128, we get ``` error : HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION: The agent attempted to access memory beyond the largest legal address. code: 0x29 ``` Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
nicolasvasilache
force-pushed
the
users/nico/moe-step-0-permute-bug
branch
2 times, most recently
from
April 23, 2025 08:19
b4326c7 to
4da3949
Compare
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
Signed-off-by: Nicolas Vasilache <nicolasvasilache@users.noreply.github.com>
nicolasvasilache
force-pushed
the
users/nico/moe-step-0-permute-bug
branch
from
April 27, 2025 11:55
4da3949 to
df7f4b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.