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 5 commits into
base: master
Choose a base branch
from
Open

Conversation

LFsWang
Copy link
Contributor

@LFsWang LFsWang commented Mar 31, 2024

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 5.75758% with 311 lines in your changes are missing coverage. Please review.

Project coverage is 79.18%. Comparing base (212e909) to head (aecdcf6).

Current head aecdcf6 differs from pull request most recent head b78f5a9

Please upload reports for the commit b78f5a9 to get more accurate results.

Files Patch % Lines
lib/llvm/compiler.cpp 8.78% 133 Missing and 2 partials ⚠️
lib/executor/engine/engine.cpp 0.00% 83 Missing ⚠️
include/executor/engine/binary_numeric_vector.ipp 0.00% 31 Missing ⚠️
test/spec/spectest.cpp 17.64% 26 Missing and 2 partials ⚠️
include/common/enum.inc 0.00% 20 Missing ⚠️
lib/validator/formchecker.cpp 0.00% 10 Missing ⚠️
lib/loader/ast/instruction.cpp 0.00% 2 Missing ⚠️
lib/loader/serialize/serial_instruction.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3311      +/-   ##
==========================================
- Coverage   79.83%   79.18%   -0.66%     
==========================================
  Files         253      253              
  Lines       34948    35240     +292     
  Branches     6122     6151      +29     
==========================================
+ Hits        27902    27905       +3     
- Misses       5622     5904     +282     
- Partials     1424     1431       +7     

☔ 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!


/// ======= Relaxed SIMD instructions =======
template <typename T>
Expect<void> runVectorRelaxedLaneselect(ValVariant &Val1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

runVectorRelaxedLaneselectOp

case OpCode::I64x2__relaxed_laneselect: {
const ValVariant Mask = StackMgr.pop();
const ValVariant Val2 = StackMgr.pop();
return runVectorRelaxedLaneselect<uint8_t>(StackMgr.getTop(), Val2, Mask);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be uint64_t ?

const ValVariant &Val2,
const ValVariant &Mask) const;
inline Expect<void>
runVectorRelaxedIntegerDotProduct(ValVariant &Val1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

runVectorRelaxedIntegerDotProductOp

runVectorRelaxedIntegerDotProduct(ValVariant &Val1,
const ValVariant &Val2) const;
inline Expect<void>
runVectorRelaxedIntegerDotProductAdd(ValVariant &Val1, const ValVariant &Val2,
Copy link
Collaborator

Choose a reason for hiding this comment

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

runVectorRelaxedIntegerDotProductAddOp

@github-actions github-actions bot added the c-CLI An issue related to WasmEdge CLI tools label Jun 3, 2024
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.

None yet

3 participants