Created by: NHZlX
This PR supports: Paddle can be compiled on nv jetson hardware for inference, which can make full use of the acceleration performance of Paddle-TRT.
When doing cmake, we should turn off some switches like WITH_MKL, WITH_MKLDNN, WITH_ XBYAK, which can not be used for arm architecture.
Use as follows:
cmake .. \
-DWITH_CONTRIB=OFF \
-DWITH_MKL=OFF \
-DWITH_MKLDNN=OFF \
-DWITH_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DON_INFER=ON \
-DWITH_PYTHON=OFF \
-DWITH_XBYAK=OFF \
-DWITH_NV_JETSON=ON \
Errors will be reported during compilation on jetson when using the v0.2.20. The Errors are as follows:
getarch_2nd.c: In function ‘main’:
getarch_2nd.c:12:35: error: ‘SGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did you mean ‘QGEMM_DEFAULT_UNROLL_M’?
printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^~~~~~~~~~~~~~~~~~~~~~
QGEMM_DEFAULT_UNROLL_M
getarch_2nd.c:12:35: note: each undeclared identifier is reported only once for each function it appears in
getarch_2nd.c:13:35: error: ‘SGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did you mean ‘SGEMM_DEFAULT_UNROLL_M’?
printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^~~~~~~~~~~~~~~~~~~~~~
SGEMM_DEFAULT_UNROLL_M
getarch_2nd.c:14:35: error: ‘DGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did you mean ‘SGEMM_DEFAULT_UNROLL_M’?
printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^~~~~~~~~~~~~~~~~~~~~~
SGEMM_DEFAULT_UNROLL_M
getarch_2nd.c:15:35: error: ‘DGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did you mean ‘DGEMM_DEFAULT_UNROLL_M’?
printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^~~~~~~~~~~~~~~~~~~~~~
DGEMM_DEFAULT_UNROLL_M
getarch_2nd.c:19:35: error: ‘CGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did you mean ‘DGEMM_DEFAULT_UNROLL_M’?
printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
^~~~~~~~~~~~~~~~~~~~~~
DGEMM_DEFAULT_UNROLL_M
getarch_2nd.c:20:35: error: ‘CGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did you mean ‘CGEMM_DEFAULT_UNROLL_M’?
printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
^~~~~~~~~~~~~~~~~~~~~~
CGEMM_DEFAULT_UNROLL_M
getarch_2nd.c:21:35: error: ‘ZGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did you mean ‘CGEMM_DEFAULT_UNROLL_M’?
printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
^~~~~~~~~~~~~~~~~~~~~~
CGEMM_DEFAULT_UNROLL_M
getarch_2nd.c:22:35: error: ‘ZGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did you mean ‘ZGEMM_DEFAULT_UNROLL_M’?
printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
^~~~~~~~~~~~~~~~~~~~~~
ZGEMM_DEFAULT_UNROLL_M
make[3]: *** [getarch_2nd] Error 1
So we updated the openblas version to v0.3.7. This update was also verified on x86 platform for correctness.