Skip to content

Conversation

@ppotapov-aws
Copy link
Collaborator

(ENV) ➜  NeuronKernelInterface git:(mainline) ✗ strings attention.klir | grep k_out
gk_out.3
gk_out.3
gk_out.3
gk_out.3

Prior run:

=========================================================================================================================================================================== slowest 5 durations ============================================================================================================================================================================
0.13s call     test/frontend/test_attention_token_gen_cascaded.py::test_kernel[4-1-5-1024-10240-128-True-True-True-True-False-False-False-bfloat16-None]

(2 durations < 0.005s hidden.  Use -vv to show these durations.)
============================================================================================================================================================================ 1 passed in 1.82s =============================================================================================================================================================================
(ENV) ➜  NeuronKernelInterface git:(mainline) ✗ strings attention.klir | grep k_out
hk_out.18
hk_out.18
ik_out.470
ik_out.470

@govereau
Copy link
Collaborator

govereau commented Oct 6, 2025

OK, interesting. This makes senses. The compiler is generating fresh names and these should not prevent us from reusing those names in later compiler passes. This happens because we have everything in one computation here:

https://github.com/leanprover/KLR/blob/main/KLR/Compile.lean#L44-L49

I think a better way to do this would be to either split the PassM computations up, or maybe create some kind of reset function in PassM to clear the state.

fix: naming discrepancy

Added reset function for pass monad
@ppotapov-aws ppotapov-aws force-pushed the ppotapov/fix_naming_discrepancy branch from 2c62b0e to dd25254 Compare October 8, 2025 21:02
@ppotapov-aws ppotapov-aws merged commit fd78937 into main Oct 8, 2025
6 checks passed
@ppotapov-aws ppotapov-aws deleted the ppotapov/fix_naming_discrepancy branch October 8, 2025 21:13
@ppotapov-aws ppotapov-aws restored the ppotapov/fix_naming_discrepancy branch January 12, 2026 19:29
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.

4 participants