stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

[RFC]: Upgrade OpenBLAS dependency

Open rreusser opened this issue 1 year ago • 4 comments

Description

OpenBLAS 0.2.19 is almost eight years out of date.

As a result, I ran into issues running make install-deps-openblas. See truncated error logs below:
... 
Makefile:488: warning: undefined variable `CCBLASOBJS'
Makefile:488: warning: undefined variable `CCBLASOBJS_P'
Makefile:488: warning: undefined variable `CZBLASOBJS'
Makefile:488: warning: undefined variable `CZBLASOBJS_P'
Makefile:488: warning: undefined variable `CXBLASOBJS'
Makefile:488: warning: undefined variable `CXBLASOBJS_P'

<output truncated>

gemm.c:403:103: error: use of undeclared identifier 'GEMM_DEFAULT_OFFSET_B'
  sb = (XFLOAT *)(((BLASLONG)sa + ((GEMM_P * GEMM_Q * COMPSIZE * SIZE + GEMM_ALIGN) & ~GEMM_ALIGN)) + GEMM_OFFSET_B);
                                                                                                      ^   
../common_param.h:972:23: note: expanded from macro 'GEMM_OFFSET_B'
#define GEMM_OFFSET_B   GEMM_DEFAULT_OFFSET_B
                        ^   
6 errors generated.
make[2]: *** [sgemm.o] Error 1
make[1]: *** [libs] Error 1
make: *** [deps-install-openblas] Error 2

Upgrading to 0.3.27 resulted in successful installation. I propose to upgrade the repo URL, checksum, and version to result in successful OpenBLAS installation.

Related Issues

No response

Questions

  • Do we need to lock down more build flags along with this? See:

    https://github.com/stdlib-js/stdlib/blob/466b5aa2ef6075528418c8fb86bf91566242f95a/tools/make/common.mk#L406-L480

  • Are there other compatibility issues/concerns/validations which would need to accompany this change?

Other

No.

Checklist

  • [X] I have read and understood the Code of Conduct.
  • [X] Searched for existing issues and pull requests.
  • [X] The issue name begins with RFC:.

rreusser avatar May 03 '24 05:05 rreusser

@rreusser This would be a welcome addition. And indeed, upgrading OpenBLAS has been a TODO.

kgryte avatar May 03 '24 05:05 kgryte

@rreusser I originally based everything on how Julia manages OpenBLAS: https://github.com/JuliaLang/julia/blob/master/deps/openblas.mk

kgryte avatar May 03 '24 05:05 kgryte

You can probably cross-reference there to see if we are missing anything in terms of build flags.

kgryte avatar May 03 '24 05:05 kgryte

...and no backward compatibility concerns we need to work about. Previous OpenBLAS support via stdlib was always experimental.

kgryte avatar May 03 '24 05:05 kgryte