From dbdb58c6002cbd693f246f1e93919cc32ad4055a Mon Sep 17 00:00:00 2001 From: CNugteren Date: Sun, 9 Aug 2015 15:50:41 +0200 Subject: Refactored the tuners, added JSON output --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ca225b2..72cfe52f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -154,12 +154,9 @@ if(TUNERS) # Includes CLTune include_directories(${CLTUNE_INCLUDE_DIRS}) - # Creates the common tuner objects (requires CMake 2.8.8) - add_library(tuners_common OBJECT src/tuning/tuning.cc) - # Adds tuning executables foreach(KERNEL ${KERNELS}) - add_executable(tuner_${KERNEL} $ src/tuning/${KERNEL}.cc) + add_executable(tuner_${KERNEL} src/tuning/${KERNEL}.cc) target_link_libraries(tuner_${KERNEL} clblast ${CLTUNE_LIBRARIES} ${OPENCL_LIBRARIES}) install(TARGETS tuner_${KERNEL} DESTINATION bin) endforeach() -- cgit v1.2.3 From 07e393cce4f03184853486ecae711e8575d0c177 Mon Sep 17 00:00:00 2001 From: CNugteren Date: Wed, 19 Aug 2015 19:35:56 +0200 Subject: Added target to run all tuners --- CMakeLists.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 72cfe52f..51db02da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,7 @@ set(LEVEL1_ROUTINES xaxpy) set(LEVEL2_ROUTINES xgemv xhemv xsymv) set(LEVEL3_ROUTINES xgemm xsymm xhemm xsyrk xherk xsyr2k xher2k xtrmm) set(ROUTINES ${LEVEL1_ROUTINES} ${LEVEL2_ROUTINES} ${LEVEL3_ROUTINES}) +set(PRECISIONS 32 3232 64 6464) # ================================================================================================== @@ -133,6 +134,17 @@ install(FILES include/clblast.h DESTINATION include) # ================================================================================================== +# Sets a default platform and device to run tuners and/or tests on +set(DEVICEPLATFORM ) +if(DEFINED ENV{DEFAULT_DEVICE}) + set(DEVICEPLATFORM ${DEVICEPLATFORM} -device $ENV{DEFAULT_DEVICE}) +endif() +if(DEFINED ENV{DEFAULT_PLATFORM}) + set(DEVICEPLATFORM ${DEVICEPLATFORM} -platform $ENV{DEFAULT_PLATFORM}) +endif() + +# ================================================================================================== + # This section contains all the code related to the examples if(SAMPLES) @@ -161,6 +173,17 @@ if(TUNERS) install(TARGETS tuner_${KERNEL} DESTINATION bin) endforeach() + # Adds 'alltuners' target: runs all tuners for all precisions + set(ALLTUNERS ) + set(ALLTUNERSDEPENDS ) + foreach(KERNEL ${KERNELS}) + foreach(PRECISION ${PRECISIONS}) + set(ALLTUNERS ${ALLTUNERS} COMMAND tuner_${KERNEL} -precision ${PRECISION} ${DEVICEPLATFORM}) + endforeach() + set(ALLTUNERSDEPENDS tuner_${KERNEL}) + endforeach() + add_custom_target(alltuners ${ALLTUNERS} DEPENDS ${ALLTUNERSDEPENDS}) + endif() # ================================================================================================== -- cgit v1.2.3