Skip to content

Use fp16 for convolution on navi#4895

Draft
pfultz2 wants to merge 24 commits into
developfrom
fast-conv
Draft

Use fp16 for convolution on navi#4895
pfultz2 wants to merge 24 commits into
developfrom
fast-conv

Conversation

@pfultz2
Copy link
Copy Markdown
Collaborator

@pfultz2 pfultz2 commented May 19, 2026

Motivation

Since navi doesnt have fp32 wmmas, we can use fp16 instead to get better performance.

Technical Details

This only converts the wmma to fp16 but still outputs fp32. To improve accuracy beyond just vanilla fp16 it extends the weights with residuals.

Changelog Category

Add a CHANGELOG.md entry for any option other than Not Applicable

    • Added: New functionality.
    • Changed: Changes to existing functionality.
    • Removed: Functionality or support that has been removed. (Compared to a previous release)
    • Optimized: Component performance that has been optimized or improved.
    • Resolved Issues: Known issues from a previous version that have been resolved.
    • Not Applicable: This PR is not to be included in the changelog.

Comment thread test/fast_mm_test.cpp
#include <test.hpp>

static void run_pass(migraphx::module& m, migraphx::fast_mm fmm = {})
{ migraphx::run_passes(m, {fmm, migraphx::dead_code_elimination{}}); }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[format.py] reported by reviewdog 🐶

Suggested change
{ migraphx::run_passes(m, {fmm, migraphx::dead_code_elimination{}}); }
{
migraphx::run_passes(m, {fmm, migraphx::dead_code_elimination{}});
}

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

❌ Patch coverage is 95.74468% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/fast_mm.cpp 95.65% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4895   +/-   ##
========================================
  Coverage    92.66%   92.66%           
========================================
  Files          588      590    +2     
  Lines        30397    30444   +47     
========================================
+ Hits         28165    28210   +45     
- Misses        2232     2234    +2     
Files with missing lines Coverage Δ
src/include/migraphx/fast_mm.hpp 100.00% <100.00%> (ø)
src/fast_mm.cpp 95.65% <95.65%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant