[GH-ISSUE #3358] [Engine] HIP virtual memory (0.2.0-beta): vmm_test memory fault on gfx1011 (BC-160) with ROCm 7.14 #1360

Closed
opened 2026-11-04 01:50:40 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @andyelka-creator on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3358

Area: [Engine]
Desktop app, Terminal or source? Source (a build)
Reproduction status: Reproduced locally
Strata version: Strata 0.2.0-beta · engine 0.1.45.3 (tag v0.2.0-beta, commit 3d1fb480)
Graphics card, memory and system: 3× AMD BC-160 (Navi 12, gfx1011, 8 GB HBM2 each) · 16 GB RAM · Ubuntu, kernel 7.0.0-38-generic (in-tree amdgpu), HIP 7.14.60850 from TheRock wheels rocm[libraries,devel]==7.14.0a20260608 (gfx101X-dgpu index)
Model, size and settings: none — this is ctest, no model was loaded

What happened

Re-test of #2374 on 0.2.0-beta. The original problem is fixed: hip_q2_zero gives 1024 values, 0 failures on all three cards.

vmm_test now fails. On 0.1.43.1 it reported Passed, but there vmm.cpp had no HIP path, so the test took its "skipped" branch. The HIP ranges from 3980a5ce are the first time it really runs on this card.

The failure is at the cudaMemset after a.map_range(3, 7, ...), which covers the chunks just remapped into the hole:

:0:rocdevice.cpp :3608: ... Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x743b89049000, kernel: __amd_rocclr_fillBufferAligned]
FAIL tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == cudaSuccess
FAIL tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G
FAIL tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess
vmm_test: FAILED

Kernel log at the same moment:

amdgpu 0000:09:00.0: [gfxhub] page fault (src_id:0 ring:40 vmid:8 pasid:2450)
amdgpu 0000:09:00.0: GCVM_L2_PROTECTION_FAULT_STATUS:0x00841051
amdgpu 0000:09:00.0:          Faulty UTCL2 client ID: TCP (0x8)
amdgpu 0000:09:00.0:          MORE_FAULTS: 0x1
amdgpu 0000:09:00.0:          PERMISSION_FAULTS: 0x5

There was no GPU reset, and the cards kept working afterwards.

Three runs per card, with nothing else on the GPUs:

card (HIP_VISIBLE_DEVICES) PCI passed
0 0000:03:00.0 1 of 3
1 0000:09:00.0 0 of 3
2 0000:0f:00.0 0 of 3

Page faults appear in the kernel log for all three cards. With STRATA_HIP_VMM=0 the test prints no CUDA device with virtual memory - skipped. I have not run --kv-grow with a model, so I do not know how this shows up in real use.

I have not found whether the cause is in Strata's mapping/access sequence or in ROCm 7.14 on gfx1011. The permission-fault status suggests the remapped chunks are mapped without read/write access, but that is only my reading of the status bits.

Smallest steps or command that reproduce it

cmake -G Ninja -S . -B build-hip -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF \
  -DSTRATA_BUILD_TESTS=ON -DSTRATA_PREFILL_MMQ=ON -DCMAKE_HIP_ARCHITECTURES=gfx1011
cmake --build build-hip
for d in 0 1 2; do for r in 1 2 3; do HIP_VISIBLE_DEVICES=$d build-hip/vmm_test; done; done

Other ctest results on this build (same machine, for completeness)

ctest per card, excluding ple_parity and platform_memory_test: 133 tests. Card 0: 5 failed; cards 1 and 2: 6 failed (the extra one is vmm_test). The others are the same on all three cards and look like test or build issues, not the card:

  • native_hadamard_test, tq_cpu_parity, tq_cpu_parity_avx2 print this ggml has no trellis types (build with STRATA_GGML_DIR = the agention fork) and exit as failed rather than skipped.
  • hip_prefill_mmq_parity: the Q2_0 products pass (rel_l2 ≈ 0.0005–0.0013), then MMQ parity screen failed: basic_string: construction from null is not valid. From the source, the trellis loop sees supported(145) as true, while this ggml has no name for type 145, so std::string tn = ggml_type_name(t) gets null. This is from reading the code; I did not debug it further.
  • isa_guard_check: VIOLATION strata::kernels::cpu::tq_detail::tq_rows_avx512(...) (530 wide instructions, first vmovdqa32): wide-ISA code outside the wide-ISA translation unit.

Skipped as expected for RDNA1 / this host: the WMMA, hipBLASLt, rocBLAS and fused prefill tests, qsa_scores_gfx1100_parity, expert_cache_segmented_test, expert_multi_test.

Logs

