StrawberryPerl / build-extlibs

16 stars 11 forks source link

LAPACKE and CBLAS #60

Open mohawk2 opened 1 month ago

mohawk2 commented 1 month ago

Recent (and indeed for a while) LAPACKs have LAPACKE (the official C interface) and CBLAS (ditto) code routinely distributed. I see Strawberry PDL edition has BLAS and LAPACK DLLs, but it doesn't have the LAPACKE/CBLAS DLLs, nor the headers.

Are you open to adding such?

shawnlaffan commented 1 month ago

We can look at adding them.

Can they enabled as part of the standard build or are they a separate build?

mohawk2 commented 1 month ago

As far as I can tell, very much standard build.

shawnlaffan commented 1 month ago

They might need some extra flags. The lapack build and packing setups are below. There is nothing disabling lapacke.

FWIW, MSYS2 package lapacke separately. https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-lapack/PKGBUILD

https://github.com/StrawberryPerl/build-extlibs/blob/d22291c1a0de960466d1983cb0af88bff8c974a7/build.sh#L1210-L1222

https://github.com/StrawberryPerl/build-extlibs/blob/d22291c1a0de960466d1983cb0af88bff8c974a7/pack.pl#L854-L868

shawnlaffan commented 1 month ago

lapacke might be off by default.
https://github.com/Reference-LAPACK/lapack/blob/4b3d8a46435f57462075f7c8f33b9bd1cf29a1dc/CMakeLists.txt#L344

mohawk2 commented 1 month ago

Ah, my mistake! And there's also the matter of the headers, which I don't think we're getting yet.

shawnlaffan commented 1 month ago

It's easy enough to add -DLAPACKE=ON to the cmake call. The libs and headers will be picked up once built.

Will give it a go when I next run an extlibs update.

mohawk2 commented 1 month ago

Great! By the way, here's a real stretch ask: what do you think of including OpenCL, along the lines of https://github.com/KhronosGroup/OpenCL-Guide/blob/main/chapters/getting_started_windows.md ? I'm having a go at it with MinGW and my place-with-space, which is blowing up cmake.

shawnlaffan commented 1 month ago

If there is a clear need then we can consider other packages, especially if they come via PRs. If they are a huge amount of effort then it comes down to available time.

mohawk2 commented 1 month ago

Fair enough, obviously! If I were confident enough that I could get a dev environment going for this specific system, I'd have a go myself. Or even if there were CI.

shawnlaffan commented 1 month ago

Do you mean the Strawberry Perl build system? It is set up to use docker - https://github.com/StrawberryPerl/spbuild

And FWIW, MSYS2 is usually a good source of patches and build steps.
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-opencl-headers/PKGBUILD

It won't fix paths with spaces, but can the build system be set up to work in a dir without spaces?