Skip to content

intrinsic-test: combine C files for faster compilation #1862

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

Merged
merged 2 commits into from
Jul 18, 2025

Conversation

folkertdev
Copy link
Contributor

There are 3 main changes

  • emit the arguments (the arrays of inputs) inside of the test function, and rename the test function from main to run_{intrinsic_name}.
  • generate number-of-cores files, and evenly divide all intrinsics over these files. Each file now has the functions for running many different intrinsic tests
  • generate a main that is just a gigantic switch to select the right test to run

Parts of this are still inefficient, and for the full effect the rust side also needs work, but I suspect this is the biggest win (if not, it's actually cargo, we'll see I guess), and sort of a manageable change to review (hopefully).

@folkertdev folkertdev changed the title combine C files for faster compilation intrinsic-test: combine C files for faster compilation Jul 11, 2025
@folkertdev folkertdev marked this pull request as ready for review July 18, 2025 11:24
@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2025

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@folkertdev
Copy link
Contributor Author

This brings down the aarch64_be job to 10 minutes (down from 40m), so it is no longer the longest-running job (that is now the x86_64-unknown-linux-gnu). So in terms of CI throughput, this gives us all of the benefits we're going to get.

Combining the rust files is still useful for getting faster feedback for failures though.

cc @madhav-madhusoodanan some of the C compilation code is a bit too arm-specific now, but I didn't want to generalize in the abstract. So we can see later how to make it work for both arm and x86_64. Shouldn't be hard at all, just needs some minor refactoring I think.

@Amanieu Amanieu added this pull request to the merge queue Jul 18, 2025
Merged via the queue into rust-lang:master with commit 5531955 Jul 18, 2025
63 checks passed
@madhav-madhusoodanan
Copy link
Contributor

This brings down the aarch64_be job to 10 minutes (down from 40m), so it is no longer the longest-running job (that is now the x86_64-unknown-linux-gnu). So in terms of CI throughput, this gives us all of the benefits we're going to get.

Combining the rust files is still useful for getting faster feedback for failures though.

cc @madhav-madhusoodanan some of the C compilation code is a bit too arm-specific now, but I didn't want to generalize in the abstract. So we can see later how to make it work for both arm and x86_64. Shouldn't be hard at all, just needs some minor refactoring I think.

On it!
I just merged the master branch into my feature branch. There is some work on the way the C code is constructed and compiled, but it's totally doable!

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.

4 participants