Skip to content

Commit

Permalink
arch
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyxu committed Sep 15, 2024
1 parent 83652e1 commit d2df667
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions rust/lance-linalg/src/distance/dot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ impl Dot for bf16 {
}
}

#[cfg(feature = "fp16kernels")]
mod kernel {
use super::*;

Expand All @@ -108,11 +107,15 @@ mod kernel {
impl Dot for f16 {
#[inline]
fn dot(x: &[Self], y: &[Self]) -> f32 {
#[cfg(target_arch = "aarch64")]
{
// TODO: add SVE support.
if std::arch::is_aarch64_feature_detected!("neon") {
return unsafe { kernel::dot_f16_neon(x.as_ptr(), y.as_ptr(), x.len() as u32) };
}
}

match *FP16_SIMD_SUPPORT {
// #[cfg(all(feature = "fp16kernels", target_arch = "aarch64"))]
// SimdSupport::Neon => unsafe {
// kernel::dot_f16_neon(x.as_ptr(), y.as_ptr(), x.len() as u32)
// },
#[cfg(all(
feature = "fp16kernels",
kernel_support = "avx512",
Expand Down

0 comments on commit d2df667

Please sign in to comment.