Skip to content

Various CI and Testing enhancements #1776

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 12 commits into from
Apr 20, 2025
Merged

Conversation

sayantn
Copy link
Contributor

@sayantn sayantn commented Apr 14, 2025

  • Upgrades all dockers to Ubuntu-25.04, all x86 macos runners to macos-15-large (which is a new runner image with x86 macos), arm macos runners to macos-15 and windows runners to windows-2025
  • Re-enable all conditionally disabled tests in x86 (todo: try other archs too)
  • Add PPC64 to CI
  • Removes the cupid dependency of std_detect and the env-override-no-avx CI run
  • Change simd_test_macro test skipping logic a little, separate SKIP_TESTS into feature-based and function-name-based parts
  • Replace cfg(stdarch_intel_sde) with STDARCH_TEST_SKIP_FUNCTION as it is powerful enough.
  • Add test-everything annotations to more archs to ensure test coverage
  • Add x86 run with -Ctarget-feature=+avx512f
  • Remove STDARCH_DISABLE_DEDUP_GUARD because it was unused
  • [TRY] Enable assert_instr for PPC64LE

@rustbot
Copy link
Collaborator

rustbot commented Apr 14, 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

@sayantn
Copy link
Contributor Author

sayantn commented Apr 14, 2025

The armv7-unknown-linux-gnueabihf runner gives this error with Ubuntu-25.04

---- core_arch::arm_shared::neon::generated::assert___crc32cd_crc32cw stdout ----
disassembly for stdarch_test_shim___crc32cd_crc32cw: 
	 0: cmp r0, r2, asr #4
	 1: cmp r0, r3, asr #4
	 2: bx lr

thread 'core_arch::arm_shared::neon::generated::assert___crc32cd_crc32cw' panicked at crates/stdarch-test/src/lib.rs:180:9:
failed to find instruction `crc32cw` in the disassembly

---- core_arch::arm_shared::neon::generated::assert___crc32b_crc32b stdout ----
disassembly for stdarch_test_shim___crc32b_crc32b: 
	 0: tst r0, r1, asr #32
	 1: bx lr

thread 'core_arch::arm_shared::neon::generated::assert___crc32b_crc32b' panicked at crates/stdarch-test/src/lib.rs:180:9:
failed to find instruction `crc32b` in the disassembly
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- core_arch::arm_shared::neon::generated::assert___crc32cb_crc32cb stdout ----
disassembly for stdarch_test_shim___crc32cb_crc32cb: 
	 0: tst r0, r1, asr #4
	 1: bx lr

thread 'core_arch::arm_shared::neon::generated::assert___crc32cb_crc32cb' panicked at crates/stdarch-test/src/lib.rs:180:9:
failed to find instruction `crc32cb` in the disassembly

---- core_arch::arm_shared::neon::generated::assert___crc32ch_crc32ch stdout ----
disassembly for stdarch_test_shim___crc32ch_crc32ch: 
	 0: @ <UNDEFINED> instruction: 0xe1200241
	 1: bx lr

thread 'core_arch::arm_shared::neon::generated::assert___crc32ch_crc32ch' panicked at crates/stdarch-test/src/lib.rs:180:9:
failed to find instruction `crc32ch` in the disassembly

---- core_arch::arm_shared::neon::generated::assert___crc32cw_crc32cw stdout ----
disassembly for stdarch_test_shim___crc32cw_crc32cw: 
	 0: cmp r0, r1, asr #4
	 1: bx lr

thread 'core_arch::arm_shared::neon::generated::assert___crc32cw_crc32cw' panicked at crates/stdarch-test/src/lib.rs:180:9:
failed to find instruction `crc32cw` in the disassembly

---- core_arch::arm_shared::neon::generated::assert___crc32d_crc32w stdout ----
disassembly for stdarch_test_shim___crc32d_crc32w: 
	 0: cmp r0, r2, asr #32
	 1: cmp r0, r3, asr #32
	 2: bx lr

thread 'core_arch::arm_shared::neon::generated::assert___crc32d_crc32w' panicked at crates/stdarch-test/src/lib.rs:180:9:
failed to find instruction `crc32w` in the disassembly

---- core_arch::arm_shared::neon::generated::assert___crc32h_crc32h stdout ----
disassembly for stdarch_test_shim___crc32h_crc32h: 
	 0: @ <UNDEFINED> instruction: 0xe1200041
	 1: bx lr

