Function: register_compile_func
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Registers an operator selector for a dynamic-shape operator. The selection of the tiling policy depends on the operator's input shape.
An operator can register with only one operator selector. To change the operator selector, call acl.op.unregister_compile_func to unregister and then call acl.op.register_compile_func to register again.
Prototype
- C Prototype
1aclError aclopRegisterCompileFunc(const char *opType, aclopCompileFunc func)
- Python Function
1ret = acl.op.register_compile_func(op_type, func)
Parameter Description
|
Parameter |
Description |
|---|---|
|
op_type |
Str, operator type. |
|
func |
Python function object, callback function of the operator selector. The function definition is as follows: Callback function format in Python: def call_back_func(num_inputs, input_desc, num_outputs, output_desc, op_attr, aclop_kernel_desc): pass |
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |