[SYCL][HIP] Add gfx90a joint_matrix float/float MFMA combinations#3
Open
zjin-lcf wants to merge 1 commit into
Open
[SYCL][HIP] Add gfx90a joint_matrix float/float MFMA combinations#3zjin-lcf wants to merge 1 commit into
zjin-lcf wants to merge 1 commit into
Conversation
CDNA2 (gfx90a / MI2xx) supports the one-block F32 MFMA instructions V_MFMA_F32_16X16X4F32 and V_MFMA_F32_32X32X2F32 (Table 25 of the MI200 CDNA2 ISA), but joint_matrix only exposed fp16/bf16/int8/fp64. Enable the missing fp32 (float in, float out) combinations, shapes 16x16x4 and 32x32x2, mirroring the existing gfx942 support: - matrix-hip.hpp: drop the inner gfx94x-only guard so the fp32 mad path also compiles for gfx90a (the builtins exist on all supported CDNA parts). - static-query-use.hpp: add float/float to the gfx90a type and combination checks. - device_impl.hpp: add the two fp32 combinations to the gfx90a runtime matrix_combinations list. - Update the AMD gfx90a supported-combinations doc table. - Add/extend tests: check_device_code (matrix-hip-float-float-test.cpp), E2E joint_matrix_hip_gfx90a.cpp, runtime_query_hip_gfx90a.cpp and compile-query-hip-gfx90a.cpp. Verified on AMD Instinct MI210 (gfx90a): the E2E and runtime-query tests pass, including numerical correctness of the fp32 MFMA results. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
V_MFMA_F32_16X16X4F32andV_MFMA_F32_32X32X2F32(Table 25 of the MI200 CDNA2 ISA), butjoint_matrixonly exposed fp16/bf16/int8/fp64.madpath, add the static query + runtimematrix_combinationsentries, and update the docs table.Stacked on
amd-matrix-gfx942). Retarget tosyclonce that merges.Test plan
matrix-hip-float-float-test.cpp(check_device_code) — FileCheck formfma.f32.16x16x4f32/mfma.f32.32x32x2f32.joint_matrix_hip_gfx90a.cpp,runtime_query_hip_gfx90a.cpp, andcompile-query-hip-gfx90a.cpp.