Skip to content

Commit

Permalink
Updates - Changelog & CMakeList (#98)
Browse files Browse the repository at this point in the history
* Updates - Readme & CMakeList

* Changelog - Updates
  • Loading branch information
kiritigowda authored Mar 25, 2022
1 parent 21a587c commit ecca68f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 17 deletions.
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Radeon Performance Primitives Library

## Changelog

### Online Documentation
[RPP Documentation](https://gpuopen-professionalcompute-libraries.github.io/rpp/)

### RPP 0.93

#### Added
* New Tests

#### Optimizations
* Readme Updates

#### Changed
* **Backend** - Default Backend set to `HIP`

#### Fixed
* Minor bugs and warnings

### Tested Configurations
* Linux distribution
+ Ubuntu - `18.04` / `20.04`
+ CentOS - `8`
* ROCm: rocm-core - `5.0.0.50000-49`
* Clang - Version `6.0`
* CMake - Version `3.22.3`
* Boost - Version `1.72`
* IEEE 754-based half-precision floating-point library - Version `1.12.0`

### Known issues
* `CPU` only backend not enabled
20 changes: 3 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,14 @@ find_program(RPMBUILD_EXE rpmbuild)
find_program(DPKG_EXE dpkg)

# ROCm Path

set(ROCM_PATH /opt/rocm CACHE PATH "ROCm installation path")

set(ROCM_PATH /opt/rocm CACHE PATH "RPP default ROCm installation path")
# Avoid setting the default path to /usr/local

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH}/rpp CACHE PATH "RPP default ROCm installation path" FORCE)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH}/rpp CACHE PATH "RPP default ROCm installation path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Set message options

if(NOT WIN32)
string(ASCII 27 Esc)
set(ColourReset "${Esc}[m")
Expand All @@ -59,7 +56,6 @@ message("-- ${Green}CMake version found: ${CMAKE_VERSION}${ColourReset}")
include(CheckCXXCompilerFlag)

# Set defaults

if (NOT DEFINED BACKEND)
SET(BACKEND "HIP")
endif()
Expand All @@ -71,21 +67,17 @@ else()
endif()

# Cmake checks and setups

if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "-- ${Red}In-source builds are not allowed. Invoke cmake from build directory${ColourReset}")
endif ()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

# Set Compilers for HIP and OPENCL backends

set(COMPILER_FOR_HIP ${ROCM_PATH}/bin/hipcc)
set(COMPILER_FOR_OPENCL clang++)

# Backend specific settings

if( "${BACKEND}" STREQUAL "HIP" OR "${BACKEND}" STREQUAL "hip")

add_definitions(-DSTATIC) # This line is to be removed once STATIC becomes the only option within HIP backend, and all STATIC compile time switches are removed.

# Find package
Expand All @@ -105,9 +97,7 @@ if( "${BACKEND}" STREQUAL "HIP" OR "${BACKEND}" STREQUAL "hip")
link_libraries(stdc++)

message("-- ${Green}${PROJECT_NAME} set to build with HIP backend${ColourReset}")

elseif("${BACKEND}" STREQUAL "OCL" OR "${BACKEND}" STREQUAL "OPENCL" OR "${BACKEND}" STREQUAL "OpenCL")

# Find package
find_package(OpenCL REQUIRED)

Expand All @@ -131,7 +121,6 @@ endif()
configure_file("${PROJECT_SOURCE_DIR}/include/rpp_backend.h.in" "${PROJECT_BINARY_DIR}/include/rpp_backend.h")

# Enable SIMD for HOST code (in both OpenCL and HIP backends)

if(NOT DEFINED SIMD_ENABLE)
SET(SIMD_ENABLE "1")
endif()
Expand All @@ -146,7 +135,6 @@ else()
endif()

# Target setting

option(Boost_USE_STATIC_LIBS "Use boost static libraries" OFF)
set(BOOST_COMPONENTS filesystem system)
add_definitions(-DBOOST_ALL_NO_LIB=1)
Expand All @@ -168,14 +156,12 @@ target_include_directories(${PROJECT_NAME}
add_subdirectory(addkernels)

# Installation

install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
install(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX} PATTERN "*.h.in" EXCLUDE)
install(FILES ${PROJECT_BINARY_DIR}/include/rpp_backend.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include)


# Set package information

set(CPACK_PACKAGE_VERSION ${VERSION})
set(CPACK_PACKAGE_NAME "rpp")
set(CPACK_PACKAGE_LICENSE "MIT")
Expand Down

0 comments on commit ecca68f

Please sign in to comment.