xuantie-rv / csi-nn2 Goto Github PK
View Code? Open in Web Editor NEWAn optimized neural network operator library for chips base on Xuantie CPU.
License: Apache License 2.0
An optimized neural network operator library for chips base on Xuantie CPU.
License: Apache License 2.0
#define SHL_USE_DOT_INT8 // default: support int8 dot
请问int8 dot指的什么呢?
I'm using the Docker image given in one of T-Head tutorial. Once I've fixed the C906 path in the example, I have an error with the shl_ref
header file.
root@f562828a54da:/home/example/manip_pascal/csi-nn2/example# make
riscv64-unknown-linux-gnu-gcc c906_mobilenetv1_f16.c -o c906_mobilenetv1_f16.elf -I../include ../install_nn2/c906/lib/libshl_c906.a -lm -static
c906_mobilenetv1_f16.c:19:10: fatal error: shl_ref.h: No such file or directory
19 | #include <shl_ref.h>
| ^~~~~~~~~~~
想修改th1520的工具链,维npu新增算子,但是shl无法编译th1520
Toolchain: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-20220906.tar.gz
Reproduce:
make nn2_c908
got
/mnt/home-nas/work/repo/csi-nn2/source/thead_rvv/data_convert.c: In function 'shl_rvv_data_convert_int8_to_int4':
/mnt/home-nas/work/repo/csi-nn2/source/thead_rvv/data_convert.c:48:26: error: implicit declaration of function 'vpnclip_wx_i8m1'; did you mean 'vnclip_wx_i8m1'? [-Werror=implicit-function-declaration]
48 | vint8m1_t _res = vpnclip_wx_i8m1(vreinterpret_v_i8m2_i16m2(_tmp), 0, vl / 2);
| ^~~~~~~~~~~~~~~
| vnclip_wx_i8m1
/mnt/home-nas/work/repo/csi-nn2/source/thead_rvv/data_convert.c:48:26: error: incompatible types when initializing type 'vint8m1_t' using type 'int'
/mnt/home-nas/work/repo/csi-nn2/source/thead_rvv/data_convert.c: In function 'shl_rvv_data_convert_int4_to_int8':
/mnt/home-nas/work/repo/csi-nn2/source/thead_rvv/data_convert.c:71:27: error: implicit declaration of function 'vpwadd_vx_i16m2'; did you mean 'vwadd_vx_i16m2'? [-Werror=implicit-function-declaration]
71 | vint16m2_t _tmp = vpwadd_vx_i16m2(_input, 0, vl);
| ^~~~~~~~~~~~~~~
| vwadd_vx_i16m2
/mnt/home-nas/work/repo/csi-nn2/source/thead_rvv/data_convert.c:71:27: error: incompatible types when initializing type 'vint16m2_t' using type 'int'
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/c908_static.dir/build.make:7454: CMakeFiles/c908_static.dir/source/thead_rvv/data_convert.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/c908_static.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
非常感谢,这个库对我们很有帮助,我们打算移植到其他硬件平台上,谢谢!
这个库里提到的算子可以在嘉楠k230 riscv 大核上运行吗?有相关文档吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.