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

Check failed in jt.setitem when slicing exceeds tensor dimension boundary #613

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

Comments

@x0w3n
Copy link

x0w3n commented Dec 3, 2024

Describe the bug

Check failed is triggered when the slicing operation exceeds the dimension boundary of the tensor. The error log suggests reporting this issue.

Full Log

[i 1203 09:44:05.265442 28 compiler.py:956] Jittor(1.3.9.10) src: /home/miniconda3/envs/jittor/lib/python3.9/site-packages/jittor
[i 1203 09:44:05.276319 28 compiler.py:957] g++ at /usr/bin/g++(11.2.0)
[i 1203 09:44:05.276768 28 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 1203 09:44:05.345767 28 install_cuda.py:93] cuda_driver_version: [12, 2]
[i 1203 09:44:05.356495 28 __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 1203 09:44:05.804737 28 __init__.py:412] Found gdb(12.0.90) at /usr/bin/gdb.
[i 1203 09:44:05.807506 28 __init__.py:412] Found addr2line(2.38) at /usr/bin/addr2line.
[i 1203 09:44:06.177937 28 compiler.py:1013] cuda key:cu12.2.140_sm_89
[i 1203 09:44:07.469918 28 __init__.py:227] Total mem: 251.50GB, using 16 procs for compiling.
[i 1203 09:44:07.673996 28 jit_compiler.cc:28] Load cc_path: /usr/bin/g++
[i 1203 09:44:07.922802 28 init.cc:63] Found cuda archs: [89,]
Traceback (most recent call last):
  File "/home/work/data/2024-10-23-single-tf-pytorch/Results/test/crash_pool/jittor/jittor_core.Var.setitem_oneflow_oneflow.var_13dd5d.py", line 8, in <module>
    result = jt.setitem(x, slice(3, 4), y)
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.ops.setitem)).

Types of your inputs are:
 self   = module,
 args   = (Var, slice, Var, ),

The function declarations are:
 VarHolder* setitem(VarHolder* x,  VarSlices&& slices, VarHolder* y,  NanoString op=ns_void)

Failed reason:[f 1203 09:44:08.673939 28 nano_vector.h:32] Check failed: start==stop || (start>=0 && stop>=-1 && start<size && stop<=size)  Something wrong... Could you please report this issue?
 slice overflow: 3 2 1

Minimal Reproduce

import jittor as jt

x = jt.array([[1, 2, 3], [1, 2, 3]])
y = jt.array([0.1, 0.2])
result = jt.setitem(x, slice(1, 2), y)

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