-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (33 loc) · 1.61 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
cmake_minimum_required(VERSION 3.10)
project(MatrixIPU)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set(CMAKE_CXX_EXTENSIONS ON)
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-result -Wall -Werror -ansi -Wno-deprecated")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -Wno-unused-result -Wall -ansi -Wno-deprecated -march=native -mtune=native -O3")
endif()
# Can be useful for debugging but will make Poplar segmentationfault.
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -g3 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
find_package(poplar REQUIRED)
add_executable(matrix-ipu-calc src/main.cpp)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
add_library(mmio include/mmio.c)
target_include_directories(mmio PUBLIC include/)
target_link_libraries(matrix-ipu-calc
poplar
poputil
popops
mmio
)
configure_file(src/codelets/spmv/MatrixBlock.cpp codelets/spmv/MatrixBlock.cpp COPYONLY)
configure_file(src/codelets/spmv/ReducerToVector.cpp codelets/spmv/ReducerToVector.cpp COPYONLY)
configure_file(src/codelets/bfs/MatrixBlock.cpp codelets/bfs/MatrixBlock.cpp COPYONLY)
configure_file(src/codelets/bfs/Normalize.cpp codelets/bfs/Normalize.cpp COPYONLY)
configure_file(src/codelets/prims/PrimsBlock.cpp codelets/prims/PrimsBlock.cpp COPYONLY)
configure_file(src/codelets/prims/ReduceBlock.cpp codelets/prims/ReduceBlock.cpp COPYONLY)
configure_file(src/codelets/prims/GatherResult.cpp codelets/prims/GatherResult.cpp COPYONLY)
# include_directories(include)
# add_subdirectory(src)