Repository navigation
fix(miopen/hipconv) Fix build break with GCC 14+ system headers - #11989
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. |
|
@benrichard-amd I am curious if simply deleting I can add unit tests that perform the equivalent checks. |
Hi @amd-alavin your suggestion works. MIOpen builds successfully with just the |
The rounds_are_rungs() constexpr validation exceeds clang's default constexpr step limit when compiled with GCC 14+ libstdc++ headers, due to changes in std::array's constexpr implementation. Remove the static_assert; equivalent checks will be covered by unit tests. Suggested-by: amd-alavin
78720a5 to
e87cd14
Compare
Good, that is my preferred fix. I will add it to PR #12000 for hipconv v0.3. Continue this PR too, because it might get merged first. |
BradPepersAMD
left a comment
There was a problem hiding this comment.
Trivial fix at this point so approved.
TheRock Submodule Bump ActivityNewest first
|
JIRA ID : ALMIOPEN-2361 Updates the vendored `src/hipconv` from v0.2.8 to v0.3.1 and the ConvHipConv solver with it. Per-version detail is in the new `src/hipconv/CHANGELOG.md`. ## Kernels v0.3.0 adds `depthwise_wgrad_hankel` (gfx950 depthwise conv2d wgrad, fp16/bf16, odd square 3x3 to 11x11, stride 1 or 2), `depthwise_1d_toeplitz` (gfx1250 fprop/dgrad, fp16/bf16/tf32), tf32 across the gfx1250 kernels (not yet selectable: `IsTF32Supported` admits only gfx942 and gfx95x), and conv3d via unfolding to conv2d. It removes 1x1 from the gfx950 `direct` filter set. v0.3.1 adds a gfx1250 dgrad dispatch guard, `-fno-offload-lto` on the device targets, and the `static_assert` removal below. ## Solver `IsSupportedProblem` admits 3D on the NHWC/NDHWC path and rejects non-packed tensors for every layout. NCHW stays 2D-only because `MakeTransposePlan` reads four extents positionally. The #11845 merge removes the wrw staging helpers along with this PR's depth fix to them; `GetWgradCastSize` counts depth through `GetElementSize()`. ## Downstream patches reconciled - #12085 (`gfx1250-strict` in `src/arch/cdna5/CMakeLists.txt`) is now upstream in hipconv, with the `GPU_TARGETS` filter fix that keeps the `-strict` suffix. The file differs from #12085's only by the new `depthwise_1d_toeplitz` shard. - #11989 (the `rounds_are_rungs()` `static_assert` removed for GCC 14+) matches upstream, which also removes the now-unused function. - #12328 (`-fno-offload-lto`) matches v0.3.1. - #12406 (direct_wgrad LDS ordering, hipconv `e1777ac9`, after v0.3.1) merges cleanly; `HIPCONV_VERSION` keeps its out-of-snapshot note until a sync at or after `e1777ac9`. ## Validation gfx950, clang 24 (ROCm 10.1): - ConvHipConv unit test: 144/144, including 60 conv3d cases and #12406's 12 dense wgrad cases. - hipconv feature corpus through MIOpen, solver forced: 454 pass, 0 fail, 9 no-match. Three are 1x1 (pointwise, off in MIOpen builds). Six are grouped stride-2 layers with an output extent of 1 on one axis, where `GetAdjustedConvolutionStride{H,W}` produces a mixed stride hipconv's config table does not cover. Pre-existing. - hipconv standalone ctest: 54/54, including 11020 corpus cases. gfx1250-strict: MIOpen configures with it on ROCm 10.1, and `hipconv_arch_cdna5` compiles for both gfx1250 and gfx1250-strict. Co-authored-by: Boris Prokopenko <boris.prokopenko@amd.com> Co-authored-by: Carsten Uphoff <carsten.uphoff@amd.com> Co-authored-by: Jin Zhou <jin.zhou@amd.com> Co-authored-by: Petar Jovanovic <petar.jovanovic@amd.com> Co-authored-by: Yingmao Lu <yingmao.lu@amd.com>
Motivation
Addresses #11990
-fconstexpr-steps=2097152to hipconv compile options to fix a build failure with GCC 14+ system headers.Technical Details
The
TransposeSwizzleclass inlds_layout.hvalidates its LDS bank-conflict-free layout at compile time usingstatic_assert. Therounds_are_rungs()check iterates through all swizzle combinations usingstd::arrayconstexpr operations.GCC 14 and later changed how
std::arrayimplements constexpr — the new implementation requires significantly more evaluation steps per operation. The same validation that completed within clang's default constexpr step limit (1048576) with GCC 13's libstdc++ now exceeds it with GCC 14+, producing:This is not a code bug — the constexpr evaluation is finite and correct. It just needs a higher step budget with the newer
std::arrayimplementation.Test Plan
Submission Checklist