Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cupy.ascontiguousarray(None) and cupy.asfortranarray(None) cause Segmentation Fault #9358

@Kairoven

Description

@Kairoven

Description

When calling cupy.ascontiguousarray(None) or cupy.asfortranarray(None), the process crashes with a Segmentation Fault (core dumped), whereas numpy handles it gracefully.

To Reproduce

import cupy
import numpy

print(numpy.ascontiguousarray(None)) # [None]
print(cupy.ascontiguousarray(None)) #Segmentation fault (core dumped)

print(numpy.asfortranarray(None)) # [None]
print(cupy.asfortranarray(None)) #Segmentation fault (core dumped)

Installation

Conda-Forge (conda install ...)

Environment

OS                           : Linux-5.4.0-167-generic-x86_64-with-glibc2.31
Python Version               : 3.10.18
CuPy Version                 : 13.6.0
CuPy Platform                : NVIDIA CUDA
NumPy Version                : 2.2.6
SciPy Version                : 1.15.3
Cython Build Version         : 3.1.3
Cython Runtime Version       : None
CUDA Root                    : /usr/local/cuda
nvcc PATH                    : /usr/local/cuda/bin/nvcc
CUDA Build Version           : 11080
CUDA Driver Version          : 12000
CUDA Runtime Version         : 11080 (linked to CuPy) / 11080 (locally installed)
CUDA Extra Include Dirs      : []
cuBLAS Version               : 111103
cuFFT Version                : 10900
cuRAND Version               : 10300
cuSOLVER Version             : (11, 4, 1)
cuSPARSE Version             : 11705
NVRTC Version                : (11, 8)
Thrust Version               : 200800
CUB Build Version            : 200800
Jitify Build Version         : <unknown>
cuDNN Build Version          : None
cuDNN Version                : None
NCCL Build Version           : None
NCCL Runtime Version         : None
cuTENSOR Version             : None
cuSPARSELt Build Version     : None
Device 0 Name                : NVIDIA A800 80GB PCIe
Device 0 Compute Capability  : 80
Device 0 PCI Bus ID          : 0000:0C:00.0
Device 1 Name                : NVIDIA A800 80GB PCIe
Device 1 Compute Capability  : 80
Device 1 PCI Bus ID          : 0000:0D:00.0

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions