Skip to content

Fixed build error hal_rvv_071#25793

Merged
asmorkalov merged 4 commits intoopencv:4.xfrom
MaximMilashchenko:hal_rvv
Jun 28, 2024
Merged

Fixed build error hal_rvv_071#25793
asmorkalov merged 4 commits intoopencv:4.xfrom
MaximMilashchenko:hal_rvv

Conversation

@MaximMilashchenko
Copy link
Copy Markdown
Contributor

@MaximMilashchenko MaximMilashchenko commented Jun 20, 2024

Fixed bug with enabling vector header when vector extension is disabled (RVV=OFF) in hal_rvv_071

force_builders=Custom
build_image:Custom=riscv-gcc
Xbuild_image:Custom=riscv-clang-rvv
Xbuild_image:Custom=riscv-clang-rvv-128
Xbuild_image:Custom=riscv-gcc-rvv-07
test_modules:Custom=core,imgproc,dnn
buildworker:Custom=linux-4
test_timeout:Custom=600
build_contrib:Custom=OFF

@opencv-alalek
Copy link
Copy Markdown
Contributor

I believe we should disable RVV HAL instead.
There is no sense to keep it enabled without RVV compiler support.

@MaximMilashchenko
Copy link
Copy Markdown
Contributor Author

I believe we should disable RVV HAL instead. There is no sense to keep it enabled without RVV compiler support.

Changed the flag state to off unless otherwise specified. Removed dependency on CV_DISABLE_OPTIMIZATION. I did not make any changes to cmake to check rvv, since we decided to abandon this and check its version and availability using compiler macros

@Junyan721113
Copy link
Copy Markdown
Contributor

Currently NDSRVP is affected by the flag state.
CMake with Andes toolchains:

--   Other third-party libraries:
--     Lapack:                      NO
--     Custom HAL:                  YES (HAL RVV (ver 0.0.1) ndsrvp (ver 0.0.1))
--     Protobuf:                    build (3.19.1)
--     Flatbuffers:                 builtin/3rdparty (23.5.9)
In file included from /home/junyan/opencv_rvp/build/custom_hal.hpp:5,
                 from /home/junyan/opencv_rvp/modules/core/src/hal_replacement.hpp:968,
                 from /home/junyan/opencv_rvp/modules/core/src/precomp.hpp:92,
                 from /home/junyan/opencv_rvp/modules/core/src/alloc.cpp:43:
/home/junyan/opencv_rvp/3rdparty/hal_rvv/hal_rvv.hpp:8:10: fatal error: riscv_vector.h: No such file or directory
    8 | #include <riscv_vector.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

@opencv-alalek
Copy link
Copy Markdown
Contributor

@Junyan721113 Please use cmake ... -DWITH_HAL_RVV=OFF as temporary workaround.

@opencv-alalek opencv-alalek added this to the 4.11.0 milestone Jun 26, 2024
Copy link
Copy Markdown
Contributor

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asmorkalov asmorkalov merged commit 7867267 into opencv:4.x Jun 28, 2024
@asmorkalov asmorkalov mentioned this pull request Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants