aclopRegisterCompileFunc
产品支持情况
| 
          产品  | 
        
          是否支持  | 
       
|---|---|
| 
          | 
        
          √  | 
       
| 
          | 
        
          √  | 
       
| 
          | 
        
          √  | 
       
| 
          | 
        
          √  | 
       
| 
          | 
        
          √  | 
       
| 
          | 
        
          √  | 
       
功能说明
动态Shape场景下,注册算子选择器,用于在算子执行时,能针对不同shape,选择相应的Tiling策略。
如果某算子已注册算子选择器,则不允许重新注册,如果需要变更算子选择器,必须先调用aclopUnregisterCompileFunc接口取消注册,然后再调用aclopRegisterCompileFunc接口重新注册。
函数原型
aclError aclopRegisterCompileFunc(const char *opType, aclopCompileFunc func)
参数说明
| 
          参数名  | 
        
          输入/输出  | 
        
          说明  | 
       
|---|---|---|
| 
          opType  | 
        
          输入  | 
        
          算子类型的指针。  | 
       
| 
          func  | 
        
          输入  | 
        
          算子选择器回调函数,函数定义: typedef aclError (*aclopCompileFunc)(int numInputs, const aclTensorDesc *const inputDesc[], int numOutputs, const aclTensorDesc *const outputDesc[], const aclopAttr *opAttr, aclopKernelDesc *aclopKernelDesc);  | 
       
返回值说明
返回0表示成功,返回其他值表示失败,请参见aclError。
     父主题: 单算子模型执行