ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

riscv toolchain update

Open nihui opened this issue 3 years ago • 5 comments

gcc https://github.com/riscv-collab/riscv-gcc/tree/riscv-gcc-rvv-next/gcc/config/riscv clang https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/riscv_vector.td rvv https://github.com/riscv-non-isa/rvv-intrinsic-doc/blob/master/rvv-intrinsic-rfc.md

build error https://github.com/felixonmars/archriscv-packages/commit/0a6a7360b90d5c28eb4d66d52b3df1dcf7f8f854

  • [ ] update gcc toolchain ci (https://zhuanlan.zhihu.com/p/492845064)
  • [ ] add clang toolchain ci
  • [ ] change word_type to size_t

nihui avatar Jul 29 '22 02:07 nihui

I built a new gcc from riscv-collab/riscv-gcc.git:riscv-gcc-rvv-next(edffbea) with upstream binutils, and it seems that it doesn't require a lot of memory with make linux -j 8.

And it seems that we need some work for replacing tuple types in rvv intrinsic, because of upstream changes like new interface for segment load/store operation. I might to start this work soon.

Some discussion:

  1. Should we add another ci profile for new gcc toolchain, or just update it?
  2. Should we add some wrapper for compilers that uses tuple types(e.g. vfloat32m1x4)?

thelastlin avatar Aug 04 '22 16:08 thelastlin

  1. Should we add some wrapper for compilers that uses tuple types(e.g. vfloat32m1x4)?

Hello, there already have tuple type version of segment load/store intrinsics on GCC implementation.

lhtin avatar Aug 11 '22 07:08 lhtin

Hello, there already have tuple type version of segment load/store intrinsics on GCC implementation.

Thanks for your reply. It seems that clang-14 doesn't have the tuple version of segment load/store intrinsics, and some old GNU toolchains (for example, one currently used in ci) only have the tuple ones. I'm not sure about dropping these old toolchains support.

thelastlin avatar Aug 11 '22 12:08 thelastlin

@thelastlin
The old toolchain is no longer maintained. The "rvv-next" is the latest actively maintaining branch and will be eventually push GCC FSF upstream. It support tuple types too. So I would suggest you use the new RVV GCC

zhongjuzhe avatar Aug 13 '22 03:08 zhongjuzhe

The "rvv-next" is the latest actively maintaining branch and will be eventually push GCC FSF upstream. It support tuple types too. So I would suggest you use the new RVV GCC

Thanks for your reply and your awesome work on GCC!

But it seems that it doesn't have document about the tuple types. I checked out the old document(riscv-non-isa/rvv-intrinsic-doc.git: 459a793), and vcreate doesn't provided for the tuple types. Would you like to provide some notes about the tuple types?

thelastlin avatar Aug 13 '22 11:08 thelastlin

update riscv ci toolchain to gcc rvv-next branch and clang 15.0.1

nihui avatar Oct 01 '22 13:10 nihui