Skip to content

cmake: fix RISC-V toolchains#22928

Merged
opencv-pushbot merged 2 commits intoopencv:4.xfrom
alalek:riscv_toolchains
Dec 13, 2022
Merged

cmake: fix RISC-V toolchains#22928
opencv-pushbot merged 2 commits intoopencv:4.xfrom
alalek:riscv_toolchains

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Dec 7, 2022

  • RVV options are moved to configuration scripts instead of toolchains
cmake ... -DCPU_BASELINE=RVV

Extra cmake options:

  • RISCV_RVV_SCALABLE: ON/OFF
  • redefine CPU_RVV_FLAGS_ON if -march=rv64gcv should be replaced e.g. for -march=rv64gcv_zfh

List of changes:

  • riscv64-071-gcc.toolchain.cmake - no changes (deprecated)
  • riscv64-clang.toolchain.cmake - dropped v to avoid forcing of RVV, moved out SCALABLE option from toolchain
  • riscv64-gcc.toolchain.cmake - dropped v to avoid forcing of RVV
  • riscv64-gnu.toolchain.cmake - dropped on favor of riscv-gnu.toolchain.cmake
  • riscv.toolchain.cmake - fixed multiple issues and renamed to riscv-gnu.toolchain.cmake
allow_multiple_commits=1
force_builders=Custom
Xbuild_image:Custom=riscv-gcc
build_image:Custom=riscv-gcc-rvv
Xbuild_image:Custom=riscv-clang
Xbuild_image:Custom=riscv-clang-rvv
Xbuild_image:Custom=riscv-clang-rvv-128
test_modules:Custom=core,imgproc,dnn
buildworker:Custom=linux-1
test_timeout:Custom=600
build_contrib:Custom=OFF

@asmorkalov
Copy link
Copy Markdown
Contributor

/cc @hanliutong

@hanliutong
Copy link
Copy Markdown
Contributor

Hello @alalek , could you please point out how can we enable RVV with this patch?

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Dec 8, 2022

RVV handling becomes similar to SSE/AVX/NEON/PPC/MSA, through CPU_BASELINE cmake option. Updated PR's description.

- RVV options are moved to configuration scripts instead of toolchains
@opencv-pushbot opencv-pushbot merged commit 4203c90 into opencv:4.x Dec 13, 2022
@alalek alalek mentioned this pull request Jan 8, 2023
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.

5 participants