Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions rust/lance-linalg/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,20 @@ fn main() -> Result<(), String> {
return Ok(());
}

if cfg!(not(feature = "fp16kernels")) {
println!(
"cargo:warning=fp16kernels feature is not enabled, skipping build of fp16 kernels"
);
return Ok(());
}

if target_arch == "aarch64" && target_os == "macos" {
// Build a version with NEON
build_f16_with_flags("neon", &["-mtune=apple-m1"]).unwrap();
} else if target_arch == "aarch64" && target_os == "ios" {
// Build version with NEON
// A13 bionic is the earliest supported iOS SOC
build_f16_with_flags("neon", &["-mtune=apple-a13"]).unwrap();
} else if target_arch == "aarch64" && target_os == "linux" {
// Build a version with NEON
build_f16_with_flags("neon", &["-march=armv8.2-a+fp16"]).unwrap();
Expand Down
Loading