oneflow icon indicating copy to clipboard operation
oneflow copied to clipboard

Aborted (core dumped) in `flow.linalg.inv`

Open x0w3n opened this issue 1 year ago • 0 comments

Summary

In the official example flow.linalg.inv computes normally, but triggers a crash under the specific tensor.

Code to reproduce bug

import oneflow as flow
A = flow.tensor([[ 1.3408, -0.7788,  1.0551, -0.5866],
                  [ 0.8480,  0.8350,  0.9781, -0.1297],
                  [-0.0881, -0.6142, -0.3833,  0.3232],
                  [ 1.2841,  0.7517, -0.3849,  0.2515]])

a = flow.tensor([[1, 2], [2, 4]], dtype=flow.float32)
flow.linalg.inv(a)

output:

F20241205 10:21:18.862664 2483635 inv_kernels.cpp:58] (Batch element 0): the inversion could not be completed because the input matrix is singular.
*** Check failure stack trace: ***
    @     0x7fd9c25d09ca  google::LogMessage::Fail()
    @     0x7fd9c25d0cb2  google::LogMessage::SendToLog()
    @     0x7fd9c25d0537  google::LogMessage::Flush()
    @     0x7fd9c25d30a9  google::LogMessageFatal::~LogMessageFatal()
    @     0x7fd9bd7f3157  oneflow::CpuInvKernel<>::Compute()
    @     0x7fd9be34e54d  oneflow::one::StatefulOpKernel::Compute()
    @     0x7fd9bc5e8cab  oneflow::vm::OpCallInstructionUtil::Compute()
    @     0x7fd9bc5e6787  oneflow::vm::OpCallInstructionPolicy::Compute()
    @     0x7fd9bc5e25bc  oneflow::vm::Instruction::Compute()
    @     0x7fd9bc5e0a6f  oneflow::vm::EpStreamPolicyBase::Run()
    @     0x7fd9bc5ec086  oneflow::vm::StreamPolicy::RunIf()
    @     0x7fd9bc5f36de  oneflow::vm::ThreadCtx::TryReceiveAndRun()
    @     0x7fd9bc5f5d18  oneflow::(anonymous namespace)::WorkerLoop()
    @     0x7fd9bc5f611f  _ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJPFvPN7oneflow2vm9ThreadCtxERKSt8functionIFvS6_EEES6_ZNS3_14VirtualMachine15CreateThreadCtxENS3_6SymbolINS3_6DeviceEEENS3_10StreamTypeEmEUlS6_E3_EEEEE6_M_runEv
    @     0x7fd9c25e540f  execute_native_thread_routine
    @     0x7fdaa9fe0b43  (unknown)
    @     0x7fdaaa072a00  (unknown)
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 avatar Dec 05 '24 02:12 x0w3n