load_op_library

paddle.fluid.framework. load_op_library ( lib_filename ) [source]
Api_attr

Static Graph

Load a dynamic library, including custom operators and kernels. When library is loaded, ops and kernels registered in the library will be available in PaddlePaddle main process. Please note, the type of custom operators can’t have the same type with the existing operators in the framework.

Parameters

lib_filename (str) – name of dynamic library.

Returns

new registered custom op names.

Return type

list[str]

Examples

import paddle.fluid as fluid
#fluid.load_op_library('custom_op.so')