Verified on LLVM 23.0.0git (ROCm/llvm-project@9f1cce5a); engine built from PR head.
export ROCKE_WORK=/some/scratch # needs:
# $ROCKE_WORK/src = <checkout>/dnn-providers/hip-kernel-provider/rocke/platform @ f19a5b09
# $ROCKE_WORK/build = dir containing rocke_engine*.so (build: round-1 gist, 01_build_engine.sh)
bash 06_validate_on_llvm23.sh # emit from both engines, validate each
bash 07_tests_pass_on_invalid_ir.sh # the PR's own tests, same code
bash 09_measure_fix_effect.sh # what each suggested change catches| case | engines agree? | LLVM 23 |
|---|---|---|
av_load_b128 |
identical | REJECTED '%p' ... 'ptr addrspace(1)' but expected 'ptr' |
av_store_b128 |
identical | REJECTED (same) |
s_prefetch_inst |
identical | REJECTED (same) |
buffer_load_lds_async |
identical | REJECTED '%lds_addr3' ... 'i64' but expected 'ptr addrspace(3)' |
global_load_async_to_lds |
DIFFER | C++ REJECTED use of undefined value '@stageB3...'; Python OK |
…while the PR's own tests report 4 passed.
| change | cost | catches |
|---|---|---|
run the suite once with ROCKE_BACKEND=both |
no code change | the C++/Python divergence — 1 failed / 31 passed, flags exactly test_global_load_async_to_lds_supports_b8_width |
08_suggested_fix_validate_ir.patch — llvm-as check in the shared _lower helper |
~10 lines, one function | all 5 defective cases; 27/32 still pass, no false positives |
Baseline for comparison: ROCKE_BACKEND unset / python / cpp all report 32 passed.
The patch skips silently when llvm-as is absent, so it is safe in environments without a
toolchain — though note it does introduce subprocess, which test_rocke.py:15 currently
disclaims ("no subprocess, no GPU"); gating it behind an env var would keep that contract.