Overview
OpImplRegisterV2 is an operator implementation registration tool class used for custom operator development. It can be used to:
- Register operator implementation information like shape inference, data type inference, and range inference.
- Register the implementation for the tiling computation of an operator.
- Register the attribute information of an operator.
- Specifies an input index used for shape inference and tiling computation.
This class is used when you register the operator prototype based on OP_ADD during custom operator development.
Header Files to Be Included
1 | #include "register/op_impl_registry.h" |
Public Member Functions
explicit OpImplRegisterV2(const ge::char_t *op_type) OpImplRegisterV2(OpImplRegisterV2 &®ister_data) noexcept OpImplRegisterV2(const OpImplRegisterV2 ®ister_data) OpImplRegisterV2 &operator=(const OpImplRegisterV2 &) = delete OpImplRegisterV2 &operator=(OpImplRegisterV2 &&) = delete ~OpImplRegisterV2() OpImplRegisterV2 &InferShape(InferShapeKernelFunc infer_shape_func) OpImplRegisterV2 &InferShapeRange(InferShapeRangeKernelFunc infer_shape_range_func) OpImplRegisterV2 &InferDataType(InferDataTypeKernelFunc infer_datatype_func) OpImplRegisterV2 &Tiling(TilingKernelFunc tiling_func, size_t max_tiling_data_size = 2048) OpImplRegisterV2 &PrivateAttr(const ge::char_t *private_attr) OpImplRegisterV2 &PrivateAttr(const ge::char_t *private_attr, int64_t private_attr_val) OpImplRegisterV2 &PrivateAttr(const ge::char_t *private_attr, const std::vector<int64_t> &private_attr_val) OpImplRegisterV2 &PrivateAttr(const ge::char_t *private_attr, const ge::char_t *private_attr_val) OpImplRegisterV2 &PrivateAttr(const ge::char_t *private_attr, ge::float32_t private_attr_val) OpImplRegisterV2 &PrivateAttr(const ge::char_t *private_attr, bool private_attr_val) OpImplRegisterV2 &PrivateAttr(const ge::char_t *private_attr, const std::vector<ge::float32_t> &private_attr_val) template<typename T> OpImplRegisterV2 &TilingParse(KernelFunc const tiling_parse_func) template<typename T> OpImplRegisterV2 &TilingParse(TilingParseFunc const tiling_parse_func) OpImplRegisterV2 &InputsDataDependency(std::initializer_list<int32_t> inputs) OpImplRegisterV2 &InferOutDataTypeSameWithFirstInput() OpImplRegisterV2 &GenSimplifiedKey(GenSimplifiedKeyKernelFunc gen_simplifiedkey_func) OpImplRegisterV2 &OpExecuteFunc(OpExecFunc op_execute_func) OpImplRegisterV2 &TilingInputsDataDependency(std::initializer_list<int32_t> inputs) OpImplRegisterV2 &TilingInputsDataDependency(std::initializer_list<int32_t> inputs, std::initializer_list<TilingPlacement> placements) OpImplRegisterV2 &HostInputs(std::initializer_list<int32_t> inputs) OpImplRegisterV2 &OutputShapeDependOnCompute(std::initializer_list<int32_t> outputs)
Parent topic: OpImplRegisterV2