Issue |
127241
|
Summary |
[AMDGPU] error running program when compiled with asan
|
Labels |
new issue
|
Assignees |
|
Reporter |
zyx-billy
|
I'm working on adding asan when emitting for amd gpus using the upstream llvm backend. Right now I'm doing these things:
- Add +xnack to target features
- Enable AddressSanitizerPass in the llvm pipeline
And when running the program, I explicitly link the asan libraries, and enable xnack:
```
LD_PRELOAD=/opt/rocm/lib/llvm/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.so:/opt/rocm/lib/asan/libamdhip64.so
ASAN_OPTIONS=detect_leaks=0
HSA_XNACK=1
```
But I run into this error when trying to invoke a kernel:
```
hipErrorNoBinaryForGpu (no kernel image is available for execution on the device)
```
Removing the asan llvm pass makes the program run fine (but of course, it won't detect any errors), indicating that everything else seems to work. I also tried linking asanrtl.bc, ocml.bc, & ockl.bc into the IR before running llvm passes (following the impl [here](https://github.com/triton-lang/triton/pull/5127/files)), but got the same error.
My questions are:
- Are there any other configs that should be set when compiling?
- Is there any way to tell what exactly is incompatible when running? That'll help narrow down what to do.
Happy to provide more context. Thank you!
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs