WIP Dynamic linking of BLAS/LAPACK in scipy#473
Conversation
|
I finally found time to look into this. So far, it is failing with exactly the same error previously in #211 (comment) while running validation in asm2wasm, with, some function signatures don't seem to match. I think it might be something about libf2c, will try to link that statically. I'm not sure if |
|
@rth first of all thanks for trying.
If I recall correctly, the library paths specified in RUNTIME_LINKED_LIBS are then embedded into generated https://github.com/emscripten-core/emscripten/blob//14948aa1a96c/src/support.js#L188 Judging from this I would say that relative paths for linked DSOs should be supported. The error indeed could be not related to dynamic linking. I suggest to proceed as @kripken said in WebAssembly/binaryen#2177 (comment). Kirill |
|
@rth, good luck there! |
|
Hey, I think when I was changing things for upstream in my fork I may have fixed the things that make dynamic linking fail here.The key is the patch to binaryen and emscripten which makes dynamic calls run through the function pointer cast emulation. I also have patches to scipy, numpy and clapack that fix the function definition conflicts, as upstream needed it, but they wouldn't matter with dynamic linking with fpcast emulation turned on. They're in my fork at https://github.com/joemarshall/pyodide Relevant patches in https://github.com/joemarshall/pyodide/tree/master/emsdk/patches |
|
That's certainly a good news ! Thanks @joemarshall . I think we should probably first try to update to upstream emscripten backend following your comments in #476 before addressing this. |
Work in progress on dynamic linking of BLAS/LAPACK in scipy, which should remove the scipy package size significantly. This could be later extended to numpy and BLAS.
Closes #240
Closes #386
Closes #416