Files
mac-amdgpu/scripts/test-atomic-requester.sh
geramyloveless 8ec2e74656 Add isolated AtomicOp requester experiment and validate HRX compute
Save, change and verify only the endpoint requester bit under an exclusive idle session. Restore on explicit end and shutdown with readback, transaction draining and failure retention.

Compare unchanged staggered native atomic workloads with the requester off and on. Record driver190 mapping and contention measurements, verified scratch growth, and real HRX vector and matrix results. Correct HRX access grants for unmapped device memory.
2026-09-23 15:59:56 -07:00

17 lines
750 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
mkdir -p build/tests
python3 - <<'PY'
from pathlib import Path
s=Path('dext/MacAMDGPU.cpp').read_text()
a=s.index(' case kMacAMDGPUMethodAtomicRequesterExperiment:')
b=s.index(' case kMacAMDGPUMethodCollectMetrics:',a)
Path('build/tests/atomic_requester_rpc.inc').write_text(s[a:b])
assert 'kMacAMDGPUMethodAtomicRequesterExperiment = 60' in s
assert 'mac_amdgpu_quiesce_for_shutdown(ivars->retainedPCI,phase,&ivars->atomicRequester)' in s
PY
xcrun clang++ -std=c++20 -Wall -Wextra -Werror -fsanitize=address,undefined -fno-sanitize-recover=all \
-I dext/amdgpu -I build/tests tests/atomic_requester_test.cpp -o build/tests/atomic-requester-test
build/tests/atomic-requester-test