oneflow
oneflow copied to clipboard
oneflow.nn.MovingAverageMinMaxObserver produces "Aborted (core dumped)" bug
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
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)