CMake: Fixed clBLAS handling
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "isaac/array.h"
|
||||
#include "isaac/symbolic/execute.h"
|
||||
#ifdef BENCH_CLBLAS
|
||||
#include "isaac/wrap/clBLAS.h"
|
||||
#include "clBLAS.h"
|
||||
#endif
|
||||
#ifdef BENCH_CBLAS
|
||||
#include "cblas.h"
|
||||
|
@@ -1,15 +0,0 @@
|
||||
file(GLOB CLAMDBLAS_ROOT /opt/clBlas*)
|
||||
|
||||
set(CLAMDBLAS_INCLUDE_HINTS "${CLAMDBLAS_ROOT}/include")
|
||||
set(CLAMDBLAS_LIBRARIES_HINTS "${CLAMDBLAS_ROOT}/lib64")
|
||||
|
||||
find_path(CLAMDBLAS_INCLUDE_DIR clBLAS.h HINTS ${CLAMDBLAS_INCLUDE_HINTS})
|
||||
find_library(CLAMDBLAS_LIBRARIES NAMES clBLAS HINTS ${CLAMDBLAS_LIBRARIES_HINTS})
|
||||
|
||||
if(CLAMDBLAS_LIBRARIES)
|
||||
set(CLAMDBLAS_LIBRARIES ${CLAMDBLAS_LIBRARIES})
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CLAMDBLAS DEFAULT_MSG CLAMDBLAS_LIBRARIES CLAMDBLAS_INCLUDE_DIR)
|
||||
mark_as_advanced(CLAMDBLAS)
|
15
cmake/FindCLBLAS.cmake
Normal file
15
cmake/FindCLBLAS.cmake
Normal file
@@ -0,0 +1,15 @@
|
||||
file(GLOB CLBLAS_ROOT /opt/clBLAS*)
|
||||
|
||||
set(CLBLAS_INCLUDE_HINTS "${CLBLAS_ROOT}/include")
|
||||
set(CLBLAS_LIBRARIES_HINTS "${CLBLAS_ROOT}/lib64")
|
||||
|
||||
find_path(CLBLAS_INCLUDE_DIR clBLAS.h HINTS ${CLBLAS_INCLUDE_HINTS})
|
||||
find_library(CLBLAS_LIBRARIES NAMES clBLAS HINTS ${CLBLAS_LIBRARIES_HINTS})
|
||||
|
||||
if(CLBLAS_LIBRARIES)
|
||||
set(CLBLAS_LIBRARIES ${CLBLAS_LIBRARIES})
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CLBLAS DEFAULT_MSG CLBLAS_LIBRARIES CLBLAS_INCLUDE_DIR)
|
||||
mark_as_advanced(CLBLAS)
|
@@ -18,8 +18,10 @@ std::string Context::cache_path()
|
||||
{
|
||||
//user-specified cache path
|
||||
std::string result = tools::getenv("ISAAC_CACHE_PATH");
|
||||
if(!result.empty())
|
||||
if(!result.empty()){
|
||||
if(tools::mkpath(result)==0)
|
||||
return result;
|
||||
}
|
||||
|
||||
//create in home
|
||||
result = tools::getenv("HOME");
|
||||
|
@@ -73,7 +73,7 @@ def main():
|
||||
libraries += ['gnustl_shared']
|
||||
|
||||
#Source files
|
||||
src = 'src/lib/wrap/cublas.cpp src/lib/wrap/clBLAS.cpp src/lib/exception/operation_not_supported.cpp src/lib/exception/unknown_datatype.cpp src/lib/value_scalar.cpp src/lib/array.cpp src/lib/symbolic/io.cpp src/lib/symbolic/expression.cpp src/lib/symbolic/preset.cpp src/lib/symbolic/execute.cpp src/lib/kernels/binder.cpp src/lib/kernels/keywords.cpp src/lib/kernels/parse.cpp src/lib/kernels/templates/dot.cpp src/lib/kernels/templates/ger.cpp src/lib/kernels/templates/axpy.cpp src/lib/kernels/templates/base.cpp src/lib/kernels/templates/gemm.cpp src/lib/kernels/templates/gemv.cpp src/lib/kernels/mapped_object.cpp src/lib/kernels/stream.cpp src/lib/driver/dispatch.cpp src/lib/driver/kernel.cpp src/lib/driver/backend.cpp src/lib/driver/platform.cpp src/lib/driver/buffer.cpp src/lib/driver/event.cpp src/lib/driver/ndrange.cpp src/lib/driver/device.cpp src/lib/driver/program_cache.cpp src/lib/driver/check.cpp src/lib/driver/command_queue.cpp src/lib/driver/handle.cpp src/lib/driver/context.cpp src/lib/driver/program.cpp src/lib/profiles/predictors/random_forest.cpp src/lib/profiles/profiles.cpp src/lib/profiles/presets.cpp '.split() + [os.path.join('src', 'bind', sf) for sf in ['_isaac.cpp', 'core.cpp', 'driver.cpp', 'kernels.cpp', 'exceptions.cpp']]
|
||||
src = 'src/lib/exception/operation_not_supported.cpp src/lib/exception/unknown_datatype.cpp src/lib/value_scalar.cpp src/lib/driver/check.cpp src/lib/driver/ndrange.cpp src/lib/driver/platform.cpp src/lib/driver/backend.cpp src/lib/driver/program.cpp src/lib/driver/command_queue.cpp src/lib/driver/event.cpp src/lib/driver/kernel.cpp src/lib/driver/handle.cpp src/lib/driver/device.cpp src/lib/driver/program_cache.cpp src/lib/driver/buffer.cpp src/lib/driver/context.cpp src/lib/driver/dispatch.cpp src/lib/kernels/templates/axpy.cpp src/lib/kernels/templates/gemv.cpp src/lib/kernels/templates/dot.cpp src/lib/kernels/templates/base.cpp src/lib/kernels/templates/ger.cpp src/lib/kernels/templates/gemm.cpp src/lib/kernels/stream.cpp src/lib/kernels/keywords.cpp src/lib/kernels/mapped_object.cpp src/lib/kernels/binder.cpp src/lib/kernels/parse.cpp src/lib/wrap/clBLAS.cpp src/lib/wrap/cublas.cpp src/lib/profiles/predictors/random_forest.cpp src/lib/profiles/presets.cpp src/lib/profiles/profiles.cpp src/lib/symbolic/execute.cpp src/lib/symbolic/expression.cpp src/lib/symbolic/io.cpp src/lib/symbolic/preset.cpp src/lib/array.cpp '.split() + [os.path.join('src', 'bind', sf) for sf in ['_isaac.cpp', 'core.cpp', 'driver.cpp', 'kernels.cpp', 'exceptions.cpp']]
|
||||
boostsrc = 'external/boost/libs/'
|
||||
for s in ['numpy','python','smart_ptr','system','thread']:
|
||||
src = src + [x for x in recursive_glob('external/boost/libs/' + s + '/src/','.cpp') if 'win32' not in x and 'pthread' not in x]
|
||||
|
Reference in New Issue
Block a user