Skip to content

Conversation

@jammar1
Copy link
Contributor

@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).

"-DWAMR_BUILD_REF_TYPES=1",
# doesn't support
# "-DWAMR_BUILD_SIMD=1",
"-DWAMR_BUILD_SIMD=0",
Copy link
Contributor 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.

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
Contributor 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
Contributor 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
Contributor 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to clarify, the branch and tests are running and passing on x86 so this check is no longer needed.

There are build issues with Windows in CI (although it builds and runs for me locally), so I changed the check to represent that.

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
Contributor Author

jammar1 commented Mar 3, 2025

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.

@loganek
Copy link
Collaborator

loganek commented Mar 7, 2025

I'm merging it as looks like @lum1n0us 's concern is addressed.

@loganek loganek merged commit a16c0ae into bytecodealliance:dev/simd_for_interp Mar 7, 2025
403 checks passed
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