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

Aborted (core dumped) in flow.var #10602

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

Aborted (core dumped) in flow.var #10602

x0w3n opened this issue Dec 5, 2024 · 0 comments
Labels
bug community events from community

Comments

@x0w3n
Copy link

x0w3n commented Dec 5, 2024

Summary

A crash is triggered when the dimension exceeds the dimension of the input tensor.

Code to reproduce bug

import numpy as np
import oneflow as flow

input_tensor = flow.tensor(np.random.randn(2, 3, 4, 5))
bad_dim = (3, 7)
output = flow.var(input_tensor, dim=bad_dim)

output:

F20241205 11:02:59.155315 2505492 shape.cpp:141] Check failed: axis < num_axes (7 vs. 4) 
*** Check failure stack trace: ***
    @     0x7fa8687d09ca  google::LogMessage::Fail()
    @     0x7fa8687d0cb2  google::LogMessage::SendToLog()
    @     0x7fa8687d0537  google::LogMessage::Flush()
    @     0x7fa8687d30a9  google::LogMessageFatal::~LogMessageFatal()
    @     0x7fa85e0c81ee  oneflow::ShiftNegativeAxis()
    @     0x7fa85e0c867d  oneflow::CreateReducedShape()
    @     0x7fa864b8a1ce  oneflow::VarOp::InferLogicalTensorDesc()
    @     0x7fa864b8ac99  oneflow::VarOp::InferPhysicalTensorDesc()
    @     0x7fa947b058cc  std::_Function_handler<>::_M_invoke()
    @     0x7fa86165e799  oneflow::one::UserOpExpr::InferPhysicalTensorDesc()
    @     0x7fa86160d3a1  oneflow::one::LocalTensorInferCache::Infer()
    @     0x7fa86160f5bb  oneflow::one::LocalTensorInferCache::GetOrInfer()
    @     0x7fa86167ecaf  oneflow::one::NaiveInterpret()
    @     0x7fa8616833f5  oneflow::one::EagerLocalInterpreter::ApplyImpl()
    @     0x7fa8616b79c7  oneflow::one::EagerInterpreter::Apply()
    @     0x7fa8616b857b  oneflow::one::AutogradInterpreter::Apply()
    @     0x7fa8616bb708  oneflow::one::OpInterpUtil::Dispatch()
    @     0x7fa8616bda48  oneflow::one::OpInterpUtil::Dispatch<>()
    @     0x7fa8616bdd1e  oneflow::one::OpInterpUtil::Dispatch<>()
    @     0x7fa947dea85a  oneflow::one::OpInterpUtil::Dispatch<>()
    @     0x7fa861a9dc63  oneflow::one::functional::impl::VarianceFunctor::operator()()
    @     0x7fa861a9e09c  _ZNSt17_Function_handlerIFN7oneflow5MaybeINS0_3one6TensorEvEERKSt10shared_ptrIS3_ERKNS0_8OptionalISt6vectorIiSaIiEEEERKNS9_IbEESI_EZNS2_10functional18PackedFunctorMakerISJ_E4makeINSK_4impl15VarianceFunctorELi0EEENSK_13PackedFunctorISJ_EERKSsRKT_EUlS8_SF_SI_SI_E_E9_M_invokeERKSt9_Any_dataS8_SF_SI_SI_
    @     0x7fa864cd8160  oneflow::one::functional::Variance()
    @     0x7fa947dc39b6  oneflow::one::functional::var()
    @           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
Aborted (core dumped)

System Information

  • What is your OneFlow installation (pip, source, dockerhub): pip
  • OS: Ubuntu 22.04.3 LTS
  • OneFlow version (run 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
  • Python version: 3.9.13
  • CUDA driver version: 12.2
  • GPU models: NVIDIA GeForce RTX 4090
  • Other info: None
@x0w3n x0w3n added bug community events from community labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug community events from community
Projects
None yet
Development

No branches or pull requests

1 participant