LoadTilingLibrary

Function

Loads the corresponding tiling dynamic library based on the input path. After implementing an operator based on the project-based operator development mode, you can obtain the corresponding tiling dynamic library file by compiling the operator package or compiling the operator dynamic library.

  • Operator package compilation: The dynamic library corresponding to the tiling implementation is liboptiling.so in the operator package deployment directory. For details about the path, see Operator Package Deployment.

Prototype

1
bool LoadTilingLibrary(const char *tilingSoPath) const

Parameters

Parameter

Input/Output

Description

tilingSoPath

Input

Path of the tiling dynamic library. Both relative and absolute paths are supported.

Returns

true: The tiling dynamic library is successfully loaded. false: The tiling dynamic library fails to be loaded. For details about the error, see the log information.

For details about how to configure and view logs, see Logs.

Restrictions

None

Example

1
2
3
4
5
6
7
context_ascendc::OpTilingRegistry tmpIns;
bool flag = tmpIns.LoadTilingLibrary("/your/path/to/so_path/liboptiling.so");
if (flag == false) {
    std::cout << "Load tiling so failed" << std::endl;
    ...        
}
// ...