Fix LoongArch Macro Definition#23920
Conversation
|
@fengyuentau @WanliZhong Could review and test the PR? |
|
|
@CNClareChen I think Macro was written incorrectly due to carelessness in PR-22040 |
Thank you for fixing this error. In previous compiler versions, there was a "__loongarch" macro. It is now more appropriate to use the "_loongarch_ " macro. |
|
ty |
|
Thank you for contribution! I tested your PR on our loongson server and the failed test cases are listed as follows: Full log is available here: logs-10294a8.zip Tests are done with your branch with build flags: cmake -B build -DCMAKE_INSTALL_PREFIX=build/install opencv/
cmake --build build/ --target install -j 30Test scripts: #!/bin/bash
export OPENCV_TEST_DATA_PATH=/home/opencv-cn/Workspace/opencv/opencv_extra/testdata
export OPENCV_DNN_TEST_DATA_PATH=/home/opencv-cn/Workspace/opencv-ci/dnn-models
bin=(opencv_test_calib3d opencv_test_core opencv_test_dnn opencv_test_features2d opencv_test_flann opencv_test_gapi opencv_test_highgui opencv_test_imgcodecs opencv_test_imgproc opencv_test_ml opencv_test_objdetect opencv_test_photo opencv_test_stitching opencv_test_video opencv_test_videoio)
PREFIX=./build/bin
LOGS=logs
if [ ! -d "/path/to/dir" ]
then
mkdir ${LOGS}
fi
for i in "${bin[@]}"
do
${PREFIX}/$i | tee ${LOGS}/$i.txt
done/cc @asmorkalov |
|
@fengyuentau Those failed test are caused by opencl not this patch. It is recommended to use the “-DWITH_OPENCL=OFF” build flag when building opencv on the loongarch platform. |
Rebuilt with UPDATE: Tested without this patch and those tests are still failed. So they are indeed not related to this patch. |
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.