-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (46 loc) · 1.91 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
################################################################################
# Copyright (C) 2017 Advanced Micro Devices, Inc. All rights reserved.
################################################################################
cmake_minimum_required(VERSION 3.0)
# Default installation path
if(WIN32)
set(CMAKE_INSTALL_PREFIX "/opt/rocm/x86_64-w64-mingw32" CACHE PATH "Installation path")
else()
set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Installation path")
endif()
project(miopengemm)
find_package(ROCM REQUIRED PATHS /opt/rocm)
include(ROCMInstallTargets)
include(ROCMPackageConfigHelpers)
include(ROCMSetupVersion)
include(ROCMInstallSymlinks)
include(ROCMCreatePackage)
rocm_setup_version(VERSION 1.1.5)
#Where to find FindOpenCL.cmake and other files which help locate external files and libraries
list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
option(BUILD_SHARED_LIBS "Build shared library" ON)
option(OPENBLAS "CPU GEMM accuracy tests with OpenBLAS, otherwise slow 3-for loops code" OFF)
option(API_BENCH_MIOGEMM "Build benchmarking of MIOpenGEMM" OFF)
option(API_BENCH_CLBLAST "Build benchmarking of CLBlast" OFF)
option(API_BENCH_ISAAC "Build benchmarking of Isaac" OFF)
if(OPENBLAS)
find_package(OpenBLAS REQUIRED)
add_definitions(-DMIOPENGEMM_USE_OPENBLAS)
endif()
if (API_BENCH_CLBLAST)
find_package(CLBlast REQUIRED)
message("-- Adding definition MIOPENGEMM_BENCH_CLBLAST")
add_definitions(-DMIOPENGEMM_BENCH_CLBLAST)
endif()
if (API_BENCH_ISAAC)
find_package(Isaac REQUIRED)
add_definitions(-DMIOPENGEMM_BENCH_ISAAC)
endif()
set( CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." )
find_package( OpenCL REQUIRED )
#SET (CMAKE_CXX_COMPILER "clang++")
include(EnableCompilerWarnings)
add_subdirectory(miopengemm)
add_subdirectory(examples)
add_subdirectory(tests)
add_subdirectory(doc)