| Issue |
60602
|
| Summary |
[Openmp] Segmentation fault on goulash on amdgpu
|
| Labels |
openmp
|
| Assignees |
|
| Reporter |
dhruvachak
|
This is reproducible with top of trunk. It seems to have started after https://reviews.llvm.org/rG16a385ba21a921a42009ff971199bce56eb2a86e and
https://reviews.llvm.org/rG3820d0eaaf4ecb557cbb260e34bf5a9eeb51e0e7 landed.
It fails with both the old and the nextgen plugin.
Here are the steps:
Get the repo from https://github.com/LLNL/goulash
`
$ cd goulash/tests/rush_larsen/rush_larsen_gpu_omp
$ clang++ -DCOMPILERID=amd -O2 -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx90a -DOMP -DOMP_TARGET_GPU rush_larsen_gpu_omp.cc -o rush_larsen_gpu_omp
$ $ ./rush_larsen_gpu_omp 100000 .00000001
0.000 (0.000s): --------------- Begin rush_larsen_gpu_omp [amd] (timer zeroed) ---------------
0.000 (0.000s): START Rush Larsen 100000 0.00000001 cells 1 gpu_omp [amd]
0.000 (0.000s): Version 2.0 RC1 (7/21/21)
0.000 (0.000s): Selecting GPU 0 as default device
0.000 (0.000s): Launching OpenMP GPU test kernel
0.015 (0.015s): Verified OpenMP target test kernel ran on GPU
0.015 (0.000s): Allocating and initializing kernel arrays
0.015 (0.000s): Starting omp data map of CPU arrays to GPU
0.015 (0.000s): Finished omp data map of CPU arrays to GPU
0.015 (0.000s): Launching warmup iteration (not included in kernel timings)
0.015 (0.000s): Starting kernel timings for Rush Larsen 100000 0.00000001
0.015 (0.000s): Starting iteration 1
0.137 (0.122s): Starting iteration 10001
0.259 (0.122s): Starting iteration 20001
0.380 (0.122s): Starting iteration 30001
0.502 (0.122s): Starting iteration 40001
0.623 (0.122s): Starting iteration 50001
0.745 (0.122s): Starting iteration 60001
0.867 (0.122s): Starting iteration 70001
Segmentation fault (core dumped)
`
Running under gdb shows the following stack trace:
`Thread 1 "rush_larsen_gpu" received signal SIGSEGV, Segmentation fault.
0x00007fffebe5973d in ?? () from /opt/rocm-5.4.0/lib/libhsa-runtime64.so.1
(gdb) bt
#0 0x00007fffebe5973d in ?? () from /opt/rocm-5.4.0/lib/libhsa-runtime64.so.1
#1 0x00007fffed7ad2ef in llvm::omp::target::plugin::AMDGPUQueueTy::pushKernelLaunch(llvm::omp::target::plugin::AMDGPUKernelTy const&, void*, unsigned int, unsigned long, unsigned int, llvm::omp::target::plugin::AMDGPUSignalTy*, llvm::omp::target::plugin::AMDGPUSignalTy*) ()
from /home/dhchakra/git/aomp-trunk/llvm-project/build/lib/libomptarget.rtl.amdgpu.nextgen.so
#2 0x00007fffed7a6485 in llvm::omp::target::plugin::AMDGPUStreamTy::pushKernelLaunch(llvm::omp::target::plugin::AMDGPUKernelTy const&, void*, unsigned int, unsigned long, unsigned int, llvm::omp::target::plugin::AMDGPUMemoryManagerTy&) ()
from /home/dhchakra/git/aomp-trunk/llvm-project/build/lib/libomptarget.rtl.amdgpu.nextgen.so
#3 0x00007fffed7a61be in llvm::omp::target::plugin::AMDGPUKernelTy::launchImpl(llvm::omp::target::plugin::GenericDeviceTy&, unsigned int, unsigned long, KernelArgsTy&, void*, llvm::omp::target::plugin::AsyncInfoWrapperTy&) const ()
from /home/dhchakra/git/aomp-trunk/llvm-project/build/lib/libomptarget.rtl.amdgpu.nextgen.so
#4 0x00007fffed7bc046 in llvm::omp::target::plugin::GenericKernelTy::launch(llvm::omp::target::plugin::GenericDeviceTy&, void**, long*, KernelArgsTy&, llvm::omp::target::plugin::AsyncInfoWrapperTy&) const ()
from /home/dhchakra/git/aomp-trunk/llvm-project/build/lib/libomptarget.rtl.amdgpu.nextgen.so
#5 0x00007fffed7c00c8 in llvm::omp::target::plugin::GenericDeviceTy::launchKernel(void*, void**, long*, KernelArgsTy&, __tgt_async_info*) ()
from /home/dhchakra/git/aomp-trunk/llvm-project/build/lib/libomptarget.rtl.amdgpu.nextgen.so
#6 0x00007fffed7c39c5 in __tgt_rtl_launch_kernel ()
from /home/dhchakra/git/aomp-trunk/llvm-project/build/lib/libomptarget.rtl.amdgpu.nextgen.so
#7 0x00007ffff7b49931 in target(ident_t*, DeviceTy&, void*, KernelArgsTy&, AsyncInfoTy&) ()
from /home/dhchakra/git/aomp-trunk/llvm-project/build/lib/libomptarget.so.17git
#8 0x00007ffff7b42a70 in __tgt_target_kernel ()
from /home/dhchakra/git/aomp-trunk/llvm-project/build/lib/libomptarget.so.17git
#9 0x0000555555559796 in rush_larsen_gpu_omp ()
#10 0x000055555555a252 in main ()`
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs