OpenBLAS on baremetal

155 views
Skip to first unread message

Bandhav Veluri

unread,
Dec 7, 2019, 8:48:32 PM12/7/19
to OpenBLAS-users
Hi,

I'm trying to build OpenBLAS library for a RISC-V baremetal processor. The runtime environment is not an OS and is just the C std library provided by Newlib. Is it possible to use OpenBLAS in such an environment? 

If yes, I'm guessing I'd have to compile OpenBLAS with just C sources without machine specific optimizations implemented in assembly kernels. I couldn't find such a target in TargetList.txt. If you're aware about any undocumented approach to achieve this, could you please share it?

Thank you,
Bandhav

martin-frbg

unread,
Dec 8, 2019, 5:05:33 PM12/8/19
to OpenBLAS-users

No idea if compilation in a baremetal environment will work, but a "generic" C-only build can be achieved either with the "ARMV5" target or by cloning the (somewhat outdated) risc-v branch that was created from https://github.com/xianyi/OpenBLAS/pull/1526 . Unfortunately the conclusion back then appeared to be that current RISCV implementations are sufficiently different from other plaforms that the cache-sized blocking code actually reduces performance there. (See comments in the link)

Bandhav Veluri

unread,
Dec 9, 2019, 5:05:16 PM12/9/19
to martin-frbg, OpenBLAS-users, Prof. Michael Taylor
Thanks Martin, I too couldn't find any works using OpenBLAS on baremetal too.

If I try to port OpenBLAS to baremetal, would it be worth the effort? Or, is this the case where I lose so much performance, I'm better of Netlib's LAPACK?

--
You received this message because you are subscribed to the Google Groups "OpenBLAS-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openblas-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openblas-users/0e9f954f-a14a-4427-b9fa-db9c8ab8872e%40googlegroups.com.

martin-frbg

unread,
Dec 10, 2019, 5:51:21 AM12/10/19
to OpenBLAS-users
I would not automatically expect it to be slower than the completely unoptimized netlib reference implementation, just not as good as it could be. (But I am only paraphrasing my understanding of Jerry Zhao's comments from #1526 here, and I have no idea how your particular RISCV target compares to whatever he was working with a year ago).


Am Montag, 9. Dezember 2019 23:05:16 UTC+1 schrieb Bandhav Veluri:
Thanks Martin, I too couldn't find any works using OpenBLAS on baremetal too.

If I try to port OpenBLAS to baremetal, would it be worth the effort? Or, is this the case where I lose so much performance, I'm better of Netlib's LAPACK?

On Sun, Dec 8, 2019 at 2:05 PM martin-frbg <martin...@mkroeker.de> wrote:

No idea if compilation in a baremetal environment will work, but a "generic" C-only build can be achieved either with the "ARMV5" target or by cloning the (somewhat outdated) risc-v branch that was created from https://github.com/xianyi/OpenBLAS/pull/1526 . Unfortunately the conclusion back then appeared to be that current RISCV implementations are sufficiently different from other plaforms that the cache-sized blocking code actually reduces performance there. (See comments in the link)

Am Sonntag, 8. Dezember 2019 02:48:32 UTC+1 schrieb Bandhav Veluri:
Hi,

I'm trying to build OpenBLAS library for a RISC-V baremetal processor. The runtime environment is not an OS and is just the C std library provided by Newlib. Is it possible to use OpenBLAS in such an environment? 

If yes, I'm guessing I'd have to compile OpenBLAS with just C sources without machine specific optimizations implemented in assembly kernels. I couldn't find such a target in TargetList.txt. If you're aware about any undocumented approach to achieve this, could you please share it?

Thank you,
Bandhav

--
You received this message because you are subscribed to the Google Groups "OpenBLAS-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openbla...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages