From 048c80ae85da8a987f18595e65622566dda1425c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 16 Sep 2017 19:05:52 +0100 Subject: [PATCH] [Minor] Disable sse4.2 for torch... --- contrib/torch/torch7/lib/TH/CMakeLists.txt | 2 ++ src/lua/lua_config.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/torch/torch7/lib/TH/CMakeLists.txt b/contrib/torch/torch7/lib/TH/CMakeLists.txt index fdaec267c..1696f5b3f 100644 --- a/contrib/torch/torch7/lib/TH/CMakeLists.txt +++ b/contrib/torch/torch7/lib/TH/CMakeLists.txt @@ -170,6 +170,7 @@ IF(C_AVX2_FOUND OR C_AVX_FOUND OR C_SSE4_2_FOUND OR C_SSE4_1_FOUND) ENDIF(C_AVX2_FOUND OR C_AVX_FOUND OR C_SSE4_2_FOUND OR C_SSE4_1_FOUND) # IF SSE4 FOUND +IF(FALSE) IF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND) SET(CMAKE_C_FLAGS "${C_SSE4_1_FLAGS} -DUSE_SSE4_1 ${C_SSE4_2_FLAGS} -DUSE_SSE4_2 ${CMAKE_C_FLAGS}") IF(MSVC) @@ -179,6 +180,7 @@ IF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND) ENDIF(MSVC) SET(simd ${simd} generic/simd/convolve5x5_sse.c) ENDIF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND) +ENDIF() # IF AVX FOUND IF(FALSE) diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index d35cd84a6..aac585536 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -2892,11 +2892,11 @@ lua_config_has_torch (lua_State *L) if (cfg != NULL) { crypto_ctx = cfg->libs_ctx->crypto_ctx; -#ifndef WITH_TORCH +#if !defined(WITH_TORCH) || !defined(WITH_LUAJIT) lua_pushboolean (L, false); (void)crypto_ctx; #else - if (crypto_ctx->cpu_config & CPUID_SSE42) { + if (crypto_ctx->cpu_config & CPUID_SSE41) { lua_pushboolean (L, true); } else { -- 2.39.5