Repository navigation
rocke(feat): direct conv bf16 support - #12411
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The Python direct-conv kernel builder contains a mismatched helper call that will raise a TypeError during kernel construction (runtime-k-loop path).
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds bf16 I/O support for the grouped direct-convolution kernel family in rocke, updating both the Python and C++ engines to select bf16 buffer ops, mfma atoms, kernel naming flags, and spec validation. This fits into the rocke “byte-identity” dual-engine design by extending the same kernel family across both emitters.
Changes:
- Add
dtypeto the direct-conv problem/specs and gate kernels/validation on"fp16"vs"bf16". - Teach Python + C++ direct-conv builders to emit bf16 buffer load/store + bf16 MFMA ops and bf16-aware kernel names.
- Update the direct-conv benchmark CLI/parsing to run bf16 and reject unsupported fp32/int8 modes.
| File | Description |
|---|---|
| dnn-providers/hip-kernel-provider/rocke/platform/cpp/instances/common/conv_direct_grouped_spec_and_validate.cpp | Adds dtype defaulting, validation, bf16 kernel-name flags, and bf16 MFMA capability checks; introduces dtype-aware signature helper. |
| dnn-providers/hip-kernel-provider/rocke/platform/cpp/instances/common/conv_direct_grouped_build_8c.cpp | Switches 8c builder I/O types and ops to bf16 when requested (loads/stores/MFMA). |
| dnn-providers/hip-kernel-provider/rocke/platform/cpp/instances/common/conv_direct_grouped_build_32c.cpp | Switches 32c builder I/O types and ops to bf16 when requested (loads/stores/MFMA). |
| dnn-providers/hip-kernel-provider/rocke/platform/cpp/instances/common/conv_direct_grouped_build_16c_phases.cpp | Switches 16c builder prologue/weights/LDS helpers to dtype-selected IR types. |
| dnn-providers/hip-kernel-provider/rocke/platform/cpp/instances/common/conv_direct_grouped_build_16c_loop_closures.cpp | Switches 16c loop closures to dtype-dispatched buffer loads + generic LDS ops and bf16 MFMA/store paths. |
| dnn-providers/hip-kernel-provider/rocke/platform/cpp/include/rocke/instance_conv_direct_grouped.h | Documents dtype support and adds rocke_direct_conv_signature_for_dtype() declaration. |
| dnn-providers/hip-kernel-provider/rocke/platform/cpp/include/rocke/instance_conv_direct_grouped_internal.h | Extends direct-conv builder contexts with io_type for dtype-selected IR typing. |
| dnn-providers/hip-kernel-provider/rocke/library/kernels/common/conv_direct_grouped.py | Adds bf16 dtype plumbing, dtype-dispatched buffer ops/MFMA selection, and bf16 naming/validation across direct-conv variants. |
| dnn-providers/hip-kernel-provider/rocke/library/benchmarks/common/benchmark_direct_conv.py | Adds bf16 benchmark execution via --dtype and stricter miopen driver dtype handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Review: direct conv bf16 support - Claude code 4.7NO blocking issues. The notes below are mostly cleanup, plus one behavior change worth a second look. Legend: 🟡 = worth fixing before/with merge · ⚪ = minor / optional
-Claude Code 4.7 |
aledudek
left a comment
There was a problem hiding this comment.
one comment otherwise LGTM
TheRock Submodule Bump ActivityNewest first
|


Motivation
Add bf16 support for direct conv.
Technical Details
Extend direct conv implementation with bf16 instructions
Test Plan
test_*_conv_corectness.py
Test Result
passed
Submission Checklist
JIRA ID: AICK-1781