CANN/asc-devkit算子属性注册

发布时间:2026/7/18 10:25:11
CANN/asc-devkit算子属性注册 Attr【免费下载链接】asc-devkit本项目是CANN 推出的昇腾AI处理器专用的算子程序开发语言原生支持C和C标准规范主要由类库和语言扩展层构成提供多层级API满足多维场景算子开发诉求。项目地址: https://gitcode.com/cann/asc-devkit功能说明注册算子属性参数。当需要设置的参数不参与kernel侧计算时可以将该参数注册为算子属性参数。函数原型OpAttrDef Attr(const char *name)参数说明参数输入/输出说明name输入算子属性名称。返回值说明算子属性定义OpAttrDef请参考OpAttrDef。约束说明Attr属性名不能与以下python关键字及内置变量名相同否则会导致未定义错误。常见python关键字参考and、 as、 assert、 break、 class、 continue、 def、 del、 elif、 else、 except、 finally、 for、 from、 global、 if、 import、 in、 is、 lambda、 not、 or、 pass、 raise、 return、 try、 while、 with、 yield、 False、 None、 True、 nonlocal、 arg。内置变量名__inputs__、 __outputs__、 __attrs__、 options、 bisheng、 bisheng_path、 tikcpp_path、 impl_mode、 custom_compile_options、 custom_all_compile_options、 soc_version、 soc_short、 custom_compile_options_soc、 custom_all_compile_options_soc、 origin_func_name、 ascendc_src_dir_ex、 ascendc_src_dir、 ascendc_src_file、 src、 op_type、 code_channel、 op_info、 compile_op、 get_code_channel、 result、 isinstance、 attr、 get_current_build_config、 _build_args、 get_dtype_fmt_options、 shutil、 os、 get_kernel_source、ascendc_api_version_header_path、ascendc_api_version_file、ascendc_api_version、re。【免费下载链接】asc-devkit本项目是CANN 推出的昇腾AI处理器专用的算子程序开发语言原生支持C和C标准规范主要由类库和语言扩展层构成提供多层级API满足多维场景算子开发诉求。项目地址: https://gitcode.com/cann/asc-devkit创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考