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

LLVM 18 #123

Merged
merged 36 commits into from
Mar 12, 2024
Merged

LLVM 18 #123

merged 36 commits into from
Mar 12, 2024

Conversation

csegarragonz
Copy link
Contributor

@csegarragonz csegarragonz commented Feb 9, 2024

In this PR we move the WASM LLVM version to 18 and the native one to 17.

As much as it hurts, recent changes in wasi-libc drop support for LLVM < 15. This means that we cannot keep up to date with upstream wasi-libc, which is necessary for an integrity issue that I am seeing with OpenMP execution.

In summary, I would like to re-build wasi-libc with atomics (and shared memory) support.
I could either patch this on top of our current version of wasi-libc, or rebase to the latest commit, and build from there.

The former sounds appealing, but I think the latter is the safest strategy long-term.
In addition, it more and more seems that re-entrant WASM modules (i.e. WASM modules that will be concurrently operated on by different threads) and non-re-entrant WASM modules have incompatible toolchains.
To this extent, I change our sysroot structure to match more that of wasi-sdk. Now, we support having different targets for different WASM features (that are incompatible with each other).
This also deems obsolete the old THREAD_MODEL=faasm that we used to have, allowing to have co-existing purely non-reentrant sysroot and a re-entrant one.

In this PR we have:

  • /usr/local/faasm/llvm-sysroot/{include,lib}/wasm32-wasi: for non-atomic, non-threaded code.
  • /usr/local/faasm/llvm-sysroot/{include,lib}/wasm32-wasi-threads: for atomic WASM.

Note that, in the latter, we still disable native WASM threads by carefully linking with out own pthread implementation rather than wasi-libcs.

This should also greatly simplify our diff with upstream wasi-libc.

@csegarragonz csegarragonz mentioned this pull request Feb 15, 2024
12 tasks
@csegarragonz csegarragonz marked this pull request as ready for review February 20, 2024 10:03
@csegarragonz csegarragonz changed the title LLVM 17 LLVM 18 Mar 12, 2024
@csegarragonz csegarragonz merged commit d9fc3ac into main Mar 12, 2024
2 checks passed
@csegarragonz csegarragonz deleted the llvm-17 branch March 12, 2024 15:43
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.

1 participant