Skip to content

Commit

Permalink
Fixing android aarch, non fp16 build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil committed Sep 18, 2023
1 parent 32fb2c3 commit d0d27f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gemm-f16/src/gemm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,7 @@ pub mod f16 {
}

#[cfg(target_arch = "aarch64")]
#[cfg(target_feature = "fp16")]
{
if gemm_common::feature_detected!("neon") {
neon::gemm_basic
Expand All @@ -1087,6 +1088,12 @@ pub mod f16 {
}
}

#[cfg(target_arch = "aarch64")]
#[cfg(not(target_feature = "fp16"))]
{
scalar::gemm_basic
}

#[cfg(not(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64")))]
{
scalar::gemm_basic
Expand Down Expand Up @@ -1147,6 +1154,7 @@ pub mod f16 {
}

#[cfg(target_arch = "aarch64")]
#[cfg(target_feature = "fp16")]
mod neon {
use super::*;
use crate::microkernel::neon::f16::{MR_DIV_N, NR, UKR};
Expand Down
1 change: 1 addition & 0 deletions gemm-f16/src/microkernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ pub mod neon {
}
}

#[cfg(target_feature = "fp16")]
pub mod f16 {
use core::arch::{aarch64::uint16x8_t, asm};
use core::mem::transmute;
Expand Down

0 comments on commit d0d27f6

Please sign in to comment.