Which component has the problem?
CuTe DSL
Bug Report
Describe the bug
https://github.com/TungtungQia/cutlass_scf_for/blob/f74fea9ce35868d3ae9f8d1dce1969d7250d3f90/python/CuTeDSL/cutlass/base_dsl/ast_preprocessor.py#L1506
active_symbols.remove(active_symbol)
This link deletes variables at the same scope level as the induction variable, causing scf.for's iter_args to miss capturing some 'active_symbol' variables.
Steps/Code to reproduce bug
In the case(test/examples/CuTeDSL/test_for_control_flow.py), the for loop cannot modify the value of the variable 'acc'.
Expected behavior
for loop carried reused target actual=[0, 4], expected=[1, 4] assert actual == expected AssertionError
Environment details (please complete the following information):
- Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)]
Additional context
Fix: Only delete the induction variable, and retain other variables at the same scope level as the induction variable in the active_symbols.
PR: #3200
Which component has the problem?
CuTe DSL
Bug Report
Describe the bug
https://github.com/TungtungQia/cutlass_scf_for/blob/f74fea9ce35868d3ae9f8d1dce1969d7250d3f90/python/CuTeDSL/cutlass/base_dsl/ast_preprocessor.py#L1506
active_symbols.remove(active_symbol)
This link deletes variables at the same scope level as the induction variable, causing scf.for's iter_args to miss capturing some 'active_symbol' variables.
Steps/Code to reproduce bug
In the case(test/examples/CuTeDSL/test_for_control_flow.py), the for loop cannot modify the value of the variable 'acc'.
Expected behavior
for loop carried reused target actual=[0, 4], expected=[1, 4] assert actual == expected AssertionError
Environment details (please complete the following information):
Additional context
Fix: Only delete the induction variable, and retain other variables at the same scope level as the induction variable in the active_symbols.
PR: #3200