Skip to content

Commit a764f33

Browse files
committed
fixes
1 parent d75e2cb commit a764f33

16 files changed

Lines changed: 50 additions & 44 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ jobs:
274274
name: Intrinsic Test
275275
runs-on: ubuntu-latest
276276
strategy:
277+
fail-fast: false
277278
matrix:
278279
target:
279280
- aarch64-unknown-linux-gnu

ci/docker/aarch64-unknown-linux-gnu/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
88
qemu-user \
99
make \
1010
file \
11-
clang \
12-
lld
11+
xz-utils \
12+
wget
13+
14+
RUN wget https://mirrors.edge.kernel.org/pub/tools/llvm/files/llvm-22.1.1-x86_64.tar.gz -O llvm.tar.xz
15+
RUN mkdir llvm
16+
RUN tar -xvf llvm.tar.xz --strip-components=1 -C llvm
1317

1418
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
1519
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64 -cpu max -L /usr/aarch64-linux-gnu" \

ci/docker/aarch64_be-unknown-linux-gnu/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
88
qemu-user \
99
make \
1010
file \
11-
clang \
1211
curl \
1312
xz-utils \
14-
lld
13+
wget
1514

1615
ENV TOOLCHAIN="arm-gnu-toolchain-14.3.rel1-x86_64-aarch64_be-none-linux-gnu"
1716

@@ -20,6 +19,10 @@ RUN curl -L "https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/bin
2019
RUN tar -xvf "${TOOLCHAIN}.tar.xz"
2120
RUN mkdir /toolchains && mv "./${TOOLCHAIN}" /toolchains
2221

22+
RUN wget https://mirrors.edge.kernel.org/pub/tools/llvm/files/llvm-22.1.1-x86_64.tar.gz -O llvm.tar.xz
23+
RUN mkdir llvm
24+
RUN tar -xvf llvm.tar.xz --strip-components=1 -C llvm
25+
2326
ENV AARCH64_BE_TOOLCHAIN="/toolchains/${TOOLCHAIN}"
2427
ENV AARCH64_BE_LIBC="${AARCH64_BE_TOOLCHAIN}/aarch64_be-none-linux-gnu/libc"
2528

ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
88
qemu-user \
99
make \
1010
file \
11-
clang \
12-
lld
11+
wget
12+
13+
RUN wget https://mirrors.edge.kernel.org/pub/tools/llvm/files/llvm-22.1.1-x86_64.tar.gz -O llvm.tar.xz
14+
RUN mkdir llvm
15+
RUN tar -xvf llvm.tar.xz --strip-components=1 -C llvm
16+
1317
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
1418
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -cpu max -L /usr/arm-linux-gnueabihf" \
1519
OBJDUMP=arm-linux-gnueabihf-objdump

ci/docker/x86_64-unknown-linux-gnu/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
66
make \
77
ca-certificates \
88
wget \
9-
xz-utils \
10-
clang \
11-
libstdc++-14-dev \
12-
build-essential \
13-
lld
9+
xz-utils
1410

1511
RUN wget http://ci-mirrors.rust-lang.org/sde-external-10.8.0-2026-03-15-lin.tar.xz -O sde.tar.xz
1612
RUN mkdir intel-sde
1713
RUN tar -xJf sde.tar.xz --strip-components=1 -C intel-sde
14+
15+
RUN wget https://mirrors.edge.kernel.org/pub/tools/llvm/files/llvm-22.1.1-x86_64.tar.gz -O llvm.tar.xz
16+
RUN mkdir llvm
17+
RUN tar -xvf llvm.tar.xz --strip-components=1 -C llvm
18+
1819
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="/intel-sde/sde64 \
1920
-cpuid-in /checkout/ci/docker/x86_64-unknown-linux-gnu/cpuid.def \
2021
-rtm-mode full -tsx --"

ci/intrinsic-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "PROFILE=${PROFILE}"
1212

