mirror of https://github.com/google/gemma.cpp.git
parent
501fdf000e
commit
fac8aac4cb
|
|
@ -559,6 +559,7 @@ cc_library(
|
||||||
"//io",
|
"//io",
|
||||||
"//io:blob_store",
|
"//io:blob_store",
|
||||||
"//paligemma:image",
|
"//paligemma:image",
|
||||||
|
"@highway//:bit_set",
|
||||||
"@highway//:hwy",
|
"@highway//:hwy",
|
||||||
"@highway//:nanobenchmark", # timer
|
"@highway//:nanobenchmark", # timer
|
||||||
"@highway//:profiler",
|
"@highway//:profiler",
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,10 @@ static inline void Activation(ActivationType activation, const RowPtrsBF C1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#endif // GEMMA_FUSED_FFN
|
||||||
|
|
||||||
|
// Only used if !GEMMA_FUSED_FFN, but define anyway so that we can check
|
||||||
|
// using if constexpr rather than #if, which interferes with code folding.
|
||||||
template <class Mat1, class Mat2>
|
template <class Mat1, class Mat2>
|
||||||
HWY_NOINLINE void ActivationBatched(
|
HWY_NOINLINE void ActivationBatched(
|
||||||
ActivationType activation, Mat1& c1, const Mat2* c2, ThreadingContext& ctx,
|
ActivationType activation, Mat1& c1, const Mat2* c2, ThreadingContext& ctx,
|
||||||
|
|
@ -131,8 +133,6 @@ HWY_NOINLINE void ActivationBatched(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GEMMA_FUSED_FFN
|
|
||||||
|
|
||||||
template <typename T2, class LayerWeights>
|
template <typename T2, class LayerWeights>
|
||||||
HWY_NOINLINE void ResidualConnection(const MatPtrT<T2>& other,
|
HWY_NOINLINE void ResidualConnection(const MatPtrT<T2>& other,
|
||||||
MatPtrT<float>& HWY_RESTRICT x,
|
MatPtrT<float>& HWY_RESTRICT x,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue