Repository navigation
kernel: add 0132, the BC-250 per-shader-array WGP mask for KFD - #131
Merged
Merged
Conversation
skillfish-cu unlocks the harvested WGPs through UMR after amdgpu has bound, so Vulkan uses 40 CUs but KFD keeps the fused 24: it counts CUs once, in gfx_v10_0_get_cu_info(). amdgpu.bc250_cc_wgp_mask writes the disabled WGPs into CC_GC_SHADER_ARRAY_CONFIG bits 31:16 and the mask into SPI_PG_ENABLE_STATIC_WGP_MASK before that count. Unset, nothing changes. From MastaG/linux-cachyos-bc250 0029 (ForceConstant, issue #14), ported onto 0114 instead of their 0011 and without their RLC_PG_ALWAYS_ON_WGP_MASK write, which 0114 leaves out on purpose. Tested on bc250-dev with a 7.3.4 test build: unset, KFD simd_count 48 as on the released kernel; with 0x1f x4, simd_count 80, registers as expected, vkpeak 10172 GFLOPS. No KFD queue in use: the board has no ROCm stack. The README's recipe section is brought up to date (49 patches, 7.3.4).
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.
What
New recipe patch
0132-mastag-0029-bc250-cc-wgp-mask.mypatch: the module parameteramdgpu.bc250_cc_wgp_mask=SE0.SH0,SE0.SH1,SE1.SH0,SE1.SH1(four 5-bit WGP enable masks). Unset, the kernel behaves as before.Why
skillfish-cuunlocks the harvested WGPs at boot through UMR, after amdgpu has bound. Vulkan uses them, but KFD counts CUs once ingfx_v10_0_get_cu_info()and keeps the fused 24, so ROCm never sees the rest. The mask writes, per shader array and before that count, the disabled WGPs intoCC_GC_SHADER_ARRAY_CONFIGbits 31:16 and the mask intoSPI_PG_ENABLE_STATIC_WGP_MASK.Origin
MastaG/linux-cachyos-bc250
0029(author ForceConstant, MastaG/linux-cachyos-bc250#14), GPL-2.0. Ported onto our0114(ariel-16) instead of their0011, and without theirRLC_PG_ALWAYS_ON_WGP_MASKwrite:0114leaves that register out on purpose, because with RLC firmware running the write deadlocks the RLC on the first KFD queue.Tests
On bc250-dev, test build
7.3.4-skillfishos-p0132(BC-250 flavour, signed), installed next to the released kernel and booted once withgrub-reboot:simd_count0x1f,0x1f,0x1f,0x1fWith the mask,
bc250-wgp-masklogsCC=0xfff80000->0xffe00000 SPI=0x00000007->0x0000001fon all four shader arrays. Fans, desktop and services normal in both boots.gfx_v10_0.obuilds clean withW=1.Not tested: a KFD queue in use, since the board has no ROCm stack.
The kernel README's recipe section is brought up to date (49 patches, 7.3.4, ranges per series) with a section on 0132. The patch ships with the next kernel build.