Skip to content

intrinsic-test fixes for low intrinsic, high core counts#2130

Open
adamgemmell wants to merge 2 commits into
rust-lang:mainfrom
adamgemmell:dev/adagem01/chunk-size
Open

intrinsic-test fixes for low intrinsic, high core counts#2130
adamgemmell wants to merge 2 commits into
rust-lang:mainfrom
adamgemmell:dev/adagem01/chunk-size

Conversation

@adamgemmell
Copy link
Copy Markdown
Contributor

When the intrinsic count is low (such as when adding filtering for debugging) and the core count is high, sometimes the chunk count returned by manual_chunk() didn't match the number of modules created, which meant that the rust_programs/Cargo.toml referred to modules that didn't exist.

e.g. 100 intrinsics and 80 cores:
chunk_size = 100.div_ceil(80) = 2,
chunk count = 80

However, in practice, with a chunk_size of 2 Iter::chunks will only return 50 chunks. The fix is to calculate the real number of chunks with another div ceil, such as 100.div_ceil(2) = 50. There shouldn't be any difference when the intrinsic count is high enough for this to not matter.

In addition, this patch also adds the --tests argument to cargo test in order to not attempt running doc tests, which is a slowdown more noticeable with low intrinsic count and higher core count.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 21, 2026

r? @folkertdev

rustbot has assigned @folkertdev.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn
  • @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn expanded to Amanieu, adamgemmell, davidtwco, folkertdev, sayantn
  • Random selection from Amanieu, davidtwco, folkertdev, sayantn

Comment thread ci/intrinsic-test.sh
;;
esac

cargo test --manifest-path=rust_programs/Cargo.toml --target "${TARGET}" --profile "${PROFILE}"
Copy link
Copy Markdown
Contributor

@sayantn sayantn May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just remnant from local trials?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, adding --tests avoids attempting to run doc tests on each mod_n crate

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ok I see. Thanks

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