We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
flow.stack
This will cause a crash due to incompatible dimensions for concatenation.
import oneflow as flow import numpy as np # Creating two tensors with incompatible shapes x1 = flow.tensor(np.random.rand(1, 3, 5)) # Shape: (1, 3, 5) x2 = flow.tensor(np.random.rand(1, 3)) # Shape: (1, 3) # Attempting to stack tensors along incompatible dimensions y = flow.stack([x1, x2], dim=-1) print(y.shape)
output:
F20241204 22:49:40.059409 1718270 shape.cpp:30] Check failed: index < tp()->NumAxes() (2 vs. 2) Shape: (1,3) visit index: 2 > num_axes: 2 *** Check failure stack trace: *** @ 0x7f3e151d09ca google::LogMessage::Fail() @ 0x7f3e151d0cb2 google::LogMessage::SendToLog() @ 0x7f3e151d0537 google::LogMessage::Flush() @ 0x7f3e151d30a9 google::LogMessageFatal::~LogMessageFatal() @ 0x7f3e0aacba57 oneflow::ConstShapeMixIn<>::At() @ 0x7f3e0e266d05 oneflow::one::functional::impl::StackFunctor::operator()() @ 0x7f3e0e26753c _ZNSt17_Function_handlerIFN7oneflow5MaybeINS0_3one6TensorEvEERKNS2_11TensorTupleERKlEZNS2_10functional18PackedFunctorMakerISA_E4makeINSB_4impl12StackFunctorELi0EEENSB_13PackedFunctorISA_EERKSsRKT_EUlS7_S9_E_E9_M_invokeERKSt9_Any_dataS7_S9_ @ 0x7f3e116227d8 oneflow::one::functional::Stack() @ 0x7f3ef46401f2 oneflow::one::functional::stack() @ 0x507397 cfunction_call @ 0x4f065c _PyObject_MakeTpCall @ 0x4eccff _PyEval_EvalFrameDefault @ 0x4e69da _PyEval_EvalCode @ 0x4e6667 _PyEval_EvalCodeWithName @ 0x4e6619 PyEval_EvalCodeEx @ 0x5938eb PyEval_EvalCode @ 0x5c1157 run_eval_code_obj @ 0x5bd170 run_mod @ 0x456423 pyrun_file.cold @ 0x5b6e52 PyRun_SimpleFileExFlags @ 0x5b43ce Py_RunMain @ 0x587999 Py_BytesMain @ 0x7f3efcc0dd90 (unknown) @ 0x7f3efcc0de40 __libc_start_main @ 0x58784e (unknown) Aborted (core dumped)
python3 -m oneflow --doctor
path: ['/home/miniconda3/envs/oneflow/lib/python3.9/site-packages/oneflow'] version: 0.9.0 git_commit: 381b12c cmake_build_type: Release rdma: True mlir: True
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
This will cause a crash due to incompatible dimensions for concatenation.
Code to reproduce bug
output:
System Information
python3 -m oneflow --doctor
):The text was updated successfully, but these errors were encountered: