Skip to content

Commit

Permalink
Merge pull request #204 from ROCm/bugfix/swdev-471470
Browse files Browse the repository at this point in the history
Minimal set of changes to enable building with LLVM flang. (#198)
  • Loading branch information
vamovsik authored Jan 13, 2025
2 parents e068c43 + 05a6242 commit a2e55be
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# Change Log for hipfort

## hipfort 0.5.1 for ROCm 6.3.2

### Additions

* Support for building with LLVM Flang

### Resolved issues

* Fixed the exported `hipfort::hipsparse` CMake target

## hipfort 0.5.0 for ROCm 6.3.0

### Added
### Additions

* Added roctx to the hipfort interfaces

### Changed
### Changes

* Updated the hipsolver bindings

## hipfort 0.4-0 for ROCm 6.0.1

### Fixes
### Resolved issues

- Included hipfort-config.cmake in the deb and rpm packages

Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set(HIPFORT_BUILD_TYPE "RELEASE" CACHE STRING "Set to RELEASE TESTING or DEBUG"
# The ROCm release manager and other integrators should build hipfort as follows:
# cmake -DHIPFORT_INSTALL_DIR=/opt/rocm-<release>/hipfort -DHIPFORT_VERSION=<release> <githubrepo>

set(HIPFORT_VERSION "0.5.0" CACHE STRING "Version of HIPFORT to build")
set(HIPFORT_VERSION "0.5.1" CACHE STRING "Version of HIPFORT to build")
set(HIPFORT_INSTALL_DIR "/usr/local/hipfort-${HIPFORT_VERSION}" CACHE STRING "Install directory for hipfort")
IF(CMAKE_INSTALL_PREFIX)
# Make HIPFORT_INSTALL_DIR be the same as CmAKE_INSTALL_PREFIX
Expand Down Expand Up @@ -107,15 +107,15 @@ ENDIF(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F08)
#OPTION(USE_MPI "Use the MPI library for parallelization" OFF)
#OPTION(USE_OPENMP "Use OpenMP for parallelization" OFF)

IF(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
IF(CMAKE_Fortran_COMPILER_ID MATCHES "(Cray|LLVMFlang)")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS}")
ELSE(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
ELSE(CMAKE_Fortran_COMPILER_ID MATCHES "(Cray|LLVMFlang)")
IF(CMAKE_Fortran_COMPILER_SUPPORTS_F08)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS} -std=f2008")
ELSE(CMAKE_Fortran_COMPILER_SUPPORTS_F08)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS} -std=f2003")
ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F08)
ENDIF(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
ENDIF(CMAKE_Fortran_COMPILER_ID MATCHES "(Cray|LLVMFlang)")

# Set compile flags for DEBUG, # RELEASE, or TESTING.
INCLUDE(${CMAKE_MODULE_PATH}/SetFortranFlags.cmake)
Expand Down
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ if(HIP_PLATFORM STREQUAL "amd")

find_package(hipsparse PATHS ${ROCM_PATH} /opt/rocm)
if(hipsparse_FOUND)
hipfort_add_component(hipsparse hip::hipsparse)
hipfort_add_component(hipsparse roc::hipsparse)
else()
message(STATUS "Skipping hipfort::hipsparse target export")
endif()
Expand Down

0 comments on commit a2e55be

Please sign in to comment.