17 Commits

Author SHA1 Message Date
duggasco
ae7c30c78e Merge pull request #14 from fduraibi/patch-1
Refactor module installation and restoration logic to work with Fedor…
2026-06-24 16:34:20 +00:00
Fahad Alduraibi
ec0c0f7ea3 Refactor module installation and restoration logic to work with Fedora 44
Updated the install_module and do_restore functions to handle module installation and restoration for Fedora 44.
2026-06-09 23:10:14 +03:00
duggasco
6c3969ddee Merge pull request #12 from elektricM/add-fedora-script
add Fedora script for kernel 7.x
2026-05-31 03:40:25 +00:00
Martin
cc82b841da add Fedora script for kernel 7.x
Mirrors bc250-enable-40cu-arch.sh, adapted for Fedora:

- deps via dnf install kernel-devel-$(uname -r) gcc make zstd curl
- local source detection covers /usr/src/linux-$KVER (manually
  extracted from kernel.src.rpm) before falling back to the kernel.org
  download path inherited from the Arch variant
- error message points at the Fedora source-package workflow
  (dnf download --source kernel, rpm2cpio, unpack linux-$KVER_BASE.tar.xz)

Tested end-to-end on Fedora 43 with kernel 7.0.9-105.fc43.x86_64:
build + install + reboot loads the patched module cleanly, dmesg
reports the CC/SPI writes on all 4 shader arrays, active_cu_number
40, vulkaninfo num_cu = 40. Backup chain works (.bc250-backup-DATE),
restore returns to stock 24 CU.

The Fedora kernel-devel package on 7.0.9 ships scripts/ and
arch/x86/tools/cpufeaturemasks.awk in full, so the standard
make -C $kbuild M=$amdgpu_dir build path uses kernel-devel for
vermagic and works without any EXTRAVERSION or utsrelease.h
patching (those were only needed when building inside the source
tree on older kernel-devel revisions).
2026-05-31 00:08:40 +02:00
duggasco
e60ce88d3a Merge pull request #11 from dannybastos/40cu-arch
added script for archlinux kernel 7.x
2026-05-30 02:25:24 +00:00
Danny Bastos
e4444a2082 fix script for arch kernel 7.x 2026-05-26 09:24:11 -03:00
duggasco
8b6d3c95fa Merge pull request #1 from GreatApo/main
Corrected disable_cu options to reference WGP instead of CU
2026-05-20 15:49:52 +00:00
root
0e7b40314d Add whitepaper: register-level CU re-enablement analysis
8-page academic paper covering methodology, 4-state controlled
experiment, community harvest map survey (n=58), and dual-register
gating architecture. PDF and LaTeX source in docs/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-20 09:06:27 +00:00
Apostolos Grammatopoulos
24882a4a57 Corrected disable_cu options to reference WGP instead of CU 2026-05-20 00:30:43 +01:00
root
11093c6226 Fix patch: correct hunk line count (39 -> 40)
The second hunk header claimed 39 new lines but the actual content
has 40 (34 added + 6 context). This caused "malformed patch" errors
on CachyOS kernel builds.

Reported by Marcin on Discord.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-19 13:45:03 +00:00
root
784dd891b8 Add selective CU masking docs to README
Documents the WGP/CU mapping, disable_cu syntax, and the automated
health test + masking workflow. For boards with scattered harvest
patterns where some unlocked CUs may be defective.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 23:28:36 +00:00
root
215503a6d4 Fix compute verifier FP tolerance and add health tooling
- FP tolerance: iters/3 + 2 ULP (23 for default 64 iters) to account for
  CPU vs GPU FMA rounding accumulation in chained operations. Integer
  comparison remains exact.
- Verified: 100M checks, zero errors on both boards at 40 CU.
- Added cu_map.sh health overlay, CU health test, selective masking tool.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 21:41:22 +00:00
root
cdfeb5171b Add per-CU health test, selective masking, and compute verifier
New tools for boards with scattered harvest patterns where unlocked
CUs may be defective:

- bc250-compute-verify.sh: Heavy Vulkan correctness test (FP32 FMA,
  integer, bitwise, LDS) with per-element golden comparison
- bc250-cu-health-test.sh: Reboot-resuming 20-WGP isolation test using
  amdgpu.disable_cu. Results to /var/lib/bc250-cu-health-test/results.tsv
- bc250-cu-mask.sh: Generates selective disable_cu= config from failed
  WGPs — enables e.g. 38 of 40 CUs with bad ones masked
- cu_map.sh: Updated with --health overlay showing stock + healthy/failed

Usage:
  sudo ./scripts/bc250-cu-health-test.sh start   # full 20-WGP test
  ./scripts/bc250-cu-mask.sh --results results.tsv  # generate mask
  ./scripts/cu_map.sh --health results.tsv          # visual overlay

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 21:29:05 +00:00
root
5f147a89ff Improve patch: use stable context anchors for cross-version compatibility
The patch now uses amdgpu_gfx_parse_disable_cu + mutex_lock as context
anchors instead of line numbers. These function calls are present in
gfx_v10_0_get_cu_info() across all kernel versions (6.1+).

Removed fake git index hashes. Replaced em-dash with -- for ASCII safety.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 21:27:34 +00:00
root
956cee126c Add reproducible A/B/A benchmark script
Runs llama-bench pp512 at 24 CU, 40 CU, then 24 CU again with cooldown
between each state. Uses UMR to toggle SPI_PG_ENABLE_STATIC_WGP_MASK.
Auto-detects model, bench binary, and UMR paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 20:57:30 +00:00
root
562c9c66b2 Update patch: integrated CC + SPI + RLC writes in gfx_v10_0_get_cu_info
Single kernel patch now handles all three register writes during driver
init. No UMR or systemd service needed post-boot.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 20:37:51 +00:00
root
f8fcde6129 BC-250 40 CU unlock: kernel patch, build script, and documentation
Re-enable all 40 CUs on the AMD BC-250 (gfx1013 / Cyan Skillfish) via
two register writes during amdgpu driver init:

- CC_GC_SHADER_ARRAY_CONFIG: clears harvest enumeration mask
- SPI_PG_ENABLE_STATIC_WGP_MASK: enables hardware wave dispatch to all WGPs

Both required — neither alone is sufficient. Verified 1.61x compute
scaling at 1500MHz (pp512: 230 → 372 tok/s) via controlled A/B/A testing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 20:29:56 +00:00