From fe639455bd1e02c22c459f9e29654f82652e0a97 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sun, 5 Aug 2018 21:12:39 +0200 Subject: Added an option to compile the Netlib API with static OpenCL device and context --- CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index fb62ae27..806b4b26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,9 +32,19 @@ option(SAMPLES "Enable compilation of the examples" OFF) option(TUNERS "Enable compilation of the tuners" ON) option(CLIENTS "Enable compilation of the clients to test and compare performance" OFF) option(TESTS "Enable compilation of the correctness tests" OFF) -option(NETLIB "Enable compilation of the CBLAS Netlib API" OFF) option(CUBLAS "Enables performance comparison against cuBLAS on NVIDIA GPUs" OFF) +# The optional Netlib API for CLBlast +option(NETLIB "Enable compilation of the CBLAS Netlib API" OFF) +option(NETLIB_STATIC_OPENCL "Makes OpenCL device and context in the CBLAS Netlib API static" OFF) +if(NETLIB) + message("-- Building the Netlib API of CLBlast") + if(NETLIB_STATIC_OPENCL) + message(" ^^ while using static variables for OpenCL device and context") + add_definitions(-DNETLIB_STATIC_OPENCL) + endif() +endif() + # Workarounds for bugs option(AMD_SI_EMPTY_KERNEL_WORKAROUND "Enables workaround for bug in AMD Southern Island GPUs" OFF) if(AMD_SI_EMPTY_KERNEL_WORKAROUND) -- cgit v1.2.3