Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
identity算子aicpu ut编译报错
910b,cann-8.5.0-beta.1
bash build.sh --opkernel_aicpu_test --ops=identity
编译报缺少头文件dlog_pub.h:
dlog_pub.h
In file included from /home/x/Ascend/cann/x86_64-linux/include/aicpu_common/context/utils/log.h:17, from /home/x/ops-nn-master/control/identity/op_kernel_aicpu/identity_aicpu.cpp:14: /home/x/Ascend/cann/x86_64-linux/include/aicpu_common/context/utils/log_weak.h:14:10: fatal error: dlog_pub.h: No such file or directory 14 | #include "dlog_pub.h" | ^~~~~~~~~~~~ compilation terminated. make[3]: *** [control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/build.make:76: control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/identity_aicpu.cpp.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [CMakeFiles/Makefile2:505: control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:620: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/rule] Error 2 make: *** [Makefile:299: nn_aicpu_op_kernel_ut] Error 2
手动添加这个头文件之后仍然有链接错误:
/usr/bin/ld: /home/x/Ascend/cann/lib64/libaicpu_context_host.a(device_sharder.cc.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[3]: *** [tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/build.make:103: tests/ut/op_kernel_aicpu/nn_aicpu_op_kernel_ut] Error 1 make[2]: *** [CMakeFiles/Makefile2:613: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:620: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/rule] Error 2 make: *** [Makefile:299: nn_aicpu_op_kernel_ut] Error 2
算子的ut正常编译执行
In file included from /home/x/Ascend/cann/x86_64-linux/include/aicpu_common/context/utils/log.h:17, from /home/x/ops-nn-master/control/identity/op_kernel_aicpu/identity_aicpu.cpp:14: /home/x/Ascend/cann/x86_64-linux/include/aicpu_common/context/utils/log_weak.h:14:10: fatal error: dlog_pub.h: No such file or directory 14 | #include "dlog_pub.h" | ^~~~~~~~~~~~ compilation terminated. make[3]: *** [control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/build.make:76: control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/identity_aicpu.cpp.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [CMakeFiles/Makefile2:505: control/identity/op_kernel_aicpu/CMakeFiles/identity_cases_obj.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:620: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/rule] Error 2 make: *** [Makefile:299: nn_aicpu_op_kernel_ut] Error 2 /usr/bin/ld: /home/x/Ascend/cann/lib64/libaicpu_context_host.a(device_sharder.cc.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[3]: *** [tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/build.make:103: tests/ut/op_kernel_aicpu/nn_aicpu_op_kernel_ut] Error 1 make[2]: *** [CMakeFiles/Makefile2:613: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/all] Error 2 make[1]: *** [CMakeFiles/Makefile2:620: tests/ut/op_kernel_aicpu/CMakeFiles/nn_aicpu_op_kernel_ut.dir/rule] Error 2 make: *** [Makefile:299: nn_aicpu_op_kernel_ut] Error 2
感谢您的反馈,可以关联上您的PR,在验证后由commiter审视合入。
@huyihang1117
已经合入,可以关闭了
/close
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
Describe the current behavior / 问题描述 (Mandatory / 必填)
identity算子aicpu ut编译报错
Environment / 环境信息 (Mandatory / 必填)
910b,cann-8.5.0-beta.1
Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
bash build.sh --opkernel_aicpu_test --ops=identity编译报缺少头文件
dlog_pub.h:手动添加这个头文件之后仍然有链接错误:
Describe the expected behavior / 预期结果 (Mandatory / 必填)
算子的ut正常编译执行
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
Special notes for this issue/备注 (Optional / 选填)