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
Package OpenBLAS and use OpenBLAS in scipy #3331
Merged
Merged
Changes from 7 commits
Commits
Show all changes
113 commits
Select commit
Hold shift + click to select a range
50fe021
Add OpenBLAS package
lesteve 380b1c7
Remove some stuff
lesteve c807d85
Switch to OpenBLAS develop branch
lesteve c57d320
Build openblas in core build
lesteve f026e63
iter
lesteve fc771f1
iter
lesteve c7dce40
Add build for openblas only to quick fail
lesteve 78e8eeb
Copy all .h from openblas in package/.libs/include
lesteve e8141b8
Attempt at using openblas in scipy
lesteve 125634d
May actually need this
lesteve b945cca
Revert "Add build for openblas only to quick fail"
lesteve 228f50f
iter
lesteve 7057189
Build scipy too in core + numpy build
lesteve 83a66a5
iter
lesteve 27d38dc
iter
lesteve 1e5743c
Attempt to replace void by int returns
lesteve ed2a969
Use LDFLAGS
lesteve 285d34e
Remove -std=c++14 flag
lesteve 48ba869
trigger CI
lesteve 27a63ab
wip
lesteve 3267085
Trigger CI
lesteve d73c122
Merge branch 'main' of https://github.com/pyodide/pyodide into use-op…
lesteve 6ded2d5
Trigger CI
lesteve 02c7f6f
Revert unwanted change?
lesteve cdf7b3b
wip
lesteve 5960c81
Merge branch 'main' of https://github.com/pyodide/pyodide into use-op…
lesteve 2480b40
Trigger CI
lesteve f3f01f3
wip
lesteve 9973316
fix
lesteve 35ec411
Merge remote-tracking branch 'upstream/main' into use-openblas
rth a85f789
wip
lesteve 41fa6d6
Remove scipy_slu_config.h patch
hoodmane 1f04fa9
Try again with scipy_slu_config.h patch
hoodmane d34a738
Rediff make-int-returns patch
hoodmane e95b32f
Fix patch again...
hoodmane 579cf40
Remove patch that removes zcopy decl
hoodmane 568ab35
Remove some more header removal parts from the patch
hoodmane 1f4cba0
Fix scipy patch again
hoodmane 7e57cf8
Update ilu_cdrop_row void to int patch
hoodmane f974023
Use sed to replace some more void return values with ints
hoodmane 2877657
Apply replacement to both .c and .h files
hoodmane 55d370a
More sed for void to int
hoodmane 731e5b6
Add patch for https://github.com/scipy/scipy/pull/18124
hoodmane 561e3db
Add -Wno-parentheses to cflags
hoodmane 61393e8
Add another sed
hoodmane f5eb7db
More sed
hoodmane 4c3bf9e
More sed
hoodmane 3cd21d7
MORE INT!
hoodmane 2fd7b71
Fix typo
hoodmane be005b3
Fix declaration of sasum in blas_subroutine wrappers.c
hoodmane 7e912d5
Patch more bad return types in blas_subroutine_wrappers.c
hoodmane 00d2622
Apply doublereal ==> float replacement on all f2c output
hoodmane 5c11873
Don't apply transform to GMRESREVCOM
hoodmane 9d7cbe4
More fixes
hoodmane a474a9f
Add comment
hoodmane 1e1e4c2
Fix return type of clanhs too screw you f2c
hoodmane d865c60
Merge branch 'main' of https://github.com/pyodide/pyodide into use-op…
lesteve 966c40b
Use f2c -R to avoid generating doublereal return types instead of float
lesteve 25f8f69
Avoid c_abs symbol conflict
lesteve eaa1356
Update OpenBLAS to 0.3.22 release
lesteve 9fe97d2
LAPACKE not needed
lesteve 6d0391c
scipy compiles
lesteve 334151c
scipy loads in browser
lesteve cc68e64
Hacky reuse of CLAPACK to include f2c symbols into libopenblas.so
lesteve 65c3a38
Remove RIMME f2clapack.sh attempt
lesteve c8dc2d9
Use openblas in suitesparse
lesteve d418127
Build full scipy
lesteve 648f204
Fix signature mismatch in scipy.stats
lesteve 8e51195
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] feabda1
Remove some unwanted real -> double changes
lesteve 59becc0
Fix issue in arpack (but complext tests fail)
lesteve 5a874a0
gensim work-around
lesteve 9680caf
Remove some stuff from scipy patch without being 100% sure ...
lesteve fbb27fe
Debug zgetrf issue through Cython scipy linalg bindings
lesteve b90d7bc
Revert "Debug zgetrf issue through Cython scipy linalg bindings"
lesteve 7bbd289
Update OpenBLAS to 0.3.23 which fixes 0 determinant for complex matrices
lesteve 38d6c55
Update pyodide-build/pyodide_build/_f2c_fixes.py
lesteve f5bded8
Update packages/CLAPACK/meta.yaml
lesteve 06d7e10
Add comment about f2c -R
lesteve 19548f2
Remove unneeded patches
lesteve bcf8306
Removed commented out code
lesteve cd7879e
Remove ilaenv and xerbla f2py wrapper
lesteve 1687559
Rename CLAPACk -> libf2c and remove mentions of CLAPACK where appropr…
lesteve c387cd8
Reduce scipy subpackages by perl replacement
lesteve ef87b37
Add tip to build less scipy sub-packages and reduce iteration time
lesteve 63ffba0
Update libf2c patches
lesteve 5d88956
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9fbe4e4
[ci skip] Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
lesteve c3a4e06
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 23c4df5
Reinstate prettierignore + tweaks
lesteve 6a2d944
Fix libf2c meta.yaml
lesteve 7db7ff6
Revert unwanted change to make.inc
lesteve b83ad8b
Change version name ...
lesteve bc1f360
Update scipy patches
lesteve 610025a
Add scipy Boost patch
lesteve 05e22f9
Remove sed replacement since it is done in a patch
lesteve eb49920
Use gensim patch rather than cryptic sed replacement
lesteve 0e26683
Remove unneeded flag for OpenBLAS
lesteve 3a4f32f
Minor tweak to scipy tip
lesteve 246ca91
OpenBLAS headers not needed for scipy compilation
lesteve 3b27a89
Add comment about patch included upstream
lesteve 45b8727
Add comment about OpenBLAS flag
lesteve 94c50b0
Add comment about libf2c
lesteve 734be58
Remove unneeded flag
lesteve 7ae7f08
Path xerbla_array rather than regex replacement
lesteve 82f6703
Keep c_abs and z_abs in OpenBLAS
lesteve 608a64d
Fix c_abs signature
lesteve 10f6268
Revert unwanted change
lesteve 6bf026c
Add missing file
lesteve 2d3effe
Trigger CI
lesteve 4b198ff
libf2c is a static library now
lesteve 119038f
Merge branch 'main' of https://github.com/pyodide/pyodide into use-op…
lesteve f0753d6
Add changelog entry
lesteve File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package: | ||
name: openblas | ||
version: de4d5646eb1ac6a0e663a4c9bc797dad8226aedb | ||
|
||
source: | ||
sha256: 148a959b61ffa4d77e810ceb3114765501d70c982cbb302a00954b81bc918e46 | ||
url: https://github.com/xianyi/OpenBLAS/archive/de4d5646eb1ac6a0e663a4c9bc797dad8226aedb.zip | ||
patches: | ||
- patches/0001-Add-Wno-implicit-function-declaration-flag.patch | ||
|
||
build: | ||
type: shared_library | ||
script: | | ||
# seems like .zip does not maintain executable flags, need to reset these | ||
chmod u+x c_check | ||
chmod u+x f_check | ||
chmod u+x exports/gensymbol | ||
make CC=emcc HOSTCC=gcc TARGET=RISCV64_GENERIC NOFORTRAN=1 USE_THREAD=0 | ||
mkdir -p dist | ||
cp libopenblas.so dist/ | ||
mkdir -p ${WASM_LIBRARY_DIR}/{lib,include} | ||
# TODO do I need include as in CLAPACK? | ||
# cp -r INCLUDE/* ${WASM_LIBRARY_DIR}/include | ||
cp dist/libopenblas.so ${WASM_LIBRARY_DIR}/lib |
25 changes: 25 additions & 0 deletions
25
packages/openblas/patches/0001-Add-Wno-implicit-function-declaration-flag.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 09fd1aa0aa6a98e1cebaa6e34fca1e424dab8f48 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= <loic.esteve@ymail.com> | ||
Date: Fri, 9 Dec 2022 16:40:13 +0100 | ||
Subject: [PATCH] Add -Wno-implicit-function-declaration flag | ||
|
||
--- | ||
Makefile.rule | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/Makefile.rule b/Makefile.rule | ||
index 5f787a9c..6890046a 100644 | ||
--- a/Makefile.rule | ||
+++ b/Makefile.rule | ||
@@ -228,7 +228,7 @@ NO_AFFINITY = 1 | ||
# Common Optimization Flag; | ||
# The default -O2 is enough. | ||
# Flags for POWER8 are defined in Makefile.power. Don't modify COMMON_OPT | ||
-# COMMON_OPT = -O2 | ||
+COMMON_OPT = -O2 -Wno-implicit-function-declaration | ||
|
||
# gfortran option for LAPACK to improve thread-safety | ||
# It is enabled by default in Makefile.system for gfortran | ||
-- | ||
2.34.1 | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have guessed yes, but you can also probably not include it and see if there are any related include errors as done now.