OpInterface definitions¶
GradientOpInterface (GradientOpInterface
)¶
This interface provides a generic way to interact with instructions that are considered gradient operations. Currently these include GradOP, JVPOp, and VJPOp.
Methods:¶
getMethod
¶
llvm::StringRef getMethod();
Return the gradient method, which can be one of [“auto”, “fd”].
NOTE: This method must be implemented by the user.
getCallee
¶
mlir::SymbolRefAttr getCallee();
Return the name of the callee, aka the function being differentiated by the gradient operation.
NOTE: This method must be implemented by the user.
getDiffArgIndices
¶
std::optional<mlir::DenseIntElementsAttr> getDiffArgIndices();
Return the indices of the arguments being differentiated.
NOTE: This method must be implemented by the user.
getDiffArgIndicesAttr
¶
mlir::DenseIntElementsAttr getDiffArgIndicesAttr();
Return the indices of the arguments being differentiated, as an MLIR attribute.
NOTE: This method must be implemented by the user.
getFiniteDiffParam
¶
std::optional<mlir::FloatAttr> getFiniteDiffParam();
Return the finite difference parameter.
NOTE: This method must be implemented by the user.
getFiniteDiffParamAttr
¶
mlir::FloatAttr getFiniteDiffParamAttr();
Return the finite difference parameter, as an MLIR attribute.
NOTE: This method must be implemented by the user.