Skip to content

Commit 678c1ae

Browse files
feat: updating the number of x86 intrinsics tested to 50%
1 parent b43f752 commit 678c1ae

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

ci/intrinsic-test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ case ${TARGET} in
7575
TEST_CXX_COMPILER="clang++"
7676
TEST_RUNNER="${CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER}"
7777
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_x86.txt
78-
: "${TEST_SAMPLE_INTRINSICS_PERCENTAGE:=20}"
78+
: "${TEST_SAMPLE_INTRINSICS_PERCENTAGE:=50}"
7979
;;
8080
*)
8181
;;
@@ -85,7 +85,7 @@ esac
8585
# Arm specific
8686
case "${TARGET}" in
8787
aarch64-unknown-linux-gnu*|armv7-unknown-linux-gnueabihf*)
88-
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=info \
88+
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=trace \
8989
cargo run "${INTRINSIC_TEST}" "${PROFILE}" \
9090
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
9191
--runner "${TEST_RUNNER}" \
@@ -96,7 +96,7 @@ case "${TARGET}" in
9696
;;
9797

9898
aarch64_be-unknown-linux-gnu*)
99-
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=info \
99+
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=trace \
100100
cargo run "${INTRINSIC_TEST}" "${PROFILE}" \
101101
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
102102
--runner "${TEST_RUNNER}" \
@@ -114,7 +114,7 @@ case "${TARGET}" in
114114
# Hence the use of `env -u`.
115115
env -u CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER \
116116
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" \
117-
RUST_LOG=info RUST_BACKTRACE=1 \
117+
RUST_LOG=trace RUST_BACKTRACE=1 \
118118
cargo run "${INTRINSIC_TEST}" "${PROFILE}" \
119119
--bin intrinsic-test -- intrinsics_data/x86-intel.xml \
120120
--runner "${TEST_RUNNER}" \

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn compare_outputs(intrinsic_name_list: &Vec<String>, runner: &str, target:
1717
.into_par_iter()
1818
.map(|i| {
1919
runner_command(runner)
20-
.arg(format!("./intrinsic-test-programs_{i}"))
20+
.arg(format!("./intrinsic-test-programs-{i}"))
2121
.current_dir("c_programs")
2222
.output()
2323
})

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ pub fn write_bin_cargo_toml(
5151
}
5252

5353
for i in 0..binary_count {
54-
writeln!(w, "[[bin]]")?;
55-
writeln!(w, "name = \"intrinsic-test-programs_{i}\"")?;
54+
writeln!(w, "\n[[bin]]")?;
55+
writeln!(w, "name = \"intrinsic-test-programs-{i}\"")?;
5656
writeln!(w, "path = \"src/main_{i}.rs\"")?;
5757
}
5858

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,6 @@ where
9898
.collect::<Result<(), String>>()
9999
.unwrap();
100100

101-
let mut file = File::create("c_programs/main.cpp").unwrap();
102-
write_main_cpp(
103-
&mut file,
104-
Self::PLATFORM_C_DEFINITIONS,
105-
Self::PLATFORM_C_HEADERS,
106-
self.intrinsics().iter().map(|i| i.name.as_str()),
107-
)
108-
.unwrap();
109-
110101
let available_parallelism = std::thread::available_parallelism().unwrap().get();
111102
self.intrinsics()
112103
.par_chunks(available_parallelism)
@@ -153,8 +144,10 @@ where
153144
return output;
154145
})
155146
.inspect(|output| {
147+
trace!("{output:?}");
156148
assert!(output.is_ok(), "{output:?}");
157149
if let Ok(out) = &output {
150+
trace!("{:?}", out.status.success());
158151
assert!(out.status.success(), "{output:?}")
159152
}
160153
})

0 commit comments

Comments
 (0)