thread 'core_arch::arm_shared::neon::generated::assert___crc32h_crc32h' panicked at crates/stdarch-test/src/lib.rs:180:9:
failed to find instruction `crc32h` in the disassembly

---- core_arch::arm_shared::neon::generated::assert___crc32w_crc32w stdout ----
disassembly for stdarch_test_shim___crc32w_crc32w: 
	 0: cmp r0, r1, asr #32
	 1: bx lr

thread 'core_arch::arm_shared::neon::generated::assert___crc32w_crc32w' panicked at crates/stdarch-test/src/lib.rs:180:9:
failed to find instruction `crc32w` in the disassembly

---- core_arch::arm_shared::neon::generated::assert_vaddh_f16_vadd_f16 stdout ----
disassembly for stdarch_test_shim_vaddh_f16_vadd_f16: 
	 0: @ <UNDEFINED> instruction: 0xee300920
	 1: bx lr

thread 'core_arch::arm_shared::neon::generated::assert_vaddh_f16_vadd_f16' panicked at crates/stdarch-test/src/lib.rs:180:9:
failed to find instruction `vadd.f16` in the disassembly

This seems interesting. The crc32 instructions are just gone!

@sayantn
Copy link
Contributor Author

sayantn commented Apr 14, 2025

Confirmed that this is not spurious, reproducible locally. Seems like issue with GCC (honestly that's the only sane option)

@sayantn sayantn force-pushed the upgrade-ci branch 7 times, most recently from 48f7e3e to 1590e41 Compare April 15, 2025 00:43
@sayantn sayantn changed the title [TRY] Upgrade OS versions in CI [TRY] Various CI and Testing enhancements Apr 15, 2025
@sayantn sayantn force-pushed the upgrade-ci branch 9 times, most recently from 1f3619d to 5402694 Compare April 15, 2025 06:24
@adamgemmell
Copy link
Contributor

Instruction assertion tests are quite sensitive to the version of objdump used. I see lots of undefined instructions - perhaps they're there but objdump has renamed them?

@sayantn
Copy link
Contributor Author

sayantn commented Apr 15, 2025

Doesn't seem like that, for some reason only the h instructions (acting on u16) are giving <undefined>. For others, e.g. __crc32b and __crc32w, there are just cmp instructions (afaik the crc instructions do quite complex operations, and can't be substituted by a single cmp). The tests passed, so it seems like this is a bug in objdump or stdarch_test asm parsing logic

@sayantn
Copy link
Contributor Author

sayantn commented Apr 15, 2025

(current) list of target features that are not available in CI runs (these are the TEST_EVERYTHING setups, so ideally this list should be empty)

{
    "aarch64-unknown-linux-gnu": [
        "cssc",
        "ecv",
        "fp8",
        "fp8dot2",
        "fpmr",
        "lse128",
        "lut",
        "pauth-lr",
        "rcpc3",
        "sme2",
        "sme2p1",
        "sme-b16b16",
        "sme-f16f16",
        "sme-f8f16",
        "sme-f8f32",
        "sme-lutv2",
        "ssbs",
        "ssve-fp8dot2",
        "ssve-fp8dot4",
        "ssve-fp8fma",
        "sve2p1",
        "sve-b16b16",
        "tme",
        "wfxt"
    ],
    "armv7-unknown-linux-gnueabihf": [
        "pmull",
        "crc",
        "sha2",
        "i8mm",
        "dotprod"
    ],
    "riscv64gc-unknown-linux-gnu": [
        "unaligned-vector-mem",
        "zicntr",
        "zihpm",
        "zihintpause",
        "zimop",
        "zawrs",
        "zam",
        "q",
        "zfinx",
        "zdinx",
        "zhinx",
        "zhinxmin",
        "zcf",
        "zcb",
        "zcmop",
        "j",
        "p"
    ],
    "powerpc-unknown-linux-gnu": [
        "vsx",
        "power8"
    ],
    "powerpc64-unknown-linux-gnu": [
        "vsx",
        "power8"
    ],
    "powerpc64le-unknown-linux-gnu": [
        "power8"
    ],
    "s390x-unknown-linux-gnu": [
        "deflate-conversion",
        "enhanced-sort",
        "guarded-storage",
        "nnp-assist",
        "transactional-execution",
        "vector-packed-decimal",
        "vector-packed-decimal-enhancement",
        "vector-packed-decimal-enhancement-2"
    ],
    "loongarch64-unknown-linux-gnu": [
        "frecipe"
    ]
}

