← Back to Pull requests

feat(hipblaslt): add auxiliary output to Swish epilogues #14475

Closed
unknown closed this pull request without merging on Nov 25, 2026 16:49 UTC
View on GitHub
unknown unknown commented on Oct 27, 2026 15:55 UTC
Author

JIRA ID : AIHPBLAS-1827

Motivation

Training needs both the Swish result and its input for the backward pass.
The existing fused Swish epilogues expose only the activated result.

Technical Details

Add HIPBLASLT_EPILOGUE_SWISH_AUX_EXT and
HIPBLASLT_EPILOGUE_SWISH_AUX_BIAS_EXT. D receives Swish output; AUX receives
the activation input, including bias when enabled. The modes reuse existing
AUX descriptor attributes and SiLU kernels, following the GELU/Clamp AUX
enum and dispatch patterns.

Add API, FP16/BF16/FP32 numerical, padded-layout and C++ extension coverage.
An additional unfiltered FP16 row follows the existing GELU AUX test pattern
for architectures outside the complete mixed-type matrix. Extend the existing
Swish sample and TensileLite E-output cases.

Test Plan

From the configured clients build directory:

./hipblaslt-test --gtest_filter='*matmul_bias_swish_aux*:*aux_matmul_swish*'
./hipblaslt-test --gtest_filter='*matmul_bias_swish_f*:*matmul_bias_swish_bf*:*matmul_bias_gelu_aux_fp16*:*matmul_fast_check_matches_unit_check_aux*'

From the TensileLite source directory, with TENSILELITE_PREBUILT_CLIENT
pointing to the built client:

pytest rocisa/test
pytest --prebuilt-client "$TENSILELITE_PREBUILT_CLIENT" tensilelite/Tests/common/test_config.py -k 'fp16_use_e or sk_sgemm_quick'

Test Result

CI is the primary validation for this change. The new pre-checkin
matmul_bias_swish_aux, matmul_bias_swish_aux_fp16,
matmul_bias_swish_aux_layout, and aux_matmul_swish tests run in these jobs:

  • Linux::release / Test gfx94X-dcgpu / Test hipblaslt (six gfx942 shards).

  • mci/rocm-libraries/precheckin(hipblaslt) (gfx950 test leg).

  • gfx1250-strict hipBLASLt + TensileLite (gfx1250 device tests).
  • The test matrix includes 402 mixed-type numerical/layout combinations, 128
    additional unfiltered FP16 combinations, and one descriptor API test. They
    check the activated D output and pre-activation AUX output, bias on/off, FP16/BF16/FP32, padded and batched AUX layouts, C/C++ extension paths,
    and invalid AUX descriptor values.

    Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
  • Risk level

    Medium (3/5): new public epilogue selections enable Swish with a second output
    through shared dispatch and existing kernels.

    Diff: 298 lines (+223 / -75) across 3 files Reviewer: yzhang93 Review duration: 41813m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 298 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.341
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #14475"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40% (MEDIUM) · Higher = larger blast radius
    40%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.8% · Safe to merge
    15.8%