CMakeLists.txt 1.92 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
project(Phoenix)
cmake_minimum_required(VERSION 2.8)

set(CONFIG_GPU_HADAMARD "1000, 2000, 3000, 4000, 5000, 10000, 50000, 100000, 200000, 500000, 1000000, 5000000, 10000000")

set(progSrc hadamard.cpp main.cpp)

phoenix_compileAndRunExample(perf_hadamard_gpupar_O0 "-O0" "${CONFIG_GPU_HADAMARD}" ${progSrc})
phoenix_compileAndRunExample(perf_hadamard_gpupar_O1 "-O1" "${CONFIG_GPU_HADAMARD}" ${progSrc})
phoenix_compileAndRunExample(perf_hadamard_gpupar_O2 "-O2" "${CONFIG_GPU_HADAMARD}" ${progSrc})
phoenix_compileAndRunExample(perf_hadamard_gpupar_O3 "-O3" "${CONFIG_GPU_HADAMARD}" ${progSrc})
phoenix_compileAndRunExample(perf_hadamard_gpupar_O4 "-O4" "${CONFIG_GPU_HADAMARD}" ${progSrc})
phoenix_compileAndRunExample(perf_hadamard_gpupar_vectorize_O3 "-O3 -mavx2" "${CONFIG_GPU_HADAMARD}" ${progSrc})
phoenix_compileAndRunExample(perf_hadamard_gpupar_vectorize_O4 "-O4 -mavx2" "${CONFIG_GPU_HADAMARD}" ${progSrc})

16
# Minimum capabilities to use stdpar cc60
17
set(GPU_EXTRA_FLAGS " -stdpar -gpu=cc60")
18 19 20 21
# set(GPU_EXTRA_FLAGS " -stdpar -gpu=cc50")	#capabilities for the quandro M2200
# set(CMAKE_LINK_LIBRARY_FLAG "${CMAKE_LINK_LIBRARY_FLAG} ")

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Mcuda")
22

23
phoenix_compileAndRunExample(perf_hadamard_gpu_stdpar_par_vectorize_O3 "-O3 ${GPU_EXTRA_FLAGS} -mavx2" "${CONFIG_GPU_HADAMARD}" ${progSrc})
24
# phoenix_compileAndRunExample(perf_hadamard_gpu_stdpar_par_vectorize_O4 "-O4 ${GPU_EXTRA_FLAGS} -mavx2" "${CONFIG_GPU_HADAMARD}" ${progSrc})
25 26 27 28

phoenix_plotPerfLogX("hadamard_gpuparBase" perf_hadamard_gpupar_O0 perf_hadamard_gpupar_O1 perf_hadamard_gpupar_O2 perf_hadamard_gpupar_O3 perf_hadamard_gpupar_O4)

phoenix_plotPerfLogX("hadamard_gpuparParallelGPU" perf_hadamard_gpupar_O3 perf_hadamard_gpupar_vectorize_O3 perf_hadamard_gpupar_vectorize_O4
29 30
# 						perf_hadamard_gpu_stdpar_par_vectorize_O3	# Compile and works but not for quadro M2200 (too old)
# 						perf_hadamard_gpu_stdpar_par_vectorize_O4
31 32 33
						)