Disable dot-product depthwise conv when not compiling for Android with Clang.
PiperOrigin-RevId: 255181633
This commit is contained in:
parent
99023249f7
commit
851b3f5a46
@ -170,7 +170,8 @@ inline void DispatchDepthwiseConv(
|
|||||||
// This is compiled-in even if dot-product instructions are unavailable.
|
// This is compiled-in even if dot-product instructions are unavailable.
|
||||||
// However, tests should skip dot-product testing in that case and not
|
// However, tests should skip dot-product testing in that case and not
|
||||||
// call this code.
|
// call this code.
|
||||||
#if defined(__aarch64__) && !defined(GOOGLE_L4T)
|
#if defined(__aarch64__) && !defined(GOOGLE_L4T) && defined(__ANDROID__) && \
|
||||||
|
defined(__clang__)
|
||||||
DotProduct3x3KernelType kernel_type =
|
DotProduct3x3KernelType kernel_type =
|
||||||
optimized_ops::depthwise_conv::CategorizeDotProductKernel(
|
optimized_ops::depthwise_conv::CategorizeDotProductKernel(
|
||||||
input_shape, filter_shape, params);
|
input_shape, filter_shape, params);
|
||||||
@ -683,7 +684,8 @@ void TestOneDepthwiseConv3x3Filter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TestOneNeonDot3x3(const TestParam& test_param) {
|
void TestOneNeonDot3x3(const TestParam& test_param) {
|
||||||
#if defined(__aarch64__) && !defined(GOOGLE_L4T)
|
#if defined(__aarch64__) && !defined(GOOGLE_L4T) && defined(__ANDROID__) && \
|
||||||
|
defined(__clang__)
|
||||||
CpuBackendContext backend_context;
|
CpuBackendContext backend_context;
|
||||||
ruy::Context* ruy_context = backend_context.ruy_context();
|
ruy::Context* ruy_context = backend_context.ruy_context();
|
||||||
const auto ruy_paths = ruy_context != nullptr
|
const auto ruy_paths = ruy_context != nullptr
|
||||||
@ -854,7 +856,8 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
TestParam::TestNameSuffix);
|
TestParam::TestNameSuffix);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__aarch64__) && !defined(GOOGLE_L4T)
|
#if defined(__aarch64__) && !defined(GOOGLE_L4T) && defined(__ANDROID__) && \
|
||||||
|
defined(__clang__)
|
||||||
INSTANTIATE_TEST_SUITE_P(
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
NeonAsm, DepthwiseConvTest,
|
NeonAsm, DepthwiseConvTest,
|
||||||
testing::Combine(
|
testing::Combine(
|
||||||
|
@ -2006,7 +2006,8 @@ inline void DepthwiseConvWithRounding(
|
|||||||
|
|
||||||
// Enable for arm64 except for the Nvidia Linux 4 Tegra (L4T) running on
|
// Enable for arm64 except for the Nvidia Linux 4 Tegra (L4T) running on
|
||||||
// Jetson TX-2. This compiler does not support the offsetof() macro.
|
// Jetson TX-2. This compiler does not support the offsetof() macro.
|
||||||
#if defined(__aarch64__) && !defined(GOOGLE_L4T)
|
#if defined(__aarch64__) && !defined(GOOGLE_L4T) && defined(__ANDROID__) && \
|
||||||
|
defined(__clang__)
|
||||||
// Dispatch to dot-product 3x3 kernels when supported.
|
// Dispatch to dot-product 3x3 kernels when supported.
|
||||||
if (cpu_flags.neon_dotprod) {
|
if (cpu_flags.neon_dotprod) {
|
||||||
using optimized_ops::depthwise_conv::DotProduct3x3KernelType;
|
using optimized_ops::depthwise_conv::DotProduct3x3KernelType;
|
||||||
@ -2025,6 +2026,8 @@ inline void DepthwiseConvWithRounding(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#elif defined(__aarch64__) && !defined(GOOGLE_L4T)
|
||||||
|
|
||||||
// Dispatch to non-dot-product 3x3 kernels when supported.
|
// Dispatch to non-dot-product 3x3 kernels when supported.
|
||||||
|
|
||||||
const int stride_width = params.stride_width;
|
const int stride_width = params.stride_width;
|
||||||
|
@ -5786,7 +5786,8 @@ struct WorkspacePrefetchWrite<
|
|||||||
|
|
||||||
#endif // __aarch64__
|
#endif // __aarch64__
|
||||||
|
|
||||||
#if defined(__aarch64__) && !defined(GOOGLE_L4T)
|
#if defined(__aarch64__) && !defined(GOOGLE_L4T) && defined(__ANDROID__) && \
|
||||||
|
defined(__clang__)
|
||||||
// Dot product ops hard-coded
|
// Dot product ops hard-coded
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user