From 5f4246fb42802afa3b50175f4cb89c051e724fc4 Mon Sep 17 00:00:00 2001 From: jpekkila Date: Tue, 6 Aug 2019 14:46:13 +0300 Subject: [PATCH] Standalone now uses O2 optimization level instead of O3. Also removed -march=native since this causes issues if the program is compiled on a different architecture than it is run on. Since we do not do heavy arithmetic on the host side and the host code is not performance-critical part of the code, -march-native is not very useful anyways --- src/core/CMakeLists.txt | 3 +-- src/standalone/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 5cbc271..b56c770 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -12,8 +12,7 @@ set(CUDA_ARCH_FLAGS -gencode arch=compute_37,code=sm_37 -gencode arch=compute_61,code=sm_61 -lineinfo -ftz=true # Flush denormalized floats to zero - -std=c++11 - --compiler-options -march=native) # Native host machine code + -std=c++11) #--maxrregcount=255 # -Xptxas -dlcm=ca opt-in to cache all global loads to L1/texture cache # =cg to opt out diff --git a/src/standalone/CMakeLists.txt b/src/standalone/CMakeLists.txt index 6a03e32..ed9bda9 100644 --- a/src/standalone/CMakeLists.txt +++ b/src/standalone/CMakeLists.txt @@ -21,7 +21,7 @@ if (BUILD_RT_VISUALIZATION) endif () ## Compilation flags -add_compile_options(-march=native -pipe ${OpenMP_CXX_FLAGS}) +add_compile_options(-O2 -pipe ${OpenMP_CXX_FLAGS}) add_compile_options(-Wall -Wextra -Werror -Wdouble-promotion -Wfloat-conversion)# -Wshadow) ## Compile and link