Repository navigation
fix(miopen): add naive reference kernel for 3D INT8 forward convolutions - #10051
Conversation
…d convolutions Missing DEFINE_3D_NAIVE_CONV_KERNEL(fwd, ncdhw/ndhwc, int8_t, int32_t, int8_t, 0) macro calls caused "named symbol not found" HIP errors when MIOpenDriver tried to verify 3D INT8 forward convolutions against the naive reference. The int8_t→int8_t output variant existed for 2D (nchw/nhwc) but was never added for 3D layouts. Fixes SILOTIGER-709 / ALMIOPEN-2275. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
Pre-commit check failed⛔ pre-commit failed Please run locally:
This repo uses |
… fwd regression
- Rename fixture alias GPU_UnitTestNaiveConv3dInt8Fwd -> GPU_UnitTestConvNaiveConv3dFwd_I8
to satisfy the gtest-format-miopen pre-commit hook (suite name must end in a valid
datatype token, e.g. _I8).
- Replace two identical NCDHW cases with one NCDHW + one explicit NDHWC case (via
TensorDescriptorParams{miopenTensorNDHWC}) so both fixed kernel instantiations are
actually exercised at runtime.
- Reduce tensor sizes (C=16, K=8) so num_add=16 < int8_max=127, satisfying the
conv_tensor_gen.hpp overflow guard for int8_t accumulator test data generation.
All four tests pass on gfx942 (MI300X): 2/2 new 3D int8 cases + 4/4 smoke suites for
ConvDirectNaiveConvFwd/Bwd/Wrw and GemmFwd1x1_0_1_int8.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🎉 All checks passed! This PR is ready for review. |
|
CI fails on the Dbsync test on GemmFwdRest solver checks
|
…ectNaiveConvFwd Add GetConvTestCases3dInt8() with NCDHW and NDHWC 3D int8 cases (type_y=miopenInt8) and a Smoke3dInt8 instantiation for GPU_UnitTestConvSolverDirectNaiveFwd_I8. Remove the now-redundant standalone test_naive_conv_3d_int8_fwd.cpp. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TheRock Submodule Bump ActivityNewest first
|
## Summary Backfills the **MIOpen 3.6.1 / ROCm 10.1.0** changelog section with externally-visible changes that landed since the `release/therock-10.0` branch but weren't yet documented. All 43 MIOpen commits in that range were reviewed; CI/build-infra, test-only, docs, version-bump, and already-documented changes were excluded. 21 entries added: ### Added * [RNN] Fused single-layer LSTM forward-inference kernel, gated behind `MIOPEN_DEBUG_RNN_FUSED_INFERENCE` (#8915) * [Conv] Naive reference kernel enabling 3D INT8 forward convolution (#10051) * [Conv] `ConvHipConv` solver backed by vendored hipconv kernels (#9746) * [Conv] float8 vector type support + deduplicated math kernels (#10130) * [Conv] Validated gfx1151 and gfx1200 (Navi) SystemDBs (#10050) * [Conv] `MIOPEN_DEBUG_DISABLE_SYSTEM_DB` / `MIOPEN_DEBUG_DISABLE_USER_DB` env vars (#10728) * [Conv] CK depthwise convolution on RDNA wave32 GPUs (#9373) ### Changed * [Conv] Winograd Rage RxS f2x3 on gfx950 + gfx942 v4_6_1/v4_9_1 kernels (#9014) * [Conv] Updated 3D AI heuristics for gfx942 & gfx950 (#8954) ### Optimized * [Conv] Single GEMM for point (1x1) output convolution, all directions, 2D/3D (#10912) * [Conv] Naive backward-data kernel work group widened to 1024 (#10684) ### Resolved Issues * [Conv] Batch-split miscalculation on large WrW tensors — ROCM-26011 (#11188) * [Conv] Conv failure on XNACK-unsupported gfx9 APUs (gfx90c) (#11211) * [BatchNorm] Device heap-overflow in fwd spatial `FinalMeanVariance` — ALMIOPEN-2424 (#11093) * [Conv] Deterministic `SetNextValue` polarity for grouped Bwd/Wrw CK solvers (#10240) * [LRN][LayerNorm] Grid alignment + OOB threads on gfx1250 (#10251) * [Conv] Stale gfx950 grouped-wrw SystemDB entries (#11130) * [Conv][Windows] System-DB path resolution from the MIOpen module (#10838) * [Conv] System-DB fallback so MI308X (gfx942) resolves a usable DB (#8802) * JSON perf logs (`MIOPEN_PERFORMANCE_LOGS`) dropping the last solver during Find (#11166) * Build failure against GCC 15 libstdc++ under C++20 (#9642) ## Notes Deliberately excluded: internal/default-off changes (#10219, #10088, #10649, #10231), a near-duplicate of an existing 10.0.0 entry (#10188), and CI/build-infra/test-only/docs commits. Docs-only change; no code impact. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
JIRA ID : ALMIOPEN-2275
Motivation
MIOpenDriver verification fails for 3D INT8 forward convolutions in both NCDHW and NDHWC
layouts (SILOTIGER-709 / ALMIOPEN-2275). The fast solver
(
ConvHipImplicitGemm3DGroupFwdXdlops) runs successfully, but the naive referencekernel — used for output verification — aborts with a HIP symbol error:
The same failure occurs for the NCDHW variant
(
naive_conv_ab_nonpacked_fwd_ncdhw_int8_t_int32_t_int8_t_0).Technical Details
Root cause. The JIT-compiled reference kernel (
src/kernels/gpu_reference_kernel/naive_conv.cpp)instantiates typed kernel variants via the
DEFINE_3D_NAIVE_CONV_KERNELmacro. Theint8_t-output variant (…, int8_t, int32_t, int8_t, 0) was present for 2D(
nchw/nhwc) but had never been added for 3D (ncdhw/ndhwc), even though theint32_t- andfloat-output 3D variants already existed and the underlying templatelogic for 3D INT8 is correct.
Fix. Two macro instantiation lines added; no logic change:
Regression test (
test/gtest/test_naive_conv_3d_int8_fwd.cpp). The test runsConvDirectNaiveConvFwd(the naive solver itself) on two 3D INT8 cases — one NCDHW(default layout) and one explicit NDHWC via
TensorDescriptorParams{miopenTensorNDHWC}.Both use
type_y=miopenInt8(the previously missingTout=int8_tsymbol path), andUseCpuRef()so the CPU provides the reference values while the GPU naive kernel is thesolution-under-test. Channel count is kept small (C=16) to satisfy the test data
generator's
num_add < int8_max=127overflow guard for int8 accumulation.Test Plan
Build with the existing
projects/miopen/buildconfig(
MIOPEN_BACKEND=HIP,GPU_TARGETS=gfx942;gfx950,MIOPEN_TEST_DISCRETE=ON):Test Result
All tests run on GPU MI300X (gfx942):
test_test_naive_conv_3d_int8_fwdtest_unit_conv_solver_ConvDirectNaiveConvFwdSmoke*test_unit_conv_solver_ConvDirectNaiveConvBwdSmoke*test_unit_conv_solver_ConvDirectNaiveConvWrwSmoke*test_unit_conv_solver_GemmFwd1x1_0_1_int8Smoke*pre-commit (scoped to the two changed files, matching CI's
--from-ref/--to-refbehavior): all hooks pass (trailing-whitespace, end-of-file-fixer, clang-format v18.1.4,
gtest-format-miopen).
Risk Assessment
Risk level: Low
DEFINE_3D_NAIVE_CONV_KERNELmacro calls instantiatinga template that is already used and proven for other 3D INT8 output variants. No
changes to kernel logic, solvers, dispatch, APIs, or ABI.
previously broken (crashes → works). All other paths are untouched.
nchw/nhwcint8_t-output variants and the 3Dint32_t/float-output variants continue to pass their existing smoke tests.regression on this symbol.
Checklist
make format&make check_formatto ensure the changes have been formatted