bootstrap: add bootstrap step to run intrinsic-test in CI#156356
bootstrap: add bootstrap step to run intrinsic-test in CI#156356xonx4l wants to merge 19 commits into
Conversation
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { | ||
| run.path("library/stdarch/crates/intrinsic-test") | ||
| } |
There was a problem hiding this comment.
the intrinsic tests should also run when any of the source in core_arch changes (unless I'm misinterpreting what this function does).
There was a problem hiding this comment.
No you are not misinterpreting :) . You're so right I have added the core_arch path so it triggers . Thanks for the review.
| RUN curl -L http://ci-mirrors.rust-lang.org/sde-external-10.8.0-2026-03-15-lin.tar.xz -o /tmp/sde.tar.xz \ | ||
| && mkdir -p /intel-sde \ | ||
| && tar -xJf /tmp/sde.tar.xz --strip-components=1 -C /intel-sde \ | ||
| && rm /tmp/sde.tar.xz |
There was a problem hiding this comment.
this doesn't need an instant fix, but we bump the version of this tool occasionally, so ideally we'd sync that version between the repositories.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Thank you!
I wonder what to do about the required dependencies. GCC/Clang is fine, but the SDE emulator seems problematic. We have a lot of CI jobs that will run the intrinsics test and I don't think it is great if we install it on all of them. Of course it is also not great if it is required when running tests locally.
I think that we should make this test be non-default for now, and run it explicitly on selected CI jobs.
|
|
||
| let crates_link = out_dir.join("crates"); | ||
| if !crates_link.exists() { | ||
| std::os::unix::fs::symlink(builder.src.join("library/stdarch/crates"), &crates_link) |
There was a problem hiding this comment.
This won't work on non-Linux OSes. Why do we need this symlink?
There are existing functions in bootstrap to create symlinks, see symlink_dir.
There was a problem hiding this comment.
we need symlink because the generated Cargo.toml files depend on core_arch via a relative path. We generate into the build directory to avoid writing into the submodule so that path doesn't exist there. The symlink points back at the real stdarch crates so it resolves.
Yes , non-default and run it explicitly on selected CI jobs is better way to handle instead on every CI jobs . |
This comment has been minimized.
This comment has been minimized.
9383a8f to
f10bf02
Compare
|
Let's run this test explicitly in the |
@Kobzol As I added the x86_64-gnu Dockerfile invocation you suggested and ran ./x test library/stdarch/crates/intrinsic-test locally . It failed giving this error. warning: hidden lifetime parameters in types are deprecated error: |
|
You can just fix the warning, the change will be later synced back to |
This comment has been minimized.
This comment has been minimized.
|
@Kobzol Tried 24.04. and got this . cc: error: unrecognized command-line option '-msha512' I think it's because failing command is cc and on 24.04 cc is gcc-13.3 and those flags aren't recognized by it. Thanks! |
|
I see. Okay, in that case let's bump to 26.04 please, to use an LTS. That should have the same or newer GCC than 25.10, so hopefully it will work. |
|
@Kobzol Tried 26.04 and it ran successfully without breaking any flags . Thank you! |
|
Okay, then could you please send a separate PR to update the corresponding CI job to 26.04? Thanks! |
|
Opened the PR here -: #157531 . Thanks! |
7d15b28 to
30c4c29
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@Kobzol With the bump previous error are gone but I ran ./x test library/stdarch/crates/intrinsic-test locally and it failed giving GCC error like |
|
@Kobzol also got this error too. error: the feature named For more information about this error, try Command has failed. Rerun with -v to see more details. |
|
I tried the branch of this PR and it ended with: Could you please push your latest version here? |
|
@Kobzol pushed the latest version which address previous requested review changes . I think now you will able to reproduce the similar errors . Thank you! |
View all comments
This PR ports
library/stdarch/crates/intrinsic-testcrate into the bootstrap test runner as a step, so that we can run the intrinsic-test suite via x.py test.Changes -:
Ports
intrinsic-testfrom the stdarch crate into the bootstrap system as a new test step so it runs inside the existingx86_64-gnuandaarch64-gnuCI jobs .Added
intrinsic-testinsrc/bootstrap/src/core/build_steps/test.rs.Registers
intrinsic-testas a bootstrap tool intool.rs.Installs
clang,lld, and Intel SDE in the respective Dockerfiles.r? @Kobzol
try-job: x86_64-gnu