Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RISC-V: allow building scalable RVV support with GCC, LLVM 16 support#23383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
opencv-pushbot merged 1 commit intoopencv:4.xfrommshabunin:rvv-scalable-gcc
Apr 10, 2023

Conversation

@mshabunin
Copy link
Contributor

@mshabuninmshabunin commentedMar 21, 2023
edited
Loading

Related issue#22608

  • GCC does not support "overloaded RVV intrinsics", but we can add some of them in our code
  • LLVM since version 16 uses__riscv_<name> naming scheme (see related ticket), so we need to add compatibility headers to rename our 0.10 intinsics to the new scheme (also for some "overloaded intrinsics")

TODO:

  • check and fix compilation with GCC still does not work due to toolchain issue or limitation
  • extract overloaded intsinsics implementation to separate header
  • macros for overloaded intrinsics looks too broad, maybe convert them to function macros / inline functions / undef? used headers from RISC-V collab as is
  • clean-up the code - reduce modifications

Note: scalable RVV compilation using GCC still does not work (T-Head 2.6.1 and RISC-V Collab Toolchain@rvv_next) due to compiler issues or limitations. More analysis needed.

force_builders=Custombuild_image:Custom=riscv-clang-rvvXbuild_image:Custom=riscv-clang-rvv-128Xbuild_image:Custom=riscv-gcc-rvv-07test_modules:Custom=core,imgproc,dnnbuildworker:Custom=linux-4test_timeout:Custom=600build_contrib:Custom=OFF

@mshabuninmshabunin marked this pull request as ready for reviewApril 5, 2023 11:19
@opencv-alalekopencv-alalek added this to the4.8.0 milestoneApr 6, 2023
Copy link
Contributor

@opencv-alalekopencv-alalek left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@opencv-alalekopencv-alalek self-assigned thisApr 6, 2023
@zhongjuzhe
Copy link

Can you use upstream GCC (GCC 13.0) test? We don't maintain rvv-next any more. All update upstream GCC directely.
https://github.com/gcc-mirror/gcc

@opencv-pushbotopencv-pushbot merged commitdaf9de7 intoopencv:4.xApr 10, 2023
@opencv-alalek
Copy link
Contributor

@zhongjuzhe Thank you for the information!
Is there some example how to build RISC-V GCC toolchain from upstream source code? (similar tohttps://github.com/riscv-collab/riscv-gnu-toolchain instructions)
CI logs? Or Dockerfile?

@zhongjuzhe
Copy link

It seems that RISC-V toolchain doesn't bump to latest upstream GCC. I think you can file an issue to@kito-cheng and ask him to update the toolchain.

Here is an simple example to verify that both GCC and LLVM are consisten each other with the same API doc:
https://godbolt.org/z/dz83ozbeb

compiler explorer has showed that both GCC and LLVM are recognizing same API RVV.

opencv-alalek reacted with thumbs up emoji

@mshabunin
Copy link
ContributorAuthor

I've been able to build riscv-collab toolchain with the latest GCC by updatinggcc submodule tomaster manually. It can build OpenCV with scalable RVV support, but failed to build non-scalable (intrin_rvv.hpp) variant. I'm going to take a closer look.@zhongjuzhe , thank you for guidance!

@mshabuninmshabunin deleted the rvv-scalable-gcc branchApril 17, 2023 10:21
@zhongjuzhe
Copy link

zhongjuzhe commentedApr 17, 2023 via email

Thank you for trying.Feel free file a bug here:https://gcc.gnu.org/bugzilla/if you see any compiler bug.Thanks.***@***.***From: Maksim ShabuninDate: 2023-04-17 18:21To: opencv/opencvCC: Ju-Zhe Zhong; MentionSubject: Re: [opencv/opencv] RISC-V: allow building scalable RVV support with GCC, LLVM 16 support (PR#23383)I've been able to build riscv-collab toolchain with the latest GCC by updating gcc submodule to master manually. It can build OpenCV with scalable RVV support, but failed to build non-scalable (intrin_rvv.hpp) variant. I'm going to take a closer look.@zhongjuzhe , thank you for guidance!—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>

@asmorkalovasmorkalov mentioned this pull requestMay 31, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@opencv-alalekopencv-alalekopencv-alalek approved these changes

Assignees

@opencv-alalekopencv-alalek

Projects

None yet

Milestone

4.8.0

Development

Successfully merging this pull request may close these issues.

4 participants

@mshabunin@zhongjuzhe@opencv-alalek@opencv-pushbot

[8]ページ先頭

©2009-2025 Movatter.jp