-
Notifications
You must be signed in to change notification settings - Fork 299
intrinsic-test
: Adding x86 behavioural testing.
#1894
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
base: master
Are you sure you want to change the base?
intrinsic-test
: Adding x86 behavioural testing.
#1894
Conversation
#[derive(Debug, Clone, PartialEq)] | ||
pub struct X86IntrinsicType(pub IntrinsicType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@folkertdev as per our discussion in #1884 (comment), would it make sense to add architecture-specific elements here?
Notes: 1. chunk_info has been moved to `common/mod.rs` since it will be needed for all architectures
cbe9081
to
246fef9
Compare
41db5a8
to
5fc0f3b
Compare
fn build_c_file(&self) -> bool { | ||
let c_target = "aarch64"; | ||
let platform_headers = &["arm_neon.h", "arm_acle.h", "arm_fp16.h"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this just a direct copy right now? otherwise why does arm show up here?
match str::parse::<u32>(etype_processed.as_str()) { | ||
Ok(value) => data.bit_len = Some(value), | ||
Err(_) => { | ||
data.bit_len = match data.kind() { | ||
TypeKind::Char(_) => Some(8), | ||
TypeKind::BFloat => Some(16), | ||
TypeKind::Int(_) => Some(32), | ||
TypeKind::Float => Some(32), | ||
_ => None, | ||
}; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are only some type kinds covered here? Maybe this could be a method on TypeKind
?
.add_arch_flags(vec![ | ||
"avx", | ||
"avx2", | ||
"avx512f", | ||
"avx512cd", | ||
"avx512dq", | ||
"avx512vl", | ||
"avx512bw", | ||
"avx512bf16", | ||
"avx512bitalg", | ||
"lzcnt", | ||
"popcnt", | ||
"adx", | ||
"aes", | ||
]) | ||
.set_compiler(cpp_compiler) | ||
.set_target(&config.target) | ||
.set_opt_level("2") | ||
.set_cxx_toolchain_dir(config.cxx_toolchain_dir.as_deref()) | ||
.set_project_root("c_programs") | ||
.add_extra_flags(vec!["-ffp-contract=off", "-Wno-narrowing"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1896 just merged, so now the vec!
calls here can be dropped (just pass an array)
Context
This is a redo of PR #1814, since a lot of details have changed with PRs #1863, #1862, #1861, #1852.
r? @folkertdev
cc: @Amanieu