The GitHub Actions job "CI" on tvm.git/main has succeeded. Run started by GitHub user tlopex (triggered by tlopex).
Head commit for run: 8521c2f7f3a9db5393ddf37761264f1657d15206 / kimm240 <[email protected]> [TIR][Schedule] FuseReductionEpilogue: Add Clipping pattern support (#18515) Currently, the FuseReductionEpilogue primitive only supports Bias (addition) and BiasReLU (addition + ReLU) epilogue patterns. However, clipping operations (min(max(x, lower), upper)) are commonly used in deep learning models and would benefit from the same fusion optimization. This commit extends FuseReductionEpilogue to support Clipping patterns by: 1. Adding EpilogueType::Clipping to the enum to distinguish clipping patterns from other epilogue types. 2. Adding clipping_lower_ and clipping_upper_ members to ReductionEpilogueFuser to store clipping bounds extracted from the epilogue pattern. 3. Extending AnalyzeEpiloguePattern to detect clipping patterns: - min(max(temp, lower), upper) - max(min(temp, upper), lower) - All commutative variants of min/max at each level 4. Updating BiasReLU pattern matching to handle max(0, x) form in addition to max(x, 0) for better commutativity support. 5. Modifying CreateFusedReductionBlock to apply clipping to the init value: init = min(max(0, lower), upper) 6. Updating BufferReplacer to apply clipping per-iteration: value = min(max(value, lower), upper) 7. Adding validation in BodyPatternAllowFusion to ensure temp appears exactly once in clipping patterns. 8. Creating comprehensive test coverage with 8 test cases: - Basic fusion test - Numerical correctness verification - Multiple epilogue blocks test - 5 commutative variant tests This implementation follows the same per-iteration semantics as BiasReLU, where clipping is applied at each reduction step rather than post-reduction. This semantic change is documented in the docstring with a warning about potential numerical differences. The test suite verifies that all commutative forms of clipping patterns are correctly recognized and that the fused implementation produces numerically identical results to the per-iteration reference implementation. --------- Co-authored-by: hyun gyu kim <[email protected]> Report URL: https://github.com/apache/tvm/actions/runs/20505069048 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
