Skip to content

Conversation

@Lectem
Copy link
Contributor

@Lectem Lectem commented Feb 27, 2023

The ipsc stdlib was missing some builtins for the wasm32 target which caused the following issue: #2248

Running tests on windows was also not well supported (I don't think it ever worked ?) so I fixed it. (note I ran the x86 tests to check if everything was still working fine).

I bumped emscripten version to 3.1.31 (we could perhaps even bump to 3.1.32 or 3.1.33 ?).
The objective was to use a more recent version of emscripten to make sure we have as few issues as possible related to WebAssembly/simd#209 (as mentionned in this old PR #1750 ).

Tests results:

1 / 1585 tests FAILED compilation
        .\tests\pragma-ignore-warning.ispc
167 / 1585 tests FAILED execution
        .\tests\atomics-1.ispc
        .\tests\atomics-13.ispc
        .\tests\atomics-2.ispc
        .\tests\atomics-9.ispc
        .\tests\atomics-uniform-7.ispc
        .\tests\clock.ispc
        .\tests\local-atomics-uniform-7.ispc

According to #1750 the clock test failing is expected.
However I'm not sure about the atomics. From what I saw this seems to be pretty generic code in builtins\util.m4, so maybe bad codegen from llvm if the version we are using predates the final renumbering of opcodes ? Those date back to 2020 though so I would expect LLVM13 to have the correct opcodes.

If @aschrein has any insight on what could be the issue it would be very helpful !

@Lectem
Copy link
Contributor Author

Lectem commented Feb 27, 2023

It seems the build on windows finds LLVM17 executables emscripten from in the PATH instead of the local LLVM15 https://ci.appveyor.com/project/ispc/ispc/builds/46344947/job/wkfk2pa61mgh569x#L3681
C:\projects\llvm\bin-15.0\bin\llvm-dis.exe : error : Unknown attribute kind (86) (Producer: 'LLVM17.0.0git' Reader: 'LLVM 15.0.7') [C:\projects\ispc\build\ispc.vcxproj]

I fixed it by putting the local version at the beginning of my PATH so that it had priority over the emscripten version. I'm not sure however how this should be fixed, should we be using the ispc local version or the one from emscripten ?
In the meantime I'll downgrade the version of emscripten to the previous patch which was still based on LLVM15.

emscripten 3.1.31 upgraded to llvm17 and 3.1.18 to llvm16
@aneshlya
Copy link
Collaborator

Hi @Lectem, there was another PR merged #2580 related to wasm support which highly intersects with this one. If you think that some changes are still missed, feel free to open another PR on top of main.

@aneshlya aneshlya closed this Aug 16, 2023
@Lectem
Copy link
Contributor Author

Lectem commented Aug 28, 2023

It seems the other PR fixes all the issues, and probably better than what I did, thanks !

@Lectem Lectem deleted the fix-wasm branch August 28, 2023 07:47
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.

2 participants