Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault (core dumped) in tensor creation APIs #606

Open
x0w3n opened this issue Dec 2, 2024 · 0 comments
Open

Segmentation fault (core dumped) in tensor creation APIs #606

x0w3n opened this issue Dec 2, 2024 · 0 comments

Comments

@x0w3n
Copy link

x0w3n commented Dec 2, 2024

Describe the bug

Inspired by problem #511, tensor multiplication can crash, and we found that the following tensor creation apis all have similar problems:

  • jt.rand()
  • jt.randn()
  • jt.randint()
  • jt.random()
  • jt.empty()
  • jt.full()
  • jt.init.eye()

Here is the colab reference link:
https://colab.research.google.com/drive/1o4UTyHFKQvnGBvydJSQuEbXbbGkcN_bk?usp=sharing

Full Log

[i 1202 21:42:01.481311 48 compiler.py:956] Jittor(1.3.9.10) src: /home/miniconda3/envs/jittor/lib/python3.9/site-packages/jittor
[i 1202 21:42:01.491502 48 compiler.py:957] g++ at /usr/bin/g++(11.2.0)
[i 1202 21:42:01.491992 48 compiler.py:958] cache_path: /home/.cache/jittor/jt1.3.9/g++11.2.0/py3.9.12/Linux-5.15.0-1x30/INTELRXEONRGOLx51/ef26/default
[i 1202 21:42:01.561816 48 install_cuda.py:93] cuda_driver_version: [12, 2]
[i 1202 21:42:01.577170 48 __init__.py:412] Found /home/.cache/jittor/jtcuda/cuda12.2_cudnn8_linux/bin/nvcc(12.2.140) at /home/.cache/jittor/jtcuda/cuda12.2_cudnn8_linux/bin/nvcc.
[i 1202 21:42:01.729819 48 __init__.py:412] Found gdb(12.0.90) at /usr/bin/gdb.
[i 1202 21:42:01.732195 48 __init__.py:412] Found addr2line(2.38) at /usr/bin/addr2line.
[i 1202 21:42:01.955148 48 compiler.py:1013] cuda key:cu12.2.140_sm_89
[i 1202 21:42:02.983538 48 __init__.py:227] Total mem: 251.50GB, using 16 procs for compiling.
[i 1202 21:42:03.184558 48 jit_compiler.cc:28] Load cc_path: /usr/bin/g++
[i 1202 21:42:03.421654 48 init.cc:63] Found cuda archs: [89,]
Caught segfault at address 0x55dcf174e000, thread_name: '', flush log...
Segmentation fault (core dumped)

Minimal Reproduce

import jittor as jt
 
# a = jt.rand((300, 400))    # Segmentation fault (core dumped)
# a = jt.randn((300, 400)) #Segmentation fault (core dumped)
# a = jt.randint(300, shape=(300, 400))  #Segmentation fault (core dumped)
# a = jt.random((300, 400)) # Segmentation fault (core dumped)
# a = jt.empty((300, 400))  # Segmentation fault (core dumped)
# a = jt.full((300, 400),3.14)  # Segmentation fault (core dumped)
a = jt.init.eye((300,400))  # Segmentation fault (core dumped)

sumsum = 0
for i in range(300):
    for j in range(300):
        if i != j:
            sumsum += a[i] * a[j]

Expected behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant