Skip to content
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

Enable fast-interpreter SIMD tests on CI #4125

Open
wants to merge 1 commit into
base: dev/simd_for_interp
Choose a base branch
from

Conversation

jammar1
Copy link

@jammar1 jammar1 commented Mar 3, 2025

Enable fast-interpreter tests on CI.
I've kept some platforms disabled as tests were failing (e.g missing SIMD intrinsics headers on SGX, etc).

@@ -97,7 +97,7 @@ jobs:
"-DWAMR_BUILD_PERF_PROFILING=1",
"-DWAMR_BUILD_REF_TYPES=1",
# doesn't support
# "-DWAMR_BUILD_SIMD=1",
"-DWAMR_BUILD_SIMD=0",
Copy link
Author

@jammar1 jammar1 Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was disabled anyway, just making it explicit. When I tried enabling this, SIMDe won't compile because of missing SIMD intrinsics in the SGX toolchain.

/home/runner/work/wasm-micro-runtime/wasm-micro-runtime/product-mini/platforms/linux-sgx/build/_deps/simde-src/simde/wasm/../simde-features.h:319:12: fatal error: emmintrin.h: No such file or directory
  319 |   #include <emmintrin.h>
      |            ^~~~~~~~~~~~~
compilation terminated.

@@ -156,8 +156,8 @@ if (WAMR_BUILD_LIB_RATS EQUAL 1)
endif ()

if (WAMR_BUILD_SIMD EQUAL 1 AND WAMR_BUILD_FAST_INTERP EQUAL 1)
if (NOT (WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR WAMR_BUILD_TARGET MATCHES "ARM.*"))
message(STATUS "SIMDe doesnt support platform " ${WAMR_BUILD_TARGET})
if (WAMR_BUILD_PLATFORM STREQUAL "windows")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to address this later when I can find a Windows computer. Compilation on Visual Studio is failing but this PR strictly improves the test coverage.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (NOT (WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR WAMR_BUILD_TARGET MATCHES "ARM.*")) does not appear to be equivalent to if (WAMR_BUILD_PLATFORM STREQUAL "windows"). Therefore, we might need to merge the two to ensure compatibility.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're not equivalent. I originally removed the check entirely, but I encountered some MSVC build issues.

I'm setting up a Windows computer to take a look at the issue this week, but SIMDe does support various Arm ISAs / x86 / RISC-V so this change is more correct than the existing check.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lum1n0us Is this okay?

if (NOT (WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR WAMR_BUILD_TARGET MATCHES "ARM.*"))
message(STATUS "SIMDe doesnt support platform " ${WAMR_BUILD_TARGET})
if (WAMR_BUILD_PLATFORM STREQUAL "windows")
message(STATUS "SIMDe doesnt support platform " ${WAMR_BUILD_PLATFORM})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if that should be error instead of just a status? At that stage users set WAMR_BUILD_SIMD so they expect to have it; in case it's not supported, maybe we should notify the users more explicitly about it?

Copy link
Collaborator

@loganek loganek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jammar1
Copy link
Author

jammar1 commented Mar 3, 2025

SIMD tests running successfully on interpreter mode: https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/13631422473/job/38100056936

@@ -156,8 +156,8 @@ if (WAMR_BUILD_LIB_RATS EQUAL 1)
endif ()

if (WAMR_BUILD_SIMD EQUAL 1 AND WAMR_BUILD_FAST_INTERP EQUAL 1)
if (NOT (WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR WAMR_BUILD_TARGET MATCHES "ARM.*"))
message(STATUS "SIMDe doesnt support platform " ${WAMR_BUILD_TARGET})
if (WAMR_BUILD_PLATFORM STREQUAL "windows")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (NOT (WAMR_BUILD_TARGET MATCHES "AARCH64.*" OR WAMR_BUILD_TARGET MATCHES "ARM.*")) does not appear to be equivalent to if (WAMR_BUILD_PLATFORM STREQUAL "windows"). Therefore, we might need to merge the two to ensure compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants