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

SYCL: Add table of GNU Make config vars to docs #3400

Conversation

mirenradia
Copy link
Contributor

@mirenradia mirenradia commented Jul 4, 2023

Summary

This PR allows the user to parallelize the AOT device compilation when building with the SYCL backend using GNU Make.
This PR adds a table of GNU make config vars to the docs.

Additional background

When building with AOT device compilation on the SYCL backend, the device compilation takes place at the linking step and so is not currently parallelized (even when leveraging multiple GNU Make jobs e.g. by using the -j flag). It can therefore be quite slow. This PR introduces the SYCL_MAX_PARALLEL_LINK_JOBS makefile variable which is passed as the argument to the -fsycl-max-parallel-link-jobs flag of icpx. Although the Intel documentation does state

It is not guaranteed that spawning device link processes can be safely combined with the build system-level parallelization.

I think it's probably fine for the case of building an AMReX application where there is only 1 link step at the end after compiling source files.

To accompany this change, I have added a table of GNU make variables that are relevant to SYCL.

I guess it would make sense to add a similar option to the CMake build system but I am not very familiar with it.

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@WeiqunZhang
Copy link
Member

Thanks! I will do follow-up on CMake.

@mirenradia mirenradia changed the title SYCL: Allow parallelizing AOT device compilation SYCL: Add table of GNU Make config vars to docs Aug 22, 2023
@mirenradia mirenradia force-pushed the enhancement/sycl_aot_build_speedup branch from 9fde812 to 2b700f6 Compare August 22, 2023 16:39
@mirenradia
Copy link
Contributor Author

I made the changes you requested and updated the name and original description of the PR.

@WeiqunZhang WeiqunZhang merged commit 5fabca4 into AMReX-Codes:development Aug 22, 2023
66 checks passed
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