Skip to content

Commit

Permalink
Add config for HIP build (#260)
Browse files Browse the repository at this point in the history
* Add an amdclang host config
  • Loading branch information
adayton1 authored May 7, 2024
1 parent c26ce52 commit 905caf6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.18)
##########################################################################

project(CARE
LANGUAGES CXX
LANGUAGES C CXX
VERSION 0.12.0)

include(${PROJECT_SOURCE_DIR}/cmake/Setup.cmake)
Expand Down
16 changes: 16 additions & 0 deletions configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
##############################################################################
# Copyright (c) 2020-24, Lawrence Livermore National Security, LLC and CARE
# project contributors. See the CARE LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
##############################################################################

set(COMPILER_BASE "/usr/tce/packages/rocmcc/rocmcc-6.1.0-magic" CACHE PATH "")
set(CMAKE_C_COMPILER "${COMPILER_BASE}/bin/amdclang" CACHE PATH "")
set(CMAKE_CXX_COMPILER "${COMPILER_BASE}/bin/amdclang++" CACHE PATH "")

set(ENABLE_HIP ON CACHE BOOL "Enable Hip")
set(ROCM_PATH "/usr/tce/packages/rocmcc/rocmcc-6.1.0-magic" CACHE PATH "")
set(CMAKE_HIP_ARCHITECTURES "gfx942:xnack+" CACHE STRING "")

set(CARE_ENABLE_IMPLICIT_CONVERSIONS OFF CACHE BOOL "Enable implicit conversions")

0 comments on commit 905caf6

Please sign in to comment.