feat: updated exclusion list with more intrinsics, that can be fixed
immediately
This commit is contained in:
parent
06ab6d7cb2
commit
09be05e467
7 changed files with 121 additions and 10 deletions
|
|
@ -282,6 +282,18 @@ dependencies = [
|
|||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"r-efi",
|
||||
"wasip2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.12.3"
|
||||
|
|
@ -348,6 +360,7 @@ dependencies = [
|
|||
"log",
|
||||
"pretty_env_logger",
|
||||
"quick-xml 0.37.5",
|
||||
"rand 0.9.2",
|
||||
"rayon",
|
||||
"regex",
|
||||
"serde",
|
||||
|
|
@ -473,7 +486,7 @@ checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6"
|
|||
dependencies = [
|
||||
"env_logger 0.8.4",
|
||||
"log",
|
||||
"rand",
|
||||
"rand 0.8.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -485,6 +498,12 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "r-efi"
|
||||
version = "5.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.8.5"
|
||||
|
|
@ -492,8 +511,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"rand_chacha",
|
||||
"rand_core",
|
||||
"rand_chacha 0.3.1",
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
|
||||
dependencies = [
|
||||
"rand_chacha 0.9.0",
|
||||
"rand_core 0.9.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -503,7 +532,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core 0.9.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -512,7 +551,16 @@ version = "0.6.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"getrandom 0.2.16",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
|
||||
dependencies = [
|
||||
"getrandom 0.3.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -703,7 +751,7 @@ dependencies = [
|
|||
name = "stdarch-gen-loongarch"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"rand",
|
||||
"rand 0.8.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -736,7 +784,7 @@ version = "0.0.0"
|
|||
dependencies = [
|
||||
"core_arch",
|
||||
"quickcheck",
|
||||
"rand",
|
||||
"rand 0.8.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -819,6 +867,15 @@ version = "0.11.1+wasi-snapshot-preview1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
||||
|
||||
[[package]]
|
||||
name = "wasip2"
|
||||
version = "1.0.1+wasi-0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
|
||||
dependencies = [
|
||||
"wit-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmparser"
|
||||
version = "0.235.0"
|
||||
|
|
@ -1003,6 +1060,12 @@ version = "0.53.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen"
|
||||
version = "0.46.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
|
||||
|
||||
[[package]]
|
||||
name = "xml-rs"
|
||||
version = "0.8.27"
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ case ${TARGET} in
|
|||
TEST_CXX_COMPILER="clang++"
|
||||
TEST_RUNNER="${CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER}"
|
||||
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_x86.txt
|
||||
TEST_SAMPLE_INTRINSICS_PERCENTAGE=5
|
||||
export STDARCH_DISABLE_ASSERT_INSTR=1
|
||||
PATH="$PATH":"$(pwd)"/c_programs
|
||||
export PATH
|
||||
|
|
|
|||
|
|
@ -22,3 +22,4 @@ itertools = "0.14.0"
|
|||
quick-xml = { version = "0.37.5", features = ["serialize", "overlapped-lists"] }
|
||||
serde-xml-rs = "0.8.0"
|
||||
regex = "1.11.1"
|
||||
rand = "0.9.2"
|
||||
|
|
|
|||
|
|
@ -871,4 +871,34 @@ _m_pxor
|
|||
_m_to_int
|
||||
_m_to_int64
|
||||
_mm512_mask_floor_pd
|
||||
_mm512_mask_floor_ps
|
||||
_mm512_mask_floor_ps
|
||||
|
||||
# SDE ERROR: Cannot execute XGETBV with ECX != 0
|
||||
_xgetbv
|
||||
|
||||
# Miscellaneous issues that can be fixed first
|
||||
_kshiftli_mask16
|
||||
_kshiftli_mask32
|
||||
_kshiftli_mask64
|
||||
_kshiftli_mask8
|
||||
_kshiftri_mask16
|
||||
_kshiftri_mask32
|
||||
_kshiftri_mask64
|
||||
_kshiftri_mask8
|
||||
_mm256_castsi128_si256
|
||||
_mm256_extract_epi16
|
||||
_mm256_extract_epi8
|
||||
_mm512_castsi128_si512
|
||||
_mm512_castsi256_si512
|
||||
_mm512_conj_pch
|
||||
_mm512_mask_reduce_max_pd
|
||||
_mm512_mask_reduce_max_ps
|
||||
_mm512_mask_reduce_min_pd
|
||||
_mm512_mask_reduce_min_ps
|
||||
_mm_comineq_sh
|
||||
_mm_extract_epi16
|
||||
_mm_extract_epi8
|
||||
_mm_mask_cvtepi16_epi8
|
||||
_mm_mask_cvtpd_epi32
|
||||
_mm_mask_cvtpd_ps
|
||||
_mm_ucomineq_sh
|
||||
|
|
@ -54,6 +54,9 @@ pub struct Cli {
|
|||
/// Set the sysroot for the C++ compiler
|
||||
#[arg(long)]
|
||||
pub cxx_toolchain_dir: Option<String>,
|
||||
|
||||
#[arg(long, default_value_t = 100u8)]
|
||||
pub sample_percentage: u8,
|
||||
}
|
||||
|
||||
pub struct ProcessedCli {
|
||||
|
|
@ -65,6 +68,7 @@ pub struct ProcessedCli {
|
|||
pub linker: Option<String>,
|
||||
pub cxx_toolchain_dir: Option<String>,
|
||||
pub skip: Vec<String>,
|
||||
pub sample_percentage: u8,
|
||||
}
|
||||
|
||||
impl ProcessedCli {
|
||||
|
|
@ -74,6 +78,7 @@ impl ProcessedCli {
|
|||
let target = cli_options.target;
|
||||
let linker = cli_options.linker;
|
||||
let cxx_toolchain_dir = cli_options.cxx_toolchain_dir;
|
||||
let sample_percentage = cli_options.sample_percentage;
|
||||
|
||||
let skip = if let Some(filename) = cli_options.skip {
|
||||
let data = std::fs::read_to_string(&filename).expect("Failed to open file");
|
||||
|
|
@ -108,6 +113,7 @@ impl ProcessedCli {
|
|||
cxx_toolchain_dir,
|
||||
skip,
|
||||
filename,
|
||||
sample_percentage,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ pub fn compare_outputs(intrinsic_name_list: &Vec<String>, runner: &str, target:
|
|||
let intrinsics = intrinsic_name_list
|
||||
.par_iter()
|
||||
.filter_map(|intrinsic_name| {
|
||||
|
||||
let c = runner_command(runner)
|
||||
.arg("intrinsic-test-programs")
|
||||
.arg(intrinsic_name)
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ use crate::common::intrinsic::Intrinsic;
|
|||
use crate::common::intrinsic_helpers::TypeKind;
|
||||
use intrinsic::X86IntrinsicType;
|
||||
use itertools::Itertools;
|
||||
use rand::rng;
|
||||
use rand::seq::IndexedRandom;
|
||||
use xml_parser::get_xml_intrinsics;
|
||||
|
||||
pub struct X86ArchitectureTest {
|
||||
|
|
@ -47,7 +49,10 @@ impl SupportedArchitectureTest for X86ArchitectureTest {
|
|||
let intrinsics =
|
||||
get_xml_intrinsics(&cli_options.filename).expect("Error parsing input file");
|
||||
|
||||
let mut intrinsics = intrinsics
|
||||
let mut rng = rng();
|
||||
let sample_percentage: usize = cli_options.sample_percentage as usize;
|
||||
|
||||
let intrinsics = intrinsics
|
||||
.into_iter()
|
||||
// Not sure how we would compare intrinsic that returns void.
|
||||
.filter(|i| i.results.kind() != TypeKind::Void)
|
||||
|
|
@ -62,6 +67,12 @@ impl SupportedArchitectureTest for X86ArchitectureTest {
|
|||
.unique_by(|i| i.name.clone())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let sample_size = (intrinsics.len() * sample_percentage) / 100;
|
||||
let mut intrinsics = intrinsics
|
||||
.choose_multiple(&mut rng, sample_size)
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
intrinsics.sort_by(|a, b| a.name.cmp(&b.name));
|
||||
Self {
|
||||
intrinsics: intrinsics,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue