StrongbodyStrongmind opened a new pull request, #20265:
URL: https://github.com/apache/tvm/pull/20265

   Fixes #18393.
   
   None-valued pragma annotations represent an unspecified pragma and should 
not be lowered into `AttrStmt` nodes with undefined `PrimExpr` values.
   
   Previously, `pragma_unroll_explicit=None` was lowered into an `AttrStmt` 
with an undefined value. During `FlattenBuffer`, `StmtExprMutator` attempted to 
visit that value and triggered a segmentation fault.
   
   This patch skips `None`-valued pragma annotations during opaque lowering 
while preserving the existing behavior for valid pragma values.
   
   For `pragma_unroll`, the existing upstream behavior is preserved: non-null 
values remain attached to the loop, while null values are ignored.
   
   Tests:
   - `tests/python/tirx-transform/test_tir_transform_flatten_buffer.py`: 11 
passed
   - `tests/python/s_tir/transform/test_s_tir_transform_lower_opaque_block.py`: 
13 passed
   - `git diff --check upstream/main..HEAD`: passed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to