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

Support parallel builds with make #491

Merged
merged 13 commits into from
Dec 13, 2023
Merged

Commits on Dec 11, 2023

  1. Atomise commands used to generate inline headers

    Individual COMMANDS in define_custom_command are not guaranteed to
    execute sequentially, meaning that the inline headers may be broken if
    doing a parallel build with make. Each command is extracted into its
    own custom_command (some are merged, such as subsequent sed calls) so
    that CMake can properly make sense of the dependencies and generate
    consistent headers in parallel.
    joeramsay committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    f98ab39 View commit details
    Browse the repository at this point in the history
  2. Use CMake cat instead of shell cat

    This requires minimum CMake 3.18, which is not particularly
    recent. This provides a better cross-platform way of concatenating
    files.
    joeramsay committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    7c063d3 View commit details
    Browse the repository at this point in the history
  3. Atomise sleef.h generation

    Commands in the list of SLEEF_HEADER_COMMANDS were sometimes observed
    to overwrite each other when doing a parallel build. Instead of
    building a list of commands, build a list of temporary files to depend
    on, add a custom_command for each of them, and cat them all together
    at the end.
    joeramsay committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    1bd448c View commit details
    Browse the repository at this point in the history
  4. Atomise alias generation

    joeramsay committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    48c5de1 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2023

  1. Atomise dispscalar

    Also added a helper for concatenating files, as this is becoming quite
    a common operation.
    joeramsay committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    42a566b View commit details
    Browse the repository at this point in the history
  2. Atomise generating simd disp files

    Refactored out some shared logic - there is likely more to be done
    here.
    joeramsay committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    b11e77c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3f34a53 View commit details
    Browse the repository at this point in the history
  4. Reuse existing atomic inline libm header generation for CUDA

    By setting a few optional params the updated header build can be
    reused for CUDA - manually verified that the headers are identical.
    joeramsay committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    9a5eb57 View commit details
    Browse the repository at this point in the history
  5. Atomise commands used to generate quad inline headers

    Individual COMMANDS in define_custom_command are not guaranteed to
    execute sequentially, meaning that the inline headers may be broken if
    doing a parallel build with make. Each command is extracted into its
    own custom_command (some are merged, such as subsequent sed calls) so
    that CMake can properly make sense of the dependencies and generate
    consistent headers in parallel.
    joeramsay committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    165f168 View commit details
    Browse the repository at this point in the history
  6. Atomise remaining quad build commands

    Reusing the commands for the inline headers for the CUDA header, and
    use concat_files for disp files.
    joeramsay committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    dbbe931 View commit details
    Browse the repository at this point in the history
  7. Remove warning about parallel build with make

    Now that custom_commands are atomic, parallel builds should be
    supported with make.
    joeramsay committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    425951d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ed8f244 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2023

  1. Ensure rename header is built before inline headers

    This was mistakenly removed, now added back.
    joeramsay committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    acd9165 View commit details
    Browse the repository at this point in the history