oneflow icon indicating copy to clipboard operation
oneflow copied to clipboard

oneflow.nn.MovingAverageMinMaxObserver produces "Aborted (core dumped)" bug

Open xxxyyyzzz12345 opened this issue 1 year ago • 1 comments

Summary

The following code snippet produces "Aborted (core dumped)" bug with "dtype=oneflow.float64". However, "dtype=oneflow.float32" won't have this problem.

Code to reproduce bug

input1 = oneflow.rand(9, 40, 20, 10,dtype=oneflow.float64) input2 = oneflow.randint(0,5,(1,),dtype=oneflow.int64) mod = oneflow.nn.MovingAverageMinMaxObserver(training= True, stop_update_after_iters=1, quantization_formula= 'google', quantization_bit=8, quantization_scheme='symmetric', momentum= 0.95) output = mod(input1,input2)

System Information

  • What is your OneFlow installation (pip, source, dockerhub): pip
  • OS: Ubuntu 20.04.2 LTS
  • OneFlow version (run python3 -m oneflow --doctor): 0.7.0+cu112
  • Python version: 3.8.8
  • CUDA driver version: 11.4

xxxyyyzzz12345 avatar Jul 12 '22 16:07 xxxyyyzzz12345

Try to use this:

input1 = oneflow.rand(9, 40, 20, 10,dtype=oneflow.float64)
input2 = oneflow.randint(0,5,(1,),dtype=oneflow.int64)
mod = oneflow.nn.MovingAverageMinMaxObserver(training= True, stop_update_after_iters=1, quantization_formula= 'google', quantization_bit=8, quantization_scheme='symmetric', momentum= 0.95).double() # Add .double()
output = mod(input1,input2)

MARD1NO avatar Jul 13 '22 01:07 MARD1NO