Skip to content

Commit f3f791d

Browse files
feat: updating the number of x86 intrinsics tested to 50%
1 parent 6b92ff4 commit f3f791d

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

ci/intrinsic-test.sh

Lines changed: 1 addition & 1 deletion
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
;;

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: 5 additions & 11 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)
@@ -130,7 +121,7 @@ where
130121
// This is done because `cpp_compiler_wrapped` is None when
131122
// the --generate-only flag is passed
132123
// compile this cpp file into a .o file
133-
trace!("compiling intrinsic-test-programs_{i}.cpp");
124+
trace!("compiling main_{i}.cpp");
134125
let output = cpp_compiler.compile_object_file(
135126
format!("main_{i}.cpp").as_str(),
136127
format!("main_{i}.o").as_str(),
@@ -146,14 +137,17 @@ where
146137

147138
let output = cpp_compiler.link_executable(
148139
object_files,
149-
format!("intrinsic-test-programs_{i}").as_str(),
140+
format!("intrinsic-test-programs-{i}").as_str(),
150141
);
142+
trace!("finished compiling main_{i}.cpp");
151143

152144
return output;
153145
})
154146
.inspect(|output| {
147+
trace!("{output:?}");
155148
assert!(output.is_ok(), "{output:?}");
156149
if let Ok(out) = &output {
150+
trace!("{:?}", out.status.success());
157151
assert!(out.status.success(), "{output:?}")
158152
}
159153
})

0 commit comments

Comments
 (0)