RegOpLibInit

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Header File

#include <register/op_lib_register.h>

Function Usage

Registers the initialization function of the custom operator dynamic library.

Prototype

1
OpLibRegister &RegOpLibInit(OpLibInitFunc func)

Parameters

Parameter

Input/Output

Description

func

Input

Custom initialization function to be registered. The type is OpLibInitFunc.

1
using OpLibInitFunc = uint32_t (*)(ge::AscendString&);

Returns

Object of class OpLibRegister, which registers the OpLibInitFunc function.

Constraints

None

Examples

1
2
3
4
5
6
uint32_t Init(ge::AscendString&) {
  // init func
  return 0;
}

REGISTER_OP_LIB (vendor_1).RegOpLibInit (Init); // Register the initialization function Init of the vendor vendor_1.