libnvvm segfault compiling this kernel
See original GitHub issueReporting a bug
- I am using the latest released version of Numba (most recent is visible in the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
- I have included below a minimal working reproducer (if you are unsure how to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).
From gitter https://gitter.im/numba/numba?at=5ebef15eeb9b6f316225be0e
Reproducer:
from numba import cuda
import numba
# Compiling this will segfault inside libnvvm
@cuda.jit(argtypes=[numba.float64[:]])
def kernel(arr):
arr[cuda.threadIdx.x] = cuda.threadIdx.x / 100.0 + 2
a_local = 0
if round(arr[cuda.threadIdx.x], 2) > 0.09:
a_local += 1
arr[cuda.threadIdx.x] = a_local
lldb shows:
Process 50672 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x000000011809b3ef libnvvm.3.2.0.dylib`llvm::NVPTXTargetLowering::getArgumentAlignment(llvm::SDValue, llvm::ImmutableCallSite const*, llvm::Type*, unsigned int) const + 31
libnvvm.3.2.0.dylib`llvm::NVPTXTargetLowering::getArgumentAlignment:
-> 0x11809b3ef <+31>: movq (%rcx), %rax
0x11809b3f2 <+34>: movq %rax, %r13
0x11809b3f5 <+37>: andq $-0x4, %r13
0x11809b3f9 <+41>: leaq -0x18(%r13), %rcx
Happened on windows with cudatoolkit 10.2
and MBP with cudatoolkit 9.0
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
LLVM/NVVM kernel crashes LibNVVM
Hi everyone, I have no luck compiling the following NVVM IR kernel with libNVVM (Version 1.0, as available for download in devzone).
Read more >Why do I get a segmentation fault when calling a CUDA kernel ...
Your code compiles and runs correctly for me using ordinary nvcc commands (not CMake) if I add the -cudart shared switch to each...
Read more >[SOLVED]Compiling kernel fails with segfault
Hi guys,. I'm out of answers. The situation : Compiling kernel randomly stops with : "segmentation fault" and never runs through.
Read more >Segmentation Fault when trying to compile kernel 4.16.3-300 ...
Description of problem: when trying to compile the kernel I have a segmentation fault, and a request to submit a bug :) Version-Release ......
Read more >Segmentation fault when compiling kernel/modules
Hi All, I am trying to cross-compile kernel/modules of gingerbread for arm on 64-bit Ubuntu (11.04). I am getting segmentation fault.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
probably this https://github.com/numba/numba/issues/4668
Will look into this next week.