Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,14 @@ jobs:
consumer_test.exe

test-emscripten:
name: Test WebAssembly BLIS
name: Test WebAssembly BLIS (Emscripten ${{ matrix.emscripten-version }})
needs: get_commit_message
if: needs.get_commit_message.outputs.run_tests == '1'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
emscripten-version: ['5.0.3', '6.0.5']
defaults:
run:
shell: bash -el {0}
Expand All @@ -288,7 +292,7 @@ jobs:
- name: Set up Emscripten
uses: emscripten-core/setup-emsdk@v16
with:
version: 5.0.3
version: ${{ matrix.emscripten-version }}

- name: Print environment info
run: |
Expand Down
24 changes: 20 additions & 4 deletions tools/wasm/blis/0001-Compile-BLIS-to-WebAssembly.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 85aa27abe96e988adc8fdfbf61844bfd3307ccbf Mon Sep 17 00:00:00 2001
From feffb747487842316891c39d47a2289a3384bdcd Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Tue, 30 Jun 2026 06:06:59 +0530
Subject: Compile BLIS to WebAssembly
Subject: [PATCH 1/2] Compile BLIS to WebAssembly

This is a squashed patch from https://github.com/agriyakhetarpal/blis/pull/1
and applied on top of the v2.1 release of BLIS. See the release notes at:
Expand All @@ -17,7 +17,9 @@ The following changes have been made:
* Declare BLIS_ARCH_WASM32
* Compile with PIC for Pyodide shared module
* Add family and kernel definitions headers
* Feature-detect Emscripten with __EMSCRIPTEN__ for Emscripten 6 compatibility

Co-Authored-By: Hood Chatham <roberthoodchatham@gmail.com>
---
config/wasm32/bli_cntx_init_wasm32.c | 40 +++++++++++++
config/wasm32/bli_family_wasm32.h | 38 +++++++++++++
Expand All @@ -27,8 +29,9 @@ The following changes have been made:
configure | 6 ++
frame/base/bli_arch.c | 7 +++
frame/include/bli_gentconf_macro_defs.h | 12 +++-
frame/include/bli_system.h | 2 +-
frame/include/bli_type_defs.h | 3 +
9 files changed, 218 insertions(+), 1 deletion(-)
10 files changed, 219 insertions(+), 2 deletions(-)
create mode 100644 config/wasm32/bli_cntx_init_wasm32.c
create mode 100644 config/wasm32/bli_family_wasm32.h
create mode 100644 config/wasm32/bli_kernel_defs_wasm32.h
Expand Down Expand Up @@ -170,7 +173,7 @@ index 00000000..73f8d513
+// but it does not need to contain any code.
diff --git a/config/wasm32/make_defs.mk b/config/wasm32/make_defs.mk
new file mode 100644
index 00000000..27020ccb
index 00000000..27b8a7e1
--- /dev/null
+++ b/config/wasm32/make_defs.mk
@@ -0,0 +1,74 @@
Expand Down Expand Up @@ -329,6 +332,19 @@ index 70414fb4..818a159c 100644


#endif
diff --git a/frame/include/bli_system.h b/frame/include/bli_system.h
index 0a47e14a..c7174ba4 100644
--- a/frame/include/bli_system.h
+++ b/frame/include/bli_system.h
@@ -96,7 +96,7 @@
defined(__bsdi__) || defined(__DragonFly__) || \
defined(__FreeBSD_kernel__) || defined(__HAIKU__)
#define BLIS_OS_BSD 1
- #elif defined(EMSCRIPTEN)
+ #elif defined(__EMSCRIPTEN__)
#define BLIS_OS_EMSCRIPTEN
#else
#error "Cannot determine operating system"
diff --git a/frame/include/bli_type_defs.h b/frame/include/bli_type_defs.h
index 8fe8e5ed..a005bd97 100644
--- a/frame/include/bli_type_defs.h
Expand Down
Loading