edit: updated after #1770

@sayantn sayantn force-pushed the upgrade-ci branch 3 times, most recently from 35b154e to 86cfc3e Compare April 15, 2025 21:47
@sayantn
Copy link
Contributor Author

sayantn commented Apr 15, 2025

qemu: fatal: Unknown exception 0x5e. Aborting

NIP 004249d0   LR 004249c0 CTR 004249ac XER 20000000 CPU#1
MSR 02006940 HID0 00000000  HF 02006000 iidx 0 didx 0
TB 00000200 861148029927
GPR00 000000000046cbe4 0000000041260530 00000000412688a0 0000000041260a98
GPR04 00000000004e5d60 0000000000000000 0000000000041300 0000000000000000
GPR08 0000000000000002 0000000041300480 0000000000000000 0000000000231e00
GPR12 0000000048022482 000000000053fddc 0000000040ffff04 0000000041261400
GPR16 0000000041061000 0000000000547e1c 000000003b9aca00 0000000000000001
GPR20 0000000000000010 0000000000000000 0000000000000000 00000000003d0f00
GPR24 000000003b9aca00 0000000000000000 000000003b9aca00 00000000412606e0
GPR28 0000000000000001 0000000041260a98 0000000000545fa4 0000000041260580
CR 28022482  [ E  L  -  E  E  G  L  E  ]     RES 004@ffffffff
FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FPSCR 00000000
error: test failed, to rerun pass `-p core_arch --lib`

Interesting output in vec_abs_i16 with -Ctarget-feature=+vsx in PPC32!

@sayantn
Copy link
Contributor Author

sayantn commented Apr 17, 2025

https://github.com/rust-lang/stdarch/actions/runs/14523002235/job/40748153311?pr=1776

Seems like quite a few tests fail in aarch64_be. cc @Amanieu. I will delegate adding this to CI for later. This PR already does too many things

@sayantn sayantn force-pushed the upgrade-ci branch 2 times, most recently from 783f0be to 20bfdf6 Compare April 17, 2025 22:30
@sayantn sayantn force-pushed the upgrade-ci branch 3 times, most recently from 1fa222e to ed2c587 Compare April 18, 2025 01:52
@sayantn

This comment was marked as resolved.

sayantn added 4 commits April 18, 2025 09:26
 - `ppc32` doesn't have `max` cpu model, so set it to `mpc8610`
…ge, and some small changes to make CI pass

 - Disable `vsx` tests for `ppc` and `ppc64`
 - Disable `tme` tests for `aarch64` and `aarch64_be`
 - Disable `frecipe` tests for `loongarch64`
 - Add `altivec` run for PPC32 (with `-C target-feature=+vsx` `qemu` gives a nasty error)
 + Rename `x86_64-unknown-linux-gnu-emulated` run to `x86_64-unknown-linux-gnu`
 - Remove some unused env variables from `run.sh`
@Amanieu
Copy link
Member

Amanieu commented Apr 20, 2025

rust-lang/stdarch/actions/runs/14523002235/job/40748153311?pr=1776

Seems like quite a few tests fail in aarch64_be. cc @Amanieu. I will delegate adding this to CI for later. This PR already does too many things

cc @adamgemmell @JamieCunliffe @Jamesbarford for aarch64_be test failures.

@Amanieu Amanieu added this pull request to the merge queue Apr 20, 2025
Merged via the queue into rust-lang:master with commit 3963579 Apr 20, 2025
58 checks passed
@sayantn sayantn deleted the upgrade-ci branch April 21, 2025 09:17
@Jamesbarford
Copy link
Contributor

rust-lang/stdarch/actions/runs/14523002235/job/40748153311?pr=1776
Seems like quite a few tests fail in aarch64_be. cc @Amanieu. I will delegate adding this to CI for later. This PR already does too many things

cc @adamgemmell @JamieCunliffe @Jamesbarford for aarch64_be test failures.

Thanks for this, we'll have look at it

@sayantn
Copy link
Contributor Author

sayantn commented Apr 22, 2025

@Jamesbarford I have opened #1785, and you can see the CI logs there if you want (afaik these CI logs will be gone in a few days)

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.

6 participants