oneflow icon indicating copy to clipboard operation
oneflow copied to clipboard

APIs that do not support backward mode

Open xxxyyyzzz12345 opened this issue 2 years ago • 1 comments

Summary

I'm wondering whether oneflow.erfinv and oneflow.nn.Quantization are implemented, and if so, whether they are implemented correctly since they do not support backward mode.

Output when requires_grad option is enabled:

oneflow._oneflow_internal.exception.CheckFailedException: 
  File "/home/ci-user/runners/release/_work/oneflow/oneflow/oneflow/core/framework/op_interpreter/op_interpreter_util.cpp", line 139, in Dispatch<oneflow::one::Tensor>
    Dispatch<TensorTuple>(op_expr, inputs, ctx)
  File "/home/ci-user/runners/release/_work/oneflow/oneflow/oneflow/core/framework/op_interpreter/op_interpreter_util.cpp", line 131, in Dispatch<oneflow::one::TensorTuple>
    Dispatch(op_expr, inputs, outputs.get(), ctx)
  File "/home/ci-user/runners/release/_work/oneflow/oneflow/oneflow/core/framework/op_interpreter/op_interpreter.cpp", line 100, in Apply
    op_expr.GetOrCreateOpGradClosure()
  File "/home/ci-user/runners/release/_work/oneflow/oneflow/oneflow/core/framework/op_expr.cpp", line 139, in GetOrCreateOpGradClosure
    Check failed: (IsClassRegistered<std::string, OpExprGradFunctionIf>(proto().op_type_name())) The gradient function for op erfinv is not found. Please check whether it has been implemented and registered correctly.

xxxyyyzzz12345 avatar Jul 27 '22 12:07 xxxyyyzzz12345

In addition, oneflow.MinMaxObserver and oneflow.ones_like also have similar problems. By the way, is there any progress on implementing or fixing the gradient functions of these apis?

xxxyyyzzz12345 avatar Aug 03 '22 17:08 xxxyyyzzz12345