Squashed commit of the following:
commit d6a52a8841a88bdc22f566731923bd1fc9b337aa Author: Carl Pearson <pearson@illinois.edu> Date: Fri Sep 20 07:32:02 2019 -0500 add badge commit c0a5bbaa2c77d028719c08012da10496c6585bc9 Author: Carl Pearson <pearson@illinois.edu> Date: Fri Sep 20 07:23:20 2019 -0500 download cmake instead of build, add bin to path commit ed3526a8b27984634a9fdd76d40a586d24bda310 Author: Carl Pearson <pearson@illinois.edu> Date: Thu Sep 19 17:23:07 2019 -0500 install cmake 3.15.3 commit 6442aa4f3f4cbc38bae184ac4e06954976134e0a Author: Carl Pearson <pearson@illinois.edu> Date: Thu Sep 19 17:20:33 2019 -0500 require CMake 3.13+ commit 3a0176484fd1c563a7a35edbf0e196544ee2771c Author: Carl Pearson <pearson@illinois.edu> Date: Thu Sep 19 17:17:49 2019 -0500 make VERBOSE=1 commit 8114641a64d6a3044e228fbcf17c1938991918a0 Author: Carl Pearson <pearson@illinois.edu> Date: Thu Sep 19 17:14:24 2019 -0500 try to add stubs dir to link path
This commit is contained in:
10
.github/workflows/ccpp.yml
vendored
10
.github/workflows/ccpp.yml
vendored
@@ -7,6 +7,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: install cmake
|
||||
run: |
|
||||
export PREFIX=$HOME/software/cmake
|
||||
wget https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3-Linux-x86_64.tar.gz -O cmake.tar.gz
|
||||
mkdir -p $PREFIX
|
||||
tar -xvf cmake.tar.gz --strip-components=1 -C $PREFIX
|
||||
- name: add repo key
|
||||
run: sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||
- name: add repository
|
||||
@@ -18,6 +24,7 @@ jobs:
|
||||
sudo apt-get install cuda-toolkit-10-1 cuda-libraries-dev-10-1 cuda-libraries-10-1
|
||||
- name: configure
|
||||
run: |
|
||||
export PATH=$HOME/software/cmake/bin:$PATH
|
||||
export PATH=/usr/local/cuda/bin:$PATH
|
||||
mkdir build
|
||||
cd build
|
||||
@@ -25,8 +32,9 @@ jobs:
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||
- name: build
|
||||
run: |
|
||||
export PATH=$HOME/software/cmake/bin:$PATH
|
||||
export PATH=/usr/local/cuda/bin:$PATH
|
||||
cd build
|
||||
g++ --version
|
||||
nvcc --version
|
||||
make
|
||||
make VERBOSE=1
|
||||
|
@@ -2,7 +2,8 @@
|
||||
# 3.9+ for OpenMP::OpenMP_CXX
|
||||
# 3.10+ findopenmp gained support for language-specific components
|
||||
# 3.11+ for CMake not to add -fopenmp to the nvcc flags
|
||||
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
|
||||
# 3.13+ for target_link_directories
|
||||
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
|
||||
project(perfect LANGUAGES CUDA CXX VERSION 0.1.0)
|
||||
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
||||
@@ -32,6 +33,13 @@ elseif (CMAKE_BUILD_TYPE MATCHES Release)
|
||||
set(CMAKE_CUDA_FLAGS ${CMAKE_CUDA_FLAGS} -lineinfo)
|
||||
endif()
|
||||
|
||||
# find the CUDA stubs directory in case the drivers are not installed
|
||||
# for CI, for example
|
||||
set(CUDA_TOOLKIT_ROOT_DIR "${CMAKE_CUDA_COMPILER}")
|
||||
get_filename_component(CUDA_TOOLKIT_ROOT_DIR "${CUDA_TOOLKIT_ROOT_DIR}" DIRECTORY)
|
||||
get_filename_component(CUDA_TOOLKIT_ROOT_DIR "${CUDA_TOOLKIT_ROOT_DIR}" DIRECTORY)
|
||||
set(CUDA_TOOLKIT_LIB_DIR ${CUDA_TOOLKIT_ROOT_DIR}/lib64/stubs)
|
||||
message(STATUS "CUDA toolkit stubs dir:" ${CUDA_TOOLKIT_LIB_DIR})
|
||||
|
||||
|
||||
set(CMAKE_CUDA_STANDARD 11)
|
||||
@@ -41,6 +49,7 @@ add_subdirectory(include/perfect)
|
||||
add_library(perfect INTERFACE)
|
||||
target_include_directories(perfect INTERFACE include/)
|
||||
target_include_directories(perfect INTERFACE ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
|
||||
target_link_directories(perfect INTERFACE ${CUDA_TOOLKIT_LIB_DIR})
|
||||
target_link_libraries(perfect INTERFACE nvidia-ml)
|
||||
|
||||
|
||||
|
@@ -1,5 +1,9 @@
|
||||
# perfect
|
||||
|
||||
| Branch | Status |
|
||||
|-|-|
|
||||
| master |[](https://actions-badge.atrox.dev/cwpearson/perfect/goto?ref=master)|
|
||||
|
||||
CPU/GPU performance control library for benchmarking
|
||||
* x86
|
||||
* POWER
|
||||
|
Reference in New Issue
Block a user