Skip to content

feature: Add pseudo-GPU device compilation harness for pass verification - #550

Open
johnbowen42 wants to merge 1 commit into
mainfrom
feature/bowen/pseudo-gpu-harness
Open

johnbowen42 wants to merge 1 commit into
mainfrom
feature/bowen/pseudo-gpu-harness

Conversation

@johnbowen42

Copy link
Copy Markdown
Collaborator

Drive the real HIP device pipeline (clang -x hip targeting amdgcn) on machines without ROCm or a GPU. A minimal hip/hip_runtime.h stub plus -nogpuinc -nogpulib --offload-device-only lets unmodified GPU tests compile with ProteusPass loaded, so lambda kernel-arg and clobbering analysis decisions are verifiable ahead of time from the PROTEUS_DEBUG_OUTPUT pass trace. Verified against Homebrew LLVM 19 and 22: lambda_clobber_shapes reproduces all 12 expected decisions.

Known quirk handled by the driver: upstream clang registers -fpass-plugin pipeline callbacks twice for HIP device compiles (ROCm clang does not), so the second ProteusPass run dies on the duplicate _jit_bitcode global after analysis completes; the script treats exactly that fatal as benign.

Drive the real HIP device pipeline (clang -x hip targeting amdgcn) on
machines without ROCm or a GPU. A minimal hip/hip_runtime.h stub plus
-nogpuinc -nogpulib --offload-device-only lets unmodified GPU tests
compile with ProteusPass loaded, so lambda kernel-arg and clobbering
analysis decisions are verifiable ahead of time from the
PROTEUS_DEBUG_OUTPUT pass trace. Verified against Homebrew LLVM 19 and
22: lambda_clobber_shapes reproduces all 12 expected decisions.

Known quirk handled by the driver: upstream clang registers
-fpass-plugin pipeline callbacks twice for HIP device compiles (ROCm
clang does not), so the second ProteusPass run dies on the duplicate
_jit_bitcode global after analysis completes; the script treats exactly
that fatal as benign.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant