-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add pragma-style annotations for loop unrolling to enable compiler-driven performance optimization.
Motivation
Inner loops in GPU kernels (especially the K-dimension loop in matmul) benefit significantly from unrolling. The compiler can sometimes unroll automatically, but explicit hints give more control.
Design considerations
Possible syntax approaches:
\ Attribute-style before loop
#UNROLL 4
DO ... LOOP
\ Or a dedicated word
4 UNROLL-DO ... LOOPImplementation notes
- Could map to LLVM loop metadata (
llvm.loop.unroll.count) - Or use MLIR's
affine.forwith unroll attributes - Need to decide if this is a parser-level annotation or a runtime construct
- Should support both full unroll and partial unroll (by factor)
Priority
Nice to have — performance optimization for inner loops.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request