You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds riscv64 trampoline and gnu/musl ILP64/LP64 support (in lapack terms, not to be confused with riscv abi name). I tested on gentoo glibc with lapack. The trampoline assembly is universal and should also work with musl.
I'm afraid that I am very much out of my depth with RISCV. A few questions for you:
Are there OpenBLAS binaries that can be tested against on RISCV? It would give me a lot of confidence if LBT could be tested against something like OpenBLAS. I know the test suite of LBT itself uses Julia, which is perhaps not the most helpful thing, considering you need LBT to build Julia..... but I can help you to compile some simple tests, it's mostly just a matter of compiling directories such as the sdot_test with the correct compiler flags.
Is there a convenient QEMU setup or something that I can use to test/try this out? If we get RISCV support working well, I'd like to eventually add CI for it via a QEMU setup.
Are you using LBT for your own project, or trying to port Julia or what? :D
yes, openblas supports riscv from 2018. Major distros all have support for riscv and should provide openblas binaries including Ubuntu, Archlinux, Fedora, etc. And thanks for the testing tips. I previously used the test commands demonstrated on the julia talk https://www.youtube.com/watch?app=desktop&v=t6hptekOR7s . I have tested with openblas
$ export LBT_DEFAULT_LIBS=/usr/lib64/libopenblas64.so
$ gcc -o sdot_test -DILP64 sdot_test.c -L../../src/build -lblastrampoline
$ export LD_LIBRARY_PATH=../../src/build
$ ./sdot_test
C is: 1.9900
I primarily use Gentoo, the stage3 tarball is directly bootable on qemu after being decompressed with minor config in /etc. For binary distros, Fedora image might be simple to setup. https://fedoraproject.org/wiki/Architectures/RISC-V/Installing. And Ubuntu as well, https://wiki.ubuntu.com/RISC-V. I also saw there is this rocksdb issue where there are lots of details setting up qemu for riscv dev.
For ci integration afaik, PLCT lab offers free riscv hardware access by request. They have lots of sifive unmatched and d1 boards. rocksdb and prolog community are using it. https://github.com/plctlab/riscv-lab-access
I am looking to port Julia by first clearing up all its dependencies, but not fully committed to it. just hope this can reduce a little bit work of others porting julia. It seems to me in the past arm gained Julia support not very difficultly. LLVM 14 also has orc jit support for riscv.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
This adds riscv64 trampoline and gnu/musl ILP64/LP64 support (in lapack terms, not to be confused with riscv abi name). I tested on gentoo glibc with lapack. The trampoline assembly is universal and should also work with musl.