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.nn.AdaptiveMaxPool1d/AdaptiveMaxPool2d/AdaptiveMaxPool3d #10523

Open
x0w3n opened this issue May 12, 2024 · 0 comments
Labels
bug community events from community

Comments

@x0w3n
Copy link

x0w3n commented May 12, 2024

Summary

When input some boundary values to the parameters of flow.nn.AdaptiveMaxPool1d/AdaptiveMaxPool2d/AdaptiveMaxPool3d, it triggers the crash

Code to reproduce bug

AdaptiveMaxPool1d:

m = flow.nn.AdaptiveMaxPool1d(-5)
input = flow.Tensor(np.random.randn(1, 64, 8))
m(input)

output:

terminate called after throwing an instance of 'oneflow::RuntimeException'
  what():  Error: Error! : Out of memory when allocate size : 18446744073709550592.
 The total_memory_bytes allocated by this BinAllocator is : 2097152
You can set ONEFLOW_DEBUG or ONEFLOW_PYTHON_STACK_GETTER to 1 to get the Python stack of the error.
Stack trace (most recent call last) in thread 287469:
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1574249, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1573847, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff156f368, in vm::ThreadCtx::TryReceiveAndRun()
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1506818, in vm::EpStreamPolicyBase::Run(vm::Instruction*) const
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff150abe6, in vm::Instruction::Compute()
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1510d2a, in vm::OpCallInstructionPolicy::Compute(vm::Instruction*)
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1510a1f, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff150d182, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7fffed910082, in 

Aborted (Signal sent by tkill() 287228 0)
Aborted (core dumped)

AdaptiveMaxPool2d:

m = flow.nn.AdaptiveMaxPool2d((-5,7))
input = flow.Tensor(np.random.randn(1, 64, 8,2))
output = m(input) 

output:

terminate called after throwing an instance of 'oneflow::RuntimeException'
  what():  Error: Error! : Out of memory when allocate size : 18446744073709542912.
 The total_memory_bytes allocated by this BinAllocator is : 2097152
You can set ONEFLOW_DEBUG or ONEFLOW_PYTHON_STACK_GETTER to 1 to get the Python stack of the error.
Stack trace (most recent call last) in thread 288180:
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1574249, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1573847, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff156f368, in vm::ThreadCtx::TryReceiveAndRun()
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1506818, in vm::EpStreamPolicyBase::Run(vm::Instruction*) const
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff150abe6, in vm::Instruction::Compute()
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1510d2a, in vm::OpCallInstructionPolicy::Compute(vm::Instruction*)
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1510a1f, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff150d182, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7fffed910082, in 

Aborted (Signal sent by tkill() 287939 0)
Aborted (core dumped)

AdaptiveMaxPool3d:

m = flow.nn.AdaptiveMaxPool3d((-5,5,7))
input = flow.Tensor(np.random.randn(1, 64, 8, 9,2))
output = m(input) 

output:

terminate called after throwing an instance of 'oneflow::RuntimeException'
  what():  Error: Error! : Out of memory when allocate size : 18446744073709507072.
 The total_memory_bytes allocated by this BinAllocator is : 2097152
You can set ONEFLOW_DEBUG or ONEFLOW_PYTHON_STACK_GETTER to 1 to get the Python stack of the error.
Stack trace (most recent call last) in thread 288546:
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1574249, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1573847, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff156f368, in vm::ThreadCtx::TryReceiveAndRun()
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1506818, in vm::EpStreamPolicyBase::Run(vm::Instruction*) const
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff150abe6, in vm::Instruction::Compute()
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1510d2a, in vm::OpCallInstructionPolicy::Compute(vm::Instruction*)
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff1510a1f, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7ffff150d182, in 
   Object "/home/temp/oneflow-1.0.0/build/liboneflow.so", at 0x7fffed910082, in 

Aborted (Signal sent by tkill() 288302 0)
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: ['*/temp/oneflow-1.0.0/python/oneflow']
version: 0.9.1+cpu.git.ec05076
git_commit: ec05076
cmake_build_type: Release
rdma: False
mlir: False
  • Python version: 3.10.0
  • CUDA driver version: 12.2
  • GPU models: NVIDIA GeForce RTX 3090
  • Other info: None
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