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

   What was done in compute_inline.cc for clipping support:
   
   - Added EpilogueType::Clipping to enum to distinguish clipping patterns
   
   - Extended AnalyzeEpiloguePattern to detect clipping patterns:
     * min(max(temp, lower), upper)
     * max(min(temp, upper), lower)
   
   - Added clipping_lower_ and clipping_upper_ members to store bounds
   
   - Modified CreateFusedReductionBlock to apply clipping to init value:
     init = min(max(0, lower), upper)
   
   - Updated BufferReplacer to apply clipping per-iteration:
     value = min(max(value, lower), upper)
   
   What the test code verifies:
   
   - test_matmul_clipping: Verifies that clipping pattern is correctly
     fused into reduction block using trace roundtrip validation
   
   - test_matmul_clipping_correctness_unified: Verifies numerical
     correctness by comparing original (per-iteration clipping) and fused
     implementations against NumPy reference
   
   - test_matmul_clipping_multiple_epilogue: Verifies clipping fusion
     works correctly in complex dataflow scenarios with multiple epilogue
     blocks consuming the same reduction result


-- 
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