RegOpLibInit

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Header File/Library File

  • Header file: #include <register/op_lib_register.h>
  • Library file: libregister.so

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.

Restrictions

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.