-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
I have been working on a branch (shoaibkamil/webgpu_update_mini_webgpu) that is updating WebGPU support, starting first with updating to the latest version of Dawn. Using the instructions in doc/WebGPU.md results in a crash when executing any Native Dawn WebGPU test in JIT mode on my arm64 macOS machine. After much debugging/tracing, I believe the issue boils down to an ABI mismatch: Halide appears to pass a parameter in a register, while the loaded Dawn dylib expects the function to be passed on the stack, resulting in a memory access violation.
I believe this is because our "generic" compilation for the runtime uses x86_64 and either Apple's Darwin ABI or the arm64 base ABI have different rules for when structs get passed on the stack vs in registers. However, I haven't yet created a minimal case.
The easiest repro is to build Dawn (following instructions in doc/WebGPU.md on macOS ARM, and then to checkout my branch, build Halide, and try to execute correctness_hello_gpu or any other GPU pipeline.