vmm_test, 3 runs per card (vmm.out)
dev 0:
  run 1: vmm_test: ok|
  run 2: :0:rocdevice.cpp            :3608: 50677180454 us:  Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x79cb65240000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED|
  run 3: :0:rocdevice.cpp            :3608: 50679348459 us:  Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x7c9e36e01000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED|
dev 1:
  run 1: :0:rocdevice.cpp            :3608: 50681642604 us:  Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x7f93d5017000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED|
  run 2: :0:rocdevice.cpp            :3608: 50683826731 us:  Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x77dfff027000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED|
  run 3: :0:rocdevice.cpp            :3608: 50686011166 us:  Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x7cfb1360b000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED|
dev 2:
  run 1: :0:rocdevice.cpp            :3608: 50688301723 us:  Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x7a58c9215000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED|
  run 2: :0:rocdevice.cpp            :3608: 50690483507 us:  Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x708a01e05000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED|
  run 3: :0:rocdevice.cpp            :3608: 50692662099 us:  Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x741bbe80e000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED|
PCI bus of HIP_VISIBLE_DEVICES=0,1,2 (hipDeviceGetPCIBusId): 0000:03:00.0 0000:09:00.0 0000:0f:00.0 
"page fault" lines in the kernel log during these runs:      10 0000:03:00.0      10 0000:09:00.0      10 0000:0f:00.0 
ctest output of the failed tests, card 2 (excerpt of LastTest.log)
19/133 Testing: vmm_test
19/133 Test: vmm_test
Output:
VGPU=0x5e8c6f370910 SWq=0x743b991ce000, HWq=0x743b88200000, id=1
	Dispatch Header =0x1502 (type=2, barrier=1, acquire=2, release=2), setup=1
	grid=[4608, 1, 1], workgroup=[256, 1, 1]
	private_seg_size=0, group_seg_size=0
	kernel_obj=0x743b991be4c0, kernarg_address=0x0x743b80c00100
	completion_signal=0x0, correlation_id=0
	rptr=2, wptr=4
:0:rocdevice.cpp            :3608: 26887096612 us:  Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x743b89049000, kernel: __amd_rocclr_fillBufferAligned]
FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == cudaSuccess
FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G
FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess
vmm_test: FAILED
Test time =   2.18 sec
Test Failed.

119/133 Testing: hip_prefill_mmq_parity
119/133 Test: hip_prefill_mmq_parity
Output:
synthetic-Q2_0-GU-pass0: type=42 rows=7 experts=3 ref_rms=1.98041 rel_l2=0.00106754 max_abs/ref_rms=0.00380476 zero_row_max=0
synthetic-Q2_0-down-pass0: type=42 rows=7 experts=3 ref_rms=2.10697 rel_l2=0.000617685 max_abs/ref_rms=0.00253579 zero_row_max=0
synthetic-Q2_0-GU-pass1: type=42 rows=7 experts=3 ref_rms=1.98512 rel_l2=0.0011973 max_abs/ref_rms=0.00416649 zero_row_max=0
synthetic-Q2_0-down-pass1: type=42 rows=7 experts=3 ref_rms=2.12958 rel_l2=0.000538054 max_abs/ref_rms=0.00216068 zero_row_max=0
synthetic-Q2_0-GU-pass2: type=42 rows=5 experts=2 ref_rms=1.90121 rel_l2=0.00125928 max_abs/ref_rms=0.00443003 zero_row_max=0
synthetic-Q2_0-down-pass2: type=42 rows=5 experts=2 ref_rms=2.0192 rel_l2=0.000491595 max_abs/ref_rms=0.00196968 zero_row_max=0
synthetic-Q4_K skipped: not built (STRATA_MMQ_KQUANTS off?)
synthetic-Q5_K skipped: not built (STRATA_MMQ_KQUANTS off?)
synthetic-Q6_K skipped: not built (STRATA_MMQ_KQUANTS off?)
synthetic-Q5_1 skipped: not built (STRATA_MMQ_KQUANTS off?)
MMQ parity screen failed: basic_string: construction from null is not valid
Test time =   0.98 sec
Test Failed.

124/133 Testing: native_hadamard_test
124/133 Test: native_hadamard_test
Output:
this ggml has no trellis types (build with STRATA_GGML_DIR = the agention fork)
FWHT vs dense normalized Sylvester matrix: max abs diff 3.35e-07  ok
Test time =   0.00 sec
Test Failed.

125/133 Testing: tq_cpu_parity
125/133 Test: tq_cpu_parity
Output:
this ggml has no trellis types (build with STRATA_GGML_DIR = the agention llama.cpp fork)
Test time =   0.00 sec
Test Failed.

