Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenBLAS: Build for riscv64 #10099

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

eschnett
Copy link
Contributor

No description provided.

@giordano
Copy link
Member

[22:23:05] In file included from ../common.h:444,
[22:23:05]                  from generic/trsm_utcopy_8.c:40:
[22:23:05] ../common_riscv64.h:95:11: fatal error: riscv_vector.h: No such file or directory
[22:23:05]    95 | # include <riscv_vector.h>
[22:23:05]       |           ^~~~~~~~~~~~~~~~
[22:23:05] compilation terminated.

It's the same error I've got trying to compile openblas on a RISC-V board with gcc 14

@giordano
Copy link
Member

In any case the header file was introduced in gcc 13: gcc-mirror/gcc@7d935cd. I believe we should change https://github.com/JuliaPackaging/BinaryBuilderBase.jl/blob/a548ba29890d3182961d6e477578beea8ffc3e27/src/Rootfs.jl#L478 to allow gcc 13+ only, we need a capable compiler, not an incomplete one.

@eschnett
Copy link
Contributor Author

It doesn't work with GCC 13 either.

I think the missing header file is part of an extension. We don't target this extension in our default ABI.

@giordano
Copy link
Member

giordano commented Dec 24, 2024

I think the missing header file is part of an extension.

It doesn't matter in the dynamic arch build, openblas build system sets compiler flags for the various extensions and then picks up the right kernels at runtime. This is what we do on all other architectures.

@giordano
Copy link
Member

It doesn't work with GCC 13 either.

If I'm reading

# GCC 12 doesn't support RISC-V vector instructions
# GCC 13 does not know the type `vfloat32m4x2_t`
correctly the error message is different, isn't it?

@eschnett
Copy link
Contributor Author

Yes, it's different. The missing header file is there, it's now about a type mismatch. That could be a problem in GCC or in OpenBLAS.

@eschnett
Copy link
Contributor Author

I'm trying to build protoc at the moment. The build fails with GCC 12 and succeeds with GCC 13. In other words, your original point stands – GCC 13 is better than GCC 12 for riscv64.

@eschnett
Copy link
Contributor Author

I think we want GCC 14: https://gcc.gnu.org/gcc-14/changes.html : "Support for the vector intrinsics as specified in version 1.0 of the RISC-V vector intrinsic specification."

@giordano giordano added julia 💜 ❤️ 💚 Builders and issues related to Julia and its dependencies linear algebra 🔢 labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
julia 💜 ❤️ 💚 Builders and issues related to Julia and its dependencies linear algebra 🔢
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants