diff --git a/CMakeLists.txt b/CMakeLists.txt index ef5306e..6a6470f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,7 @@ endfunction() set(GPULS_CUDA_FLAGS -arch=compute_60 -code=compute_60,sm_60,sm_86) set(GPULS_CUDA_FLAGS ${GPULS_CUDA_FLAGS} -std=c++17 -O3 --extended-lambda) # set(GPULS_CUDA_FLAGS ${GPULS_CUDA_FLAGS} -rdc=true) +set(GPULS_CUDA_DEBUG_FLAGS ) set(CMAKE_CXX_STANDARD 17) @@ -67,6 +68,10 @@ file(GLOB GPULS_GPU_SOURCES "src/algorithms/map/*.cu" "src/algorithms/rec_opt/*.cu") +# Define debug flags +set(C_DEBUG_FLAGS "") +set(CXX_DEBUG_FLAGS "") + if(DEFINED PATCH_ABC) # as a patch of ABC message("Building in ABC patch mode ...") @@ -183,6 +188,11 @@ if(DEFINED PATCH_ABC) target_compile_options(abcg PRIVATE $<$:${GPULS_CUDA_FLAGS}>) add_definitions(-DPATCH_ABC) + # Add debug flags based on build type + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + target_compile_options(abcg PRIVATE $<$:${C_DEBUG_FLAGS}>) + target_compile_options(abcg PRIVATE $<$:${CXX_DEBUG_FLAGS}>) + endif() else() # standalone executable message("Building in standalone mode ...") @@ -195,4 +205,10 @@ else() target_include_directories(gpuls PRIVATE "include") # header only libraries target_compile_options(gpuls PRIVATE $<$:${GPULS_CUDA_FLAGS}>) + + # Add debug flags based on build type + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + target_compile_options(gpuls PRIVATE $<$:${C_DEBUG_FLAGS}>) + target_compile_options(gpuls PRIVATE $<$:${CXX_DEBUG_FLAGS}>) + endif() endif() diff --git a/abc_synth_benchmark.sh b/abc_synth_benchmark.sh new file mode 100644 index 0000000..e12347b --- /dev/null +++ b/abc_synth_benchmark.sh @@ -0,0 +1 @@ +time ./build/abcg -f realistic_synth_benchmark_cpu/abc.script \ No newline at end of file diff --git a/abcg_synth_benchmark.sh b/abcg_synth_benchmark.sh new file mode 100644 index 0000000..b37a9a5 --- /dev/null +++ b/abcg_synth_benchmark.sh @@ -0,0 +1 @@ +time ./build/abcg -f realistic_synth_benchmark_gpu/abc.script \ No newline at end of file diff --git a/abcg_synth_benchmark_nomap.sh b/abcg_synth_benchmark_nomap.sh new file mode 100644 index 0000000..c33da9e --- /dev/null +++ b/abcg_synth_benchmark_nomap.sh @@ -0,0 +1 @@ +time ./build/abcg -f realistic_synth_benchmark_nomap_gpu/abc.script \ No newline at end of file