From 845460a852f48af2bd506af647c5d3b9ac62622a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 2 Mar 2018 19:10:51 +0000 Subject: [PATCH] [Fix] Fix brain-damaged torch build system --- contrib/torch/torch7/lib/TH/generic/simd/convolve.c | 4 ++-- contrib/torch/torch7/lib/TH/vector/AVX.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/torch/torch7/lib/TH/generic/simd/convolve.c b/contrib/torch/torch7/lib/TH/generic/simd/convolve.c index bf07bbed6..da7a4bb20 100644 --- a/contrib/torch/torch7/lib/TH/generic/simd/convolve.c +++ b/contrib/torch/torch7/lib/TH/generic/simd/convolve.c @@ -1,4 +1,4 @@ -#if defined(__AVX__) +#if defined(USE_AVX) && defined(__AVX__) #ifdef _MSC_VER #include @@ -113,7 +113,7 @@ void convolve_5x5_sse(float* output, float* input, float* kernel, long outRows, void convolve_5x5_avx(float* output, float* input, float* kernel, long outRows, long outCols, long outStride, long inCols); void convolve_5x5(float* output, float* input, float* kernel, long outRows, long outCols, long inCols) { -#if defined(__AVX__) +#if defined(USE_AVX) && defined(__AVX__) int avx = haveCPUFeature(kCPUFeature_AVX); if (avx) { diff --git a/contrib/torch/torch7/lib/TH/vector/AVX.c b/contrib/torch/torch7/lib/TH/vector/AVX.c index b7d5dd1d6..58c4e6d35 100644 --- a/contrib/torch/torch7/lib/TH/vector/AVX.c +++ b/contrib/torch/torch7/lib/TH/vector/AVX.c @@ -1,4 +1,4 @@ -#if defined(__AVX__) +#if defined(USE_AVX) && defined(__AVX__) #ifndef _MSC_VER #include #else -- 2.39.5