summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt20
-rw-r--r--README.md4
-rw-r--r--cmake/Modules/FindCLTune.cmake68
3 files changed, 6 insertions, 86 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d30a38c..7ba512eb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -156,15 +156,6 @@ elseif(CUDA)
link_directories(${CUDA_TOOLKIT_ROOT_DIR}/lib64)
endif()
-# Locates the CLTune library in case the tuners need to be compiled. "FindCLTune.cmake" is included.
-if(TUNERS)
- find_package(CLTune)
- if(NOT CLTUNE_FOUND)
- message(STATUS "Could NOT find CLTune, disabling the compilation of the tuners")
- set(TUNERS OFF)
- endif()
-endif()
-
# Don't search for system libraries when cross-compiling
if(${CMAKE_SYSTEM_NAME} STREQUAL Android)
if(TESTS)
@@ -374,13 +365,14 @@ endif()
# ==================================================================================================
-# This section contains all the code related to the tuners. These tuners require the presence of
-# the CLTune library (not included as part of the source).
+# This section contains all the code related to the tuners
+# TODO: Remove dependency on CLBlast
if(TUNERS)
set(TUNERS_COMMON
src/tuning/configurations.cpp
src/tuning/configurations.hpp
+ src/tuning/tuning.cpp
src/tuning/tuning.hpp)
# Visual Studio requires the sources of non-exported objects/libraries
@@ -391,14 +383,12 @@ if(TUNERS)
# Adds tuning executables
foreach(KERNEL ${KERNELS})
add_executable(clblast_tuner_${KERNEL} ${TUNERS_COMMON} src/tuning/kernels/${KERNEL}.cpp)
- target_link_libraries(clblast_tuner_${KERNEL} clblast ${CLTUNE_LIBRARIES} ${API_LIBRARIES})
- target_include_directories(clblast_tuner_${KERNEL} PUBLIC ${CLTUNE_INCLUDE_DIRS})
+ target_link_libraries(clblast_tuner_${KERNEL} clblast ${API_LIBRARIES})
install(TARGETS clblast_tuner_${KERNEL} DESTINATION bin)
endforeach()
foreach(ROUTINE_TUNER ${ROUTINE_TUNERS})
add_executable(clblast_tuner_routine_${ROUTINE_TUNER} ${TUNERS_COMMON} src/tuning/routines/${ROUTINE_TUNER}.cpp)
- target_link_libraries(clblast_tuner_routine_${ROUTINE_TUNER} clblast ${CLTUNE_LIBRARIES} ${API_LIBRARIES})
- target_include_directories(clblast_tuner_routine_${ROUTINE_TUNER} PUBLIC ${CLTUNE_INCLUDE_DIRS})
+ target_link_libraries(clblast_tuner_routine_${ROUTINE_TUNER} clblast ${API_LIBRARIES})
install(TARGETS clblast_tuner_routine_${ROUTINE_TUNER} DESTINATION bin)
endforeach()
diff --git a/README.md b/README.md
index 5f4b3d15..6c27af51 100644
--- a/README.md
+++ b/README.md
@@ -180,8 +180,6 @@ If your device is not (yet) among this list or if you want to tune CLBlast for s
cmake -DTUNERS=ON ..
-Note that CLBlast's tuners are based on the [CLTune auto-tuning library](https://github.com/CNugteren/CLTune), which has to be installed separately (requires version 2.6.0 or higher).
-
Compiling with `-DTUNERS=ON` will generate a number of tuners, each named `clblast_tuner_xxxxx`, in which `xxxxx` corresponds to a `.opencl` kernel file as found in `src/kernels`. These kernels corresponds to routines (e.g. `xgemm`) or to common pre-processing or post-processing kernels (`copy` and `transpose`). Running such a tuner will test a number of parameter-value combinations on your device and report which one gave the best performance. Running `make alltuners` runs all tuners for all precisions in one go. You can set the default device and platform for `alltuners` by setting the `CLBLAST_DEVICE` and `CLBLAST_PLATFORM` environmental variables.
The tuners output a JSON-file with the results. The best results need to be added to `src/database/kernels/xxxxx.hpp` in the appropriate section. However, this can be done automatically based on the JSON-data using a Python (2.7 or 3.x) script in `scripts/database/database.py`. If you want the found parameters to be included in future releases of CLBlast, please attach the JSON files to the corresponding issue on GitHub or [email the main author](http://www.cedricnugteren.nl).
@@ -416,7 +414,7 @@ More information
Further information on CLBlast is available through the following links:
* A 20-minute presentation of CLBlast was given at the GPU Technology Conference in May 2017. A recording is available on the [GTC on-demand website](http://on-demand.gputechconf.com/gtc/2017/video/s7280-nugteren-clblast.mp4) (poor audio quality however) and a full slide-set is also available [as PDF](http://on-demand.gputechconf.com/gtc/2017/presentation/s7280-cedric-nugteren-clblast.pdf).
-* More in-depth information and experimental results are also available in a scientific paper titled [CLBlast: A Tuned OpenCL BLAS Library](https://arxiv.org/abs/1705.05249) (May 2017). For CLTune, see also the [CLTune: A Generic Auto-Tuner for OpenCL Kernels](https://arxiv.org/abs/1703.06503) paper.
+* More in-depth information and experimental results are also available in a scientific paper titled [CLBlast: A Tuned OpenCL BLAS Library](https://arxiv.org/abs/1705.05249) (May 2017). For CLTune, the inspiration for the included auto-tuner, see also the [CLTune: A Generic Auto-Tuner for OpenCL Kernels](https://arxiv.org/abs/1703.06503) paper.
Support us
diff --git a/cmake/Modules/FindCLTune.cmake b/cmake/Modules/FindCLTune.cmake
deleted file mode 100644
index 3a37576a..00000000
--- a/cmake/Modules/FindCLTune.cmake
+++ /dev/null
@@ -1,68 +0,0 @@
-
-# ==================================================================================================
-# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
-# project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
-# width of 100 characters per line.
-#
-# Author(s):
-# Cedric Nugteren <www.cedricnugteren.nl>
-#
-# ==================================================================================================
-#
-# Defines the following variables:
-# CLTUNE_FOUND Boolean holding whether or not the CLTune library was found
-# CLTUNE_INCLUDE_DIRS The CLTune include directory
-# CLTUNE_LIBRARIES The CLTune library
-#
-# In case CLTune is not installed in the default directory, set the CLTUNE_ROOT variable to point to
-# the root of CLTune, such that 'cltune.h' can be found in $CLTUNE_ROOT/include. This can either be
-# done using an environmental variable (e.g. export CLTUNE_ROOT=/path/to/cltune) or using a CMake
-# variable (e.g. cmake -DCLTUNE_ROOT=/path/to/cltune ..).
-#
-# ==================================================================================================
-
-# Sets the possible install locations
-set(CLTUNE_HINTS
- ${CLTUNE_ROOT}
- $ENV{CLTUNE_ROOT}
-)
-set(CLTUNE_PATHS
- /usr
- /usr/local
-)
-
-# Finds the include directories
-find_path(CLTUNE_INCLUDE_DIRS
- NAMES cltune.h
- HINTS ${CLTUNE_HINTS}
- PATH_SUFFIXES include inc include/x86_64 include/x64
- PATHS ${CLTUNE_PATHS}
- DOC "CLTune include header cltune.h"
-)
-mark_as_advanced(CLTUNE_INCLUDE_DIRS)
-
-# Finds the library
-find_library(CLTUNE_LIBRARIES
- NAMES cltune
- HINTS ${CLTUNE_HINTS}
- PATH_SUFFIXES lib lib64 lib/x86_64 lib/x64 lib/x86 lib/Win32
- PATHS ${CLTUNE_PATHS}
- DOC "CLTune library"
-)
-mark_as_advanced(CLTUNE_LIBRARIES)
-
-# ==================================================================================================
-
-# Notification messages
-if(NOT CLTUNE_INCLUDE_DIRS)
- message(STATUS "Could NOT find 'cltune.h', install CLTune or set CLTUNE_ROOT")
-endif()
-if(NOT CLTUNE_LIBRARIES)
- message(STATUS "Could NOT find CLTune library, install it or set CLTUNE_ROOT")
-endif()
-
-# Determines whether or not CLTune was found
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CLTune DEFAULT_MSG CLTUNE_INCLUDE_DIRS CLTUNE_LIBRARIES)
-
-# ==================================================================================================