Skip to content

Commit

Permalink
Change default from hipcc to amdclang (#232)
Browse files Browse the repository at this point in the history
Co-authored-by: Nico <[email protected]>
  • Loading branch information
lawruble13 and ntrost57 authored Aug 12, 2024
1 parent b6a3854 commit 3833200
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .jenkins/staticlibrary.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def runCI =
def prj = new rocProject('rocALUTION', 'Static Library PreCheckin')
// customize for project
prj.paths.build_command = buildCommand
prj.compiler.compiler_name = 'hipcc'
prj.compiler.compiler_path = '/opt/rocm/bin/hipcc'
prj.compiler.compiler_name = 'amdclang++'
prj.compiler.compiler_path = '/opt/rocm/bin/amdclang++'
prj.libraryDependencies = ['rocPRIM', 'rocBLAS', 'rocSPARSE', 'rocRAND']

// Define test architectures, optional rocm version argument is available
Expand Down
8 changes: 4 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function display_help()
echo " [--static] build static library"
echo " [--compiler] compiler to build with"
echo " [--verbose] print additional cmake build information"
echo " [--address-sanitizer] Build with address sanitizer enabled. Uses hipcc as compiler"
echo " [--address-sanitizer] Build with address sanitizer enabled. Uses amdclang++ as compiler"
echo " [--codecoverage] build with code coverage profiling enabled"
echo " [--rm-legacy-include-dir] Remove legacy include dir Packaging added for file/folder reorg backward compatibility"
}
Expand Down Expand Up @@ -331,7 +331,7 @@ while true; do
shift ;;
--address-sanitizer)
build_address_sanitizer=true
compiler=hipcc
compiler=amdclang++
shift ;;
--codecoverage)
build_codecoverage=true
Expand All @@ -348,8 +348,8 @@ while true; do
fi
shift 2 ;;
--static)
#Forcing hipcc for static builds temporarily
compiler=${rocm_path}/bin/hipcc
#Forcing amdclang++ for static builds temporarily
compiler=${rocm_path}/bin/amdclang++
build_static=true
shift ;;
--compiler)
Expand Down
17 changes: 11 additions & 6 deletions toolchain-linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
if (DEFINED ENV{ROCM_PATH})
set(rocm_bin "$ENV{ROCM_PATH}/bin")
else()
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to the ROCm installation.")
set(rocm_bin "/opt/rocm/bin")
endif()

set(CMAKE_CXX_COMPILER "${rocm_bin}/hipcc")
set(CMAKE_C_COMPILER "${rocm_bin}/hipcc")
set(python "python3")
if (NOT DEFINED ENV{CXX})
set(CMAKE_CXX_COMPILER "${rocm_bin}/amdclang++")
else()
set(CMAKE_CXX_COMPILER "$ENV{CXX}")
endif()

# TODO remove, just to speed up slow cmake
# set(CMAKE_C_COMPILER_WORKS 1)
# set(CMAKE_CXX_COMPILER_WORKS 1)
if (NOT DEFINED ENV{CC})
set(CMAKE_C_COMPILER "${rocm_bin}/amdclang")
else()
set(CMAKE_C_COMPILER "$ENV{CC}")
endif()

0 comments on commit 3833200

Please sign in to comment.