-
Notifications
You must be signed in to change notification settings - Fork 1k
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
WASM improvements #1395
WASM improvements #1395
Conversation
Signed-off-by: pavelkumbrasev <[email protected]>
Signed-off-by: pavelkumbrasev <[email protected]>
cmake/compilers/Clang.cmake
Outdated
if (NOT EMSCRIPTEN_WITHOUT_PTHREAD) | ||
set_property(TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES "-pthread") | ||
endif() | ||
set(TBB_EMSCRIPTEN_STACK_SIZE 5242880) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I'm not sure if it is an optimal stack size. (I took it from Emsripten documentation and I believe it is 5 MB)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that an interesting point. Ideally TBB should propagate TOTAL_STACK
if it was set by user application.
But you are right the default should be changed to 64kb.
@SoilRos could you please clarify if proposed WA works for you? |
See discussion in uxlfoundation/oneTBB#1395 (comment)
@pavelkumbrasev thanks for the heads up! I gave it a local try with dune-copasi/dune-copasi@414282d (i.e. using this branch and following point 2. from the limitations sections here) and looking at the activity monitor I do not see an obvious spike on multithreading yet as I see with x86 or ARM targets. But I cannot discard that this is a bug in our side, I'd need to look into this with more detail again. I would say to not make this fixes depending on this if your tests are already working. |
Co-authored-by: Alexandra <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
See discussion in uxlfoundation/oneTBB#1395 (comment)
See discussion in uxlfoundation/oneTBB#1395 (comment)
Description
Improved stack calculation (the thread stack should be defined via link flag).
Described current performance limitations of oneTBB.
Fixes # - issue number(s) if exists
#1287
Type of change
Choose one or multiple, leave empty if none of the other choices apply
Add a respective label(s) to PR if you have permissions
Tests
Documentation
Breaks backward compatibility
Notify the following users
@jellychen @SoilRos
Other information