1313
INTRINSIC_TEST="--manifest-path=crates/intrinsic-test/Cargo.toml"
1414

15-
export CC="clang"
15+
export CC="/llvm/bin/clang"
1616

1717
case ${TARGET} in
1818
aarch64_be*)
@@ -67,4 +67,4 @@ case ${TARGET} in
6767
;;
6868
esac
6969

70-
cargo test --manifest-path=rust_programs/Cargo.toml --target "${TARGET}" --profile "${PROFILE}"
70+
cargo test --manifest-path=rust_programs/Cargo.toml --target "${TARGET}" --profile "${PROFILE}" --no-fail-fast

crates/intrinsic-test/missing_x86.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,19 @@ _mm_sm3rnds2_epi32
5252
_xgetbv
5353

5454
# top bits are undefined, unclear how to test these
55+
_mm256_castph128_ph256
56+
_mm256_castps128_ps256
57+
_mm256_castpd128_pd256
5558
_mm256_castsi128_si256
59+
60+
_mm512_castph128_ph512
61+
_mm512_castps128_ps512
62+
_mm512_castpd128_pd512
5663
_mm512_castsi128_si512
64+
65+
_mm512_castph256_ph512
66+
_mm512_castps256_ps512
67+
_mm512_castpd256_pd512
5768
_mm512_castsi256_si512
5869

5970
# Clang bug

crates/intrinsic-test/src/arm/types.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use super::intrinsic::ArmIntrinsicType;
2-
use crate::common::cli::Language;
32
use crate::common::intrinsic_helpers::{IntrinsicType, IntrinsicTypeDefinition, Sign, TypeKind};
43

54
impl IntrinsicTypeDefinition for ArmIntrinsicType {
@@ -36,7 +35,7 @@ impl IntrinsicTypeDefinition for ArmIntrinsicType {
3635
}
3736

3837
/// Determines the load function for this type.
39-
fn get_load_function(&self, language: Language) -> String {
38+
fn get_load_function(&self) -> String {
4039
if let IntrinsicType {
4140
kind: k,
4241
bit_len: Some(bl),
@@ -51,16 +50,13 @@ impl IntrinsicTypeDefinition for ArmIntrinsicType {
5150
""
5251
};
5352

54-
let choose_workaround = language == Language::C && self.target.contains("v7");
5553
format!(
5654
"vld{len}{quad}_{type}{size}",
5755
type = match k {
5856
TypeKind::Int(Sign::Unsigned) => "u",
5957
TypeKind::Int(Sign::Signed) => "s",
6058
TypeKind::Float => "f",
61-
// The ACLE doesn't support 64-bit polynomial loads on Armv7
62-
// if armv7 and bl == 64, use "s", else "p"
63-
TypeKind::Poly => if choose_workaround && *bl == 64 {"s"} else {"p"},
59+
TypeKind::Poly => "p",
6460
x => todo!("get_load_function TypeKind: {x:#?}"),
6561
},
6662
size = bl,

crates/intrinsic-test/src/common/argument.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use itertools::Itertools;
22

3-
use super::cli::Language;
43
use super::constraint::Constraint;
54
use super::indentation::Indentation;
65
use super::intrinsic_helpers::IntrinsicTypeDefinition;
@@ -171,7 +170,7 @@ where
171170
.enumerate()
172171
.map(|(idx, arg)| {
173172
let load = if arg.is_simd() {
174-
arg.ty.get_load_function(Language::Rust)
173+
arg.ty.get_load_function()
175174
} else {
176175
"*".to_string()
177176
};

crates/intrinsic-test/src/common/cli.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
use itertools::Itertools;
22
use std::path::PathBuf;
33

4-
#[derive(Debug, PartialEq)]
5-
pub enum Language {
6-
Rust,
7-
C,
8-
}
9-
104
/// Intrinsic test tool
115
#[derive(clap::Parser)]
126
#[command(

0 commit comments

Comments
 (0)