126/133 Testing: tq_cpu_parity_avx2
126/133 Test: tq_cpu_parity_avx2
Output:
this ggml has no trellis types (build with STRATA_GGML_DIR = the agention llama.cpp fork)
Test time =   0.01 sec
Test Failed.

131/133 Testing: isa_guard_check
131/133 Test: isa_guard_check
Output:
check_isa_guard: /home/codex/strata020/build-hip/libstrata_kernels_cpu.a: 477 functions, 69 hold wide-ISA instructions, 1 not allowed
  VIOLATION strata::kernels::cpu::tq_detail::tq_rows_avx512(int, unsigned char const*, unsigned long, int, strata::kernels::cpu::tq_detail::TqAct const* const*, int, float* (530 wide instructions, first vmovdqa32): wide-ISA code outside the wide-ISA translation units (object tq_avx512.cpp.o) [tq_avx512.cpp.o]
Test time =   1.37 sec
Test Failed.

Originally created by @andyelka-creator on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3358 **Area:** [Engine] **Desktop app, Terminal or source?** Source (a build) **Reproduction status:** Reproduced locally **Strata version:** Strata 0.2.0-beta · engine 0.1.45.3 (tag `v0.2.0-beta`, commit `3d1fb480`) **Graphics card, memory and system:** 3× AMD BC-160 (Navi 12, gfx1011, 8 GB HBM2 each) · 16 GB RAM · Ubuntu, kernel 7.0.0-38-generic (in-tree amdgpu), HIP 7.14.60850 from TheRock wheels `rocm[libraries,devel]==7.14.0a20260608` (`gfx101X-dgpu` index) **Model, size and settings:** none — this is `ctest`, no model was loaded ### What happened Re-test of #2374 on 0.2.0-beta. The original problem is fixed: `hip_q2_zero` gives 1024 values, 0 failures on all three cards. `vmm_test` now fails. On 0.1.43.1 it reported Passed, but there `vmm.cpp` had no HIP path, so the test took its "skipped" branch. The HIP ranges from 3980a5ce are the first time it really runs on this card. The failure is at the `cudaMemset` after `a.map_range(3, 7, ...)`, which covers the chunks just remapped into the hole: ``` :0:rocdevice.cpp :3608: ... Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x743b89049000, kernel: __amd_rocclr_fillBufferAligned] FAIL tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == cudaSuccess FAIL tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G FAIL tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess vmm_test: FAILED ``` Kernel log at the same moment: ``` amdgpu 0000:09:00.0: [gfxhub] page fault (src_id:0 ring:40 vmid:8 pasid:2450) amdgpu 0000:09:00.0: GCVM_L2_PROTECTION_FAULT_STATUS:0x00841051 amdgpu 0000:09:00.0: Faulty UTCL2 client ID: TCP (0x8) amdgpu 0000:09:00.0: MORE_FAULTS: 0x1 amdgpu 0000:09:00.0: PERMISSION_FAULTS: 0x5 ``` There was no GPU reset, and the cards kept working afterwards. Three runs per card, with nothing else on the GPUs: | card (`HIP_VISIBLE_DEVICES`) | PCI | passed | |---|---|---| | 0 | 0000:03:00.0 | 1 of 3 | | 1 | 0000:09:00.0 | 0 of 3 | | 2 | 0000:0f:00.0 | 0 of 3 | Page faults appear in the kernel log for all three cards. With `STRATA_HIP_VMM=0` the test prints `no CUDA device with virtual memory - skipped`. I have not run `--kv-grow` with a model, so I do not know how this shows up in real use. I have not found whether the cause is in Strata's mapping/access sequence or in ROCm 7.14 on gfx1011. The permission-fault status suggests the remapped chunks are mapped without read/write access, but that is only my reading of the status bits. ### Smallest steps or command that reproduce it ``` cmake -G Ninja -S . -B build-hip -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF \ -DSTRATA_BUILD_TESTS=ON -DSTRATA_PREFILL_MMQ=ON -DCMAKE_HIP_ARCHITECTURES=gfx1011 cmake --build build-hip for d in 0 1 2; do for r in 1 2 3; do HIP_VISIBLE_DEVICES=$d build-hip/vmm_test; done; done ``` ### Other ctest results on this build (same machine, for completeness) `ctest` per card, excluding `ple_parity` and `platform_memory_test`: 133 tests. Card 0: 5 failed; cards 1 and 2: 6 failed (the extra one is `vmm_test`). The others are the same on all three cards and look like test or build issues, not the card: - `native_hadamard_test`, `tq_cpu_parity`, `tq_cpu_parity_avx2` print `this ggml has no trellis types (build with STRATA_GGML_DIR = the agention fork)` and exit as failed rather than skipped. - `hip_prefill_mmq_parity`: the Q2_0 products pass (`rel_l2` ≈ 0.0005–0.0013), then `MMQ parity screen failed: basic_string: construction from null is not valid`. From the source, the trellis loop sees `supported(145)` as true, while this ggml has no name for type 145, so `std::string tn = ggml_type_name(t)` gets null. This is from reading the code; I did not debug it further. - `isa_guard_check`: `VIOLATION strata::kernels::cpu::tq_detail::tq_rows_avx512(...) (530 wide instructions, first vmovdqa32): wide-ISA code outside the wide-ISA translation unit`. Skipped as expected for RDNA1 / this host: the WMMA, hipBLASLt, rocBLAS and fused prefill tests, `qsa_scores_gfx1100_parity`, `expert_cache_segmented_test`, `expert_multi_test`. ### Logs <details><summary>vmm_test, 3 runs per card (vmm.out)</summary> ``` dev 0: run 1: vmm_test: ok| run 2: :0:rocdevice.cpp :3608: 50677180454 us: Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x79cb65240000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED| run 3: :0:rocdevice.cpp :3608: 50679348459 us: Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x7c9e36e01000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED| dev 1: run 1: :0:rocdevice.cpp :3608: 50681642604 us: Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x7f93d5017000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED| run 2: :0:rocdevice.cpp :3608: 50683826731 us: Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x77dfff027000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED| run 3: :0:rocdevice.cpp :3608: 50686011166 us: Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x7cfb1360b000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED| dev 2: run 1: :0:rocdevice.cpp :3608: 50688301723 us: Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x7a58c9215000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED| run 2: :0:rocdevice.cpp :3608: 50690483507 us: Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x708a01e05000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED| run 3: :0:rocdevice.cpp :3608: 50692662099 us: Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x741bbe80e000, kernel: __|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == c|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G|FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess|vmm_test: FAILED| PCI bus of HIP_VISIBLE_DEVICES=0,1,2 (hipDeviceGetPCIBusId): 0000:03:00.0 0000:09:00.0 0000:0f:00.0 "page fault" lines in the kernel log during these runs: 10 0000:03:00.0 10 0000:09:00.0 10 0000:0f:00.0 ``` </details> <details><summary>ctest output of the failed tests, card 2 (excerpt of LastTest.log)</summary> ``` 19/133 Testing: vmm_test 19/133 Test: vmm_test Output: VGPU=0x5e8c6f370910 SWq=0x743b991ce000, HWq=0x743b88200000, id=1 Dispatch Header =0x1502 (type=2, barrier=1, acquire=2, release=2), setup=1 grid=[4608, 1, 1], workgroup=[256, 1, 1] private_seg_size=0, group_seg_size=0 kernel_obj=0x743b991be4c0, kernarg_address=0x0x743b80c00100 completion_signal=0x0, correlation_id=0 rptr=2, wptr=4 :0:rocdevice.cpp :3608: 26887096612 us: Memory Fault Error [host: bc160, GPU index: 0, faulting addr: 0x743b89049000, kernel: __amd_rocclr_fillBufferAligned] FAIL /home/codex/strata020/tests/core/vmm_test.cpp:57: cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == cudaSuccess FAIL /home/codex/strata020/tests/core/vmm_test.cpp:67: f1 >= f0 + 8 * G FAIL /home/codex/strata020/tests/core/vmm_test.cpp:68: cudaGetLastError() == cudaSuccess vmm_test: FAILED Test time = 2.18 sec Test Failed. 119/133 Testing: hip_prefill_mmq_parity 119/133 Test: hip_prefill_mmq_parity Output: synthetic-Q2_0-GU-pass0: type=42 rows=7 experts=3 ref_rms=1.98041 rel_l2=0.00106754 max_abs/ref_rms=0.00380476 zero_row_max=0 synthetic-Q2_0-down-pass0: type=42 rows=7 experts=3 ref_rms=2.10697 rel_l2=0.000617685 max_abs/ref_rms=0.00253579 zero_row_max=0 synthetic-Q2_0-GU-pass1: type=42 rows=7 experts=3 ref_rms=1.98512 rel_l2=0.0011973 max_abs/ref_rms=0.00416649 zero_row_max=0 synthetic-Q2_0-down-pass1: type=42 rows=7 experts=3 ref_rms=2.12958 rel_l2=0.000538054 max_abs/ref_rms=0.00216068 zero_row_max=0 synthetic-Q2_0-GU-pass2: type=42 rows=5 experts=2 ref_rms=1.90121 rel_l2=0.00125928 max_abs/ref_rms=0.00443003 zero_row_max=0 synthetic-Q2_0-down-pass2: type=42 rows=5 experts=2 ref_rms=2.0192 rel_l2=0.000491595 max_abs/ref_rms=0.00196968 zero_row_max=0 synthetic-Q4_K skipped: not built (STRATA_MMQ_KQUANTS off?) synthetic-Q5_K skipped: not built (STRATA_MMQ_KQUANTS off?) synthetic-Q6_K skipped: not built (STRATA_MMQ_KQUANTS off?) synthetic-Q5_1 skipped: not built (STRATA_MMQ_KQUANTS off?) MMQ parity screen failed: basic_string: construction from null is not valid Test time = 0.98 sec Test Failed. 124/133 Testing: native_hadamard_test 124/133 Test: native_hadamard_test Output: this ggml has no trellis types (build with STRATA_GGML_DIR = the agention fork) FWHT vs dense normalized Sylvester matrix: max abs diff 3.35e-07 ok Test time = 0.00 sec Test Failed. 125/133 Testing: tq_cpu_parity 125/133 Test: tq_cpu_parity Output: this ggml has no trellis types (build with STRATA_GGML_DIR = the agention llama.cpp fork) Test time = 0.00 sec Test Failed. 126/133 Testing: tq_cpu_parity_avx2 126/133 Test: tq_cpu_parity_avx2 Output: this ggml has no trellis types (build with STRATA_GGML_DIR = the agention llama.cpp fork) Test time = 0.01 sec Test Failed. 131/133 Testing: isa_guard_check 131/133 Test: isa_guard_check Output: check_isa_guard: /home/codex/strata020/build-hip/libstrata_kernels_cpu.a: 477 functions, 69 hold wide-ISA instructions, 1 not allowed VIOLATION strata::kernels::cpu::tq_detail::tq_rows_avx512(int, unsigned char const*, unsigned long, int, strata::kernels::cpu::tq_detail::TqAct const* const*, int, float* (530 wide instructions, first vmovdqa32): wide-ISA code outside the wide-ISA translation units (object tq_avx512.cpp.o) [tq_avx512.cpp.o] Test time = 1.37 sec Test Failed. ``` </details>
bsakaguchi 2026-11-04 01:50:40 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 20, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Fill in "Area".
  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6283596540 --> @github-actions[bot] commented on GitHub (Oct 20, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Fill in "Area". - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@Niko1221 commented on GitHub (Oct 21, 2026):

Thank you for the careful re-test, and for the table per card.

The three test problems you listed are fixed for 0.2.2, the next release (not out yet): the trellis tests are skipped (not failed) when the ggml has no trellis types, hip_prefill_mmq_parity no longer crashes on the missing type name, and isa_guard_check knows the trellis AVX-512 rows.

The vmm_test memory fault on gfx1011 is not fixed. We have no card like yours to try it on. Your reading (the remapped chunks are mapped without read/write access) is the first thing we will check in vmm.cpp. Since --kv-grow is the only user, it should be off on this card. If you run it with --kv-grow and a small model, please tell us whether it starts and what the log says.

<!-- gh-comment-id:6308096442 --> @Niko1221 commented on GitHub (Oct 21, 2026): Thank you for the careful re-test, and for the table per card. The three test problems you listed are fixed for 0.2.2, the next release (not out yet): the trellis tests are skipped (not failed) when the ggml has no trellis types, `hip_prefill_mmq_parity` no longer crashes on the missing type name, and `isa_guard_check` knows the trellis AVX-512 rows. The `vmm_test` memory fault on gfx1011 is not fixed. We have no card like yours to try it on. Your reading (the remapped chunks are mapped without read/write access) is the first thing we will check in `vmm.cpp`. Since `--kv-grow` is the only user, it should be off on this card. If you run it with `--kv-grow` and a small model, please tell us whether it starts and what the log says.
Author
Owner

@andyelka-creator commented on GitHub (Oct 21, 2026):

Thanks. I can't run --kv-grow with a model here. This box has 16 GB of RAM, and as I read DETAILS.md, --kv-grow needs every expert in RAM and is only on the Flash-Next path, so the engine would just print "--kv-grow is off". The other machine has MI50s (gfx906), where vmm.cpp is compiled out. So instead I checked your first suspect in vmm_test itself, with a few switches added to a local copy of 0.2.0-beta (diff below). Each line is 3 runs on each of the 3 cards (9 runs), with nothing else on the GPUs.

Access looks fine. The failing part is one hipMemset across several chunks.

variant passed
unchanged 1/9
hipMemSetAccess per chunk instead of once per run 0/9
hipDeviceSynchronize() after hipMemSetAccess 0/9
both 0/9
  • Every hipMemSetAccess returns hipSuccess, for [0,6), [0,2) (range b) and [4,7).
  • In every fault I printed (the first run of each failing variant on each card, 11 faults), the faulting address is in chunk 5 or 6 (offset from a.base() / 2 MiB), never in chunk 4, where the 6 MiB memset starts.

Separate probes on a fresh range: reserve 3 chunks, map_range(0, 3), nothing ever unmapped or moved.

probe passed
one cudaMemset over all 3 chunks (6 MiB) 4/9
one cudaMemcpy host→device over the same 6 MiB 9/9
cudaMemset chunk by chunk (3 × 2 MiB) 9/9
one 2 MiB cudaMemset straddling the chunk 0/1 boundary 9/9

So remapping is not needed to get the fault. A single fill of 6 MiB over three separately created and mapped chunks faults (__amd_rocclr_fillBufferAligned, kernel log PERMISSION_FAULTS: 0x5), while a copy over the same range and fills of one chunk each do not. In the original scenario, filling chunks 4, 5 and 6 one by one first passed in 7 of 9 runs, and the 6 MiB memset after it then passed too. The 2 runs that failed were both on card 0.

My guess, not verified: this is in ROCclr's fill path for VMM ranges that span several physical allocations, not in vmm.cpp's map/access sequence. If so, what matters for --kv-grow is whether Strata's own kernels write across chunk boundaries correctly. vmm_test does not show that, and I have not tested it. A test that writes through the range with a plain kernel instead of cudaMemset would tell. I can run it here if you add one.

Same build as before: 0.2.0-beta 3d1fb480, 3× BC-160 gfx1011, HIP 7.14.60850 (TheRock gfx101X-dgpu), kernel 7.0.0-38. No GPU resets.

Probe switches (diff against v0.2.0-beta)
diff --git a/src/core/vmm.cpp b/src/core/vmm.cpp
index 3336a49d..483a26d5 100644
--- a/src/core/vmm.cpp
+++ b/src/core/vmm.cpp
@@ -274,8 +274,17 @@ bool VmmRange::set_access(int64_t lo, int64_t hi) {
     d.location.type = hipMemLocationTypeDevice;
     d.location.id = a.dev;
     d.flags = hipMemAccessFlagsProtReadWrite;
-    const hipError_t e = hipMemSetAccess((void*) (uintptr_t) (base_ + (uint64_t) lo * a.gran), (size_t) ((uint64_t) (hi - lo) * a.gran),
-                                         &d, 1);
+    static const bool per_chunk = [] { const char* x = std::getenv("XVMM_PER_CHUNK"); return x && x[0] == '1'; }();
+    static const bool sync_after = [] { const char* x = std::getenv("XVMM_SYNC"); return x && x[0] == '1'; }();
+    hipError_t e = hipSuccess;
+    if (per_chunk) {
+        for (int64_t c = lo; c < hi && e == hipSuccess; ++c)
+            e = hipMemSetAccess((void*) (uintptr_t) (base_ + (uint64_t) c * a.gran), (size_t) a.gran, &d, 1);
+    } else {
+        e = hipMemSetAccess((void*) (uintptr_t) (base_ + (uint64_t) lo * a.gran), (size_t) ((uint64_t) (hi - lo) * a.gran), &d, 1);
+    }
+    if (std::getenv("XVMM_TRACE")) std::fprintf(stderr, "set_access [%lld,%lld) rc=%d\n", (long long) lo, (long long) hi, (int) e);
+    if (e == hipSuccess && sync_after) e = hipDeviceSynchronize();
     const bool ok = e == hipSuccess;
     if (!ok) fail("hipMemSetAccess", e);
     return ok;
diff --git a/tests/core/vmm_test.cpp b/tests/core/vmm_test.cpp
index 5f5d8598..2baeec18 100644
--- a/tests/core/vmm_test.cpp
+++ b/tests/core/vmm_test.cpp
@@ -6,6 +6,7 @@
 
 #include <chrono>
 #include <cstdio>
+#include <cstdlib>
 #include <thread>
 #include <vector>
 
@@ -22,6 +23,20 @@ int main() {
     }
     const uint64_t G = strata::core::vmm_granularity();
     CHECK(G >= 4096);
+    if (const char* m = std::getenv("XVMM_MODE")) {   // separate probes, without the main scenario
+        const int n = 3;
+        VmmRange c;
+        CHECK(c.reserve(n * G) && c.map_range(0, n, [] { return (VmmChunk) 0; }));
+        bool ok = true;
+        if (m[0] == 'f') ok = cudaMemset(c.base(), 7, n * G) == cudaSuccess;                      // fresh chunks, one fill
+        if (m[0] == 'c') { std::vector<uint8_t> h(n * G, 7); ok = cudaMemcpy(c.base(), h.data(), h.size(), cudaMemcpyHostToDevice) == cudaSuccess; }
+        if (m[0] == 'k') for (int i = 0; i < n && ok; ++i) ok = cudaMemset(c.base() + i * G, 7, G) == cudaSuccess;   // chunk by chunk
+        if (m[0] == 'h') ok = cudaMemset(c.base() + G / 2, 7, G) == cudaSuccess;                  // 2 MiB across the chunk 0|1 boundary
+        ok = ok && cudaDeviceSynchronize() == cudaSuccess;
+        std::printf("vmm_test mode %s: %s\n", m, ok ? "ok" : "FAULT");
+        c.release();
+        return ok ? 0 : 1;
+    }
     VmmRange a, b;
     CHECK(a.reserve(8 * G + 1));   // rounds up
     CHECK(a.chunks() == 9);
@@ -54,6 +69,14 @@ int main() {
     for (uint64_t i = 0; i < 4 * G; ++i) same = same && back[i] == h[i];
     CHECK(same);
     CHECK(a.map_range(3, 7, [] { return (VmmChunk) 0; }) && a.mapped_count() == 7);
+    std::fprintf(stderr, "a.base=%p G=%llu\n", (void*) a.base(), (unsigned long long) G);
+    if (std::getenv("XVMM_PROBE")) {   // one chunk at a time: 4, 5 (moved out and back), 6 (new)
+        for (int c = 4; c < 7; ++c) {
+            const bool ok = cudaMemset(a.base() + c * G, 7, G) == cudaSuccess && cudaDeviceSynchronize() == cudaSuccess;
+            std::fprintf(stderr, "probe chunk %d: %s\n", c, ok ? "ok" : "FAULT");
+            if (!ok) break;
+        }
+    }
     CHECK(cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == cudaSuccess);
     size_t f0 = 0, f1 = 0, t = 0;
     cudaMemGetInfo(&f0, &t);
<!-- gh-comment-id:6309118752 --> @andyelka-creator commented on GitHub (Oct 21, 2026): Thanks. I can't run `--kv-grow` with a model here. This box has 16 GB of RAM, and as I read DETAILS.md, `--kv-grow` needs every expert in RAM and is only on the Flash-Next path, so the engine would just print "--kv-grow is off". The other machine has MI50s (gfx906), where `vmm.cpp` is compiled out. So instead I checked your first suspect in `vmm_test` itself, with a few switches added to a local copy of 0.2.0-beta (diff below). Each line is 3 runs on each of the 3 cards (9 runs), with nothing else on the GPUs. **Access looks fine. The failing part is one `hipMemset` across several chunks.** | variant | passed | |---|---| | unchanged | 1/9 | | `hipMemSetAccess` per chunk instead of once per run | 0/9 | | `hipDeviceSynchronize()` after `hipMemSetAccess` | 0/9 | | both | 0/9 | - Every `hipMemSetAccess` returns `hipSuccess`, for `[0,6)`, `[0,2)` (range b) and `[4,7)`. - In every fault I printed (the first run of each failing variant on each card, 11 faults), the faulting address is in chunk 5 or 6 (offset from `a.base()` / 2 MiB), never in chunk 4, where the 6 MiB memset starts. Separate probes on a fresh range: reserve 3 chunks, `map_range(0, 3)`, nothing ever unmapped or moved. | probe | passed | |---|---| | one `cudaMemset` over all 3 chunks (6 MiB) | 4/9 | | one `cudaMemcpy` host→device over the same 6 MiB | 9/9 | | `cudaMemset` chunk by chunk (3 × 2 MiB) | 9/9 | | one 2 MiB `cudaMemset` straddling the chunk 0/1 boundary | 9/9 | So remapping is not needed to get the fault. A single fill of 6 MiB over three separately created and mapped chunks faults (`__amd_rocclr_fillBufferAligned`, kernel log `PERMISSION_FAULTS: 0x5`), while a copy over the same range and fills of one chunk each do not. In the original scenario, filling chunks 4, 5 and 6 one by one first passed in 7 of 9 runs, and the 6 MiB memset after it then passed too. The 2 runs that failed were both on card 0. My guess, not verified: this is in ROCclr's fill path for VMM ranges that span several physical allocations, not in `vmm.cpp`'s map/access sequence. If so, what matters for `--kv-grow` is whether Strata's own kernels write across chunk boundaries correctly. `vmm_test` does not show that, and I have not tested it. A test that writes through the range with a plain kernel instead of `cudaMemset` would tell. I can run it here if you add one. Same build as before: 0.2.0-beta `3d1fb480`, 3× BC-160 gfx1011, HIP 7.14.60850 (TheRock `gfx101X-dgpu`), kernel 7.0.0-38. No GPU resets. <details><summary>Probe switches (diff against v0.2.0-beta)</summary> ```diff diff --git a/src/core/vmm.cpp b/src/core/vmm.cpp index 3336a49d..483a26d5 100644 --- a/src/core/vmm.cpp +++ b/src/core/vmm.cpp @@ -274,8 +274,17 @@ bool VmmRange::set_access(int64_t lo, int64_t hi) { d.location.type = hipMemLocationTypeDevice; d.location.id = a.dev; d.flags = hipMemAccessFlagsProtReadWrite; - const hipError_t e = hipMemSetAccess((void*) (uintptr_t) (base_ + (uint64_t) lo * a.gran), (size_t) ((uint64_t) (hi - lo) * a.gran), - &d, 1); + static const bool per_chunk = [] { const char* x = std::getenv("XVMM_PER_CHUNK"); return x && x[0] == '1'; }(); + static const bool sync_after = [] { const char* x = std::getenv("XVMM_SYNC"); return x && x[0] == '1'; }(); + hipError_t e = hipSuccess; + if (per_chunk) { + for (int64_t c = lo; c < hi && e == hipSuccess; ++c) + e = hipMemSetAccess((void*) (uintptr_t) (base_ + (uint64_t) c * a.gran), (size_t) a.gran, &d, 1); + } else { + e = hipMemSetAccess((void*) (uintptr_t) (base_ + (uint64_t) lo * a.gran), (size_t) ((uint64_t) (hi - lo) * a.gran), &d, 1); + } + if (std::getenv("XVMM_TRACE")) std::fprintf(stderr, "set_access [%lld,%lld) rc=%d\n", (long long) lo, (long long) hi, (int) e); + if (e == hipSuccess && sync_after) e = hipDeviceSynchronize(); const bool ok = e == hipSuccess; if (!ok) fail("hipMemSetAccess", e); return ok; diff --git a/tests/core/vmm_test.cpp b/tests/core/vmm_test.cpp index 5f5d8598..2baeec18 100644 --- a/tests/core/vmm_test.cpp +++ b/tests/core/vmm_test.cpp @@ -6,6 +6,7 @@ #include <chrono> #include <cstdio> +#include <cstdlib> #include <thread> #include <vector> @@ -22,6 +23,20 @@ int main() { } const uint64_t G = strata::core::vmm_granularity(); CHECK(G >= 4096); + if (const char* m = std::getenv("XVMM_MODE")) { // separate probes, without the main scenario + const int n = 3; + VmmRange c; + CHECK(c.reserve(n * G) && c.map_range(0, n, [] { return (VmmChunk) 0; })); + bool ok = true; + if (m[0] == 'f') ok = cudaMemset(c.base(), 7, n * G) == cudaSuccess; // fresh chunks, one fill + if (m[0] == 'c') { std::vector<uint8_t> h(n * G, 7); ok = cudaMemcpy(c.base(), h.data(), h.size(), cudaMemcpyHostToDevice) == cudaSuccess; } + if (m[0] == 'k') for (int i = 0; i < n && ok; ++i) ok = cudaMemset(c.base() + i * G, 7, G) == cudaSuccess; // chunk by chunk + if (m[0] == 'h') ok = cudaMemset(c.base() + G / 2, 7, G) == cudaSuccess; // 2 MiB across the chunk 0|1 boundary + ok = ok && cudaDeviceSynchronize() == cudaSuccess; + std::printf("vmm_test mode %s: %s\n", m, ok ? "ok" : "FAULT"); + c.release(); + return ok ? 0 : 1; + } VmmRange a, b; CHECK(a.reserve(8 * G + 1)); // rounds up CHECK(a.chunks() == 9); @@ -54,6 +69,14 @@ int main() { for (uint64_t i = 0; i < 4 * G; ++i) same = same && back[i] == h[i]; CHECK(same); CHECK(a.map_range(3, 7, [] { return (VmmChunk) 0; }) && a.mapped_count() == 7); + std::fprintf(stderr, "a.base=%p G=%llu\n", (void*) a.base(), (unsigned long long) G); + if (std::getenv("XVMM_PROBE")) { // one chunk at a time: 4, 5 (moved out and back), 6 (new) + for (int c = 4; c < 7; ++c) { + const bool ok = cudaMemset(a.base() + c * G, 7, G) == cudaSuccess && cudaDeviceSynchronize() == cudaSuccess; + std::fprintf(stderr, "probe chunk %d: %s\n", c, ok ? "ok" : "FAULT"); + if (!ok) break; + } + } CHECK(cudaMemset(a.base() + 4 * G, 7, 3 * G) == cudaSuccess && cudaDeviceSynchronize() == cudaSuccess); size_t f0 = 0, f1 = 0, t = 0; cudaMemGetInfo(&f0, &t); ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1360
No description provided.