Get segmentation fault with FFT callback function
See original GitHub issuepr.py
import numpy as np
import cupy as cp
code = r'''
__device__ cufftComplex CB_ConvertInput(
void *dataIn,
size_t offset,
void *callerInfo,
void *sharedPtr) {
return make_float2(0.0, 0.1);
}
__device__ cufftCallbackLoadC d_loadCallbackPtr = CB_ConvertInput;
'''
in_arr = cp.random.rand(12, dtype=np.float32)
with cp.fft.config.set_cufft_callbacks(cb_load=code):
out_arr = cp.fft.fft(in_arr)
print(out_arr)
Run with
CUDA_VISIBLE_DEVICES=0 python pr.py
Then I got
[1] 410392 segmentation fault (core dumped) CUDA_VISIBLE_DEVICES=0 python pr.py
My system information:
OS : Linux-5.12.8-arch1-1-x86_64-with-glibc2.33
Python Version : 3.9.5
CuPy Version : 9.1.0
CuPy Platform : NVIDIA CUDA
NumPy Version : 1.20.0
SciPy Version : 1.6.3
Cython Build Version : 0.29.23
Cython Runtime Version : 0.29.23
CUDA Root : /opt/cuda
nvcc PATH : /opt/cuda/bin/nvcc
CUDA Build Version : 11030
CUDA Driver Version : 11030
CUDA Runtime Version : 11030
cuBLAS Version : 11402
cuFFT Version : 10402
cuRAND Version : 10204
cuSOLVER Version : (11, 1, 1)
cuSPARSE Version : 11500
NVRTC Version : (11, 3)
Thrust Version : 101100
CUB Build Version : 101100
Jitify Build Version : 60e9e72
cuDNN Build Version : 8200
cuDNN Version : 8200
NCCL Build Version : 20906
NCCL Runtime Version : 20906
cuTENSOR Version : None
cuSPARSELt Build Version : None
Device 0 Name : NVIDIA GeForce GTX 1080
Device 0 Compute Capability : 61
Device 0 PCI Bus ID : 0000:17:00.0
Device 1 Name : NVIDIA Quadro K600
Device 1 Compute Capability : 30
Device 1 PCI Bus ID : 0000:65:00.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:23 (12 by maintainers)
Top Results From Across the Web
f2py (1.20) causes segmentation fault when calling callback ...
Reproducing code example: For the same code as in #18335, when any callback function is actually called, it causes a segmentation fault.
Read more >program crashing with segmentation fault while calling a ...
My program crashes with Segmentation fault while calling a callback function randomly. When I analyzed the core the callback function ...
Read more >cuFFT API Reference - NVIDIA Documentation Center
The FFT is a divide-and-conquer algorithm for efficiently computing discrete Fourier transforms of complex or real-valued data sets.
Read more >Distributing a function that uses FFTW - Julia Discourse
Here is a minimum example, where I just try to perform a FFT on an array of matrices: @everywhere using FFTW ... I...
Read more >Orthogonal distance regression (scipy.odr)
The Model class stores information about the function you wish to fit. ... data for explanatory variables as fixed, i.e., not subject to...
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 FreeTop 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
Top GitHub Comments
@leofang My system is archlinux. The cupy is installed from archlinuxcn/python-cupy. After deleting
.cupy
folder, I got a warning before the segmentation fault.@leofang Thanks, everything works now on the 980 workstation.