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

[SIMD] add Relaxed simd #3311

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

LFsWang
Copy link
Contributor

@LFsWang LFsWang commented Mar 31, 2024

Fixes #3282

Copy link
Member

juntao commented Mar 31, 2024

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


Copy link

codecov bot commented Mar 31, 2024

Codecov Report

Attention: Patch coverage is 81.41593% with 63 lines in your changes missing coverage. Please review.

Project coverage is 79.93%. Comparing base (6c6c4c4) to head (25fef69).
Report is 2 commits behind head on master.

Files Patch % Lines
lib/llvm/compiler.cpp 68.91% 40 Missing and 6 partials ⚠️
test/spec/spectest.cpp 71.87% 3 Missing and 6 partials ⚠️
include/common/configure.h 33.33% 1 Missing and 1 partial ⚠️
lib/driver/compilerTool.cpp 0.00% 1 Missing and 1 partial ⚠️
lib/driver/runtimeTool.cpp 0.00% 1 Missing and 1 partial ⚠️
lib/loader/serialize/serial_instruction.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3311      +/-   ##
==========================================
+ Coverage   79.84%   79.93%   +0.08%     
==========================================
  Files         253      253              
  Lines       34948    35247     +299     
  Branches     6142     6141       -1     
==========================================
+ Hits        27905    28175     +270     
- Misses       5622     5633      +11     
- Partials     1421     1439      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LFsWang LFsWang force-pushed the relaxed_simd branch 2 times, most recently from 2c317e4 to 6ed9893 Compare April 29, 2024 12:51
@LFsWang LFsWang force-pushed the relaxed_simd branch 3 times, most recently from 0a2c111 to 731a8c0 Compare May 11, 2024 07:09
@github-actions github-actions bot added the c-Test An issue/PR to enhance the test suite label May 11, 2024
@LFsWang LFsWang marked this pull request as ready for review May 11, 2024 09:15
@LFsWang LFsWang requested a review from q82419 as a code owner May 11, 2024 09:15
@LFsWang LFsWang force-pushed the relaxed_simd branch 2 times, most recently from 9d6d29c to aecdcf6 Compare May 11, 2024 09:29
@LFsWang
Copy link
Contributor Author

LFsWang commented May 11, 2024

@q82419 Hello, may you help me review the code?

And here is the relaxed simd testsuits form Webassembly. I have tested and passed and It's can put into the core testsuits.

But one case relaxed_simd_relaxed_dot_product can not be complied by wabt because missing the opcode i16x8.relaxed_dot_i8x16_i7x16_s, however I kept that wast in the folder.

relaxed_simd_tests.zip

@q82419
Copy link
Collaborator

q82419 commented May 14, 2024

@q82419 Hello, may you help me review the code?

And here is the relaxed simd testsuits form Webassembly. I have tested and passed and It's can put into the core testsuits.

But one case relaxed_simd_relaxed_dot_product can not be complied by wabt because missing the opcode i16x8.relaxed_dot_i8x16_i7x16_s, however I kept that wast in the folder.

relaxed_simd_tests.zip

I'll review in these days. Thanks!

Copy link
Collaborator

@q82419 q82419 left a comment

Choose a reason for hiding this comment

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

Please modify for the following changes:

  1. Rebase on to the master. The RelaxSIMD proposal is added into the enum.
  2. Filter the instructions in the Configure class. This will print log to ask developers to turn on this proposal.
  3. Add the relaxed-simd spec test. I've updated the spec test in the wasm-dev branch, includes the test cannot be generated by wabt you mentioned. Please change to that branch.

Thanks!

include/executor/executor.h Outdated Show resolved Hide resolved
lib/executor/engine/engine.cpp Outdated Show resolved Hide resolved
include/executor/executor.h Outdated Show resolved Hide resolved
include/executor/executor.h Outdated Show resolved Hide resolved
@LFsWang LFsWang force-pushed the relaxed_simd branch 2 times, most recently from e896130 to b78f5a9 Compare June 3, 2024 08:21
@github-actions github-actions bot added the c-CLI An issue related to WasmEdge CLI tools label Jun 3, 2024
Copy link
Collaborator

@q82419 q82419 left a comment

Choose a reason for hiding this comment

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

You should add the spec test data of relaxed SIMD of CMake for copy step here:
https://github.com/WasmEdge/WasmEdge/blob/master/test/spec/CMakeLists.txt#L27
And also add the spec test here:
https://github.com/WasmEdge/WasmEdge/blob/master/test/spec/spectest.cpp#L254
Remind the proposal enum mapping here:
https://github.com/WasmEdge/WasmEdge/blob/master/test/api/helper.cpp#L25
Thanks.

Signed-off-by: Sylveon <sylveon@secondstate.io>
Signed-off-by: Sylveon <sylveon@secondstate.io>
Signed-off-by: Sylveon <sylveon@secondstate.io>
Signed-off-by: Sylveon <sylveon@secondstate.io>
Signed-off-by: Sylveon <sylveon@secondstate.io>
@hydai
Copy link
Member

hydai commented Jun 9, 2024

Please run clang-format first.

@LFsWang
Copy link
Contributor Author

LFsWang commented Jun 9, 2024

I found X86SSSE3PMAddUbSw128 is not work on edge case in relaxed product, but the alternative way is work, I will read the spec to check it.

  • update: fixed, but maybe need to check the reference

https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#techs=SSE_ALL&ig_expand=4029,4233,4233,4233&text=_mm_maddubs_epi16

https://github.com/WebAssembly/relaxed-simd/blob/main/proposals/relaxed-simd/Overview.md?plain=1#L273

@LFsWang LFsWang force-pushed the relaxed_simd branch 2 times, most recently from b540b7e to f68c034 Compare June 10, 2024 09:13
Signed-off-by: Sylveon <sylveon@secondstate.io>
@q82419
Copy link
Collaborator

q82419 commented Jun 12, 2024

Please wait for us for fixing the Windows build. Thanks!

@hydai
Copy link
Member

hydai commented Jun 12, 2024

@q82419
Please check if the other parts are reviewed. So we can merge it immediately when the Windows issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-CLI An issue related to WasmEdge CLI tools c-Test An issue/PR to enhance the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: support relaxed simd proposal
4 participants