From 32e35b671d9d28b92938f4885828a66ff15493de Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Fri, 15 Apr 2016 12:56:31 +0530 Subject: [PATCH] Replace /opt/hcc -> /opt/rocm/hcc and /opt/hsa -> /opt/rocm/hsa [ROCm/hip commit: 5a31bad8214900ff03b6b89bd360aafe1bacc05a] --- projects/hip/CMakeLists.txt | 4 ++-- projects/hip/CONTRIBUTING.md | 6 +++--- projects/hip/bin/hipcc | 8 ++++---- projects/hip/bin/hipconfig | 4 ++-- projects/hip/cmake/FindHCC.cmake | 14 +++++++------- projects/hip/samples/0_Intro/hcc_dialects/Makefile | 4 ++-- projects/hip/tests/src/CMakeLists.txt | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/projects/hip/CMakeLists.txt b/projects/hip/CMakeLists.txt index eb3d25a675..11c6420a08 100644 --- a/projects/hip/CMakeLists.txt +++ b/projects/hip/CMakeLists.txt @@ -28,7 +28,7 @@ if(HIP_PLATFORM STREQUAL "hcc") # Determine HCC_HOME if(NOT DEFINED HCC_HOME) if(NOT DEFINED ENV{HCC_HOME}) - set(HCC_HOME "/opt/hcc" CACHE PATH "Path to which HCC has been installed") + set(HCC_HOME "/opt/rocm/hcc" CACHE PATH "Path to which HCC has been installed") else() set(HCC_HOME $ENV{HCC_HOME} CACHE PATH "Path to which HCC has been installed") endif() @@ -42,7 +42,7 @@ if(HIP_PLATFORM STREQUAL "hcc") # Determine HSA_PATH if(NOT DEFINED HSA_PATH) if(NOT DEFINED ENV{HSA_PATH}) - set(HSA_PATH "/opt/hsa" CACHE PATH "Path to which HSA runtime has been installed") + set(HSA_PATH "/opt/rocm/hsa" CACHE PATH "Path to which HSA runtime has been installed") else() set(HSA_PATH $ENV{HSA_PATH} CACHE PATH "Path to which HSA runtime has been installed") endif() diff --git a/projects/hip/CONTRIBUTING.md b/projects/hip/CONTRIBUTING.md index 4d5050ca89..3b07c0c0c5 100644 --- a/projects/hip/CONTRIBUTING.md +++ b/projects/hip/CONTRIBUTING.md @@ -27,7 +27,7 @@ The granularity is one day, so __hcc_workweek__ can only be used to distinguish Additionally, hcc binary can print the work-week to stdout: ("16014" in the version info below.)4 ``` -> /opt/hcc/bin/hcc -v +> /opt/rocm/hcc/bin/hcc -v HCC clang version 3.5.0 (based on HCC 0.8.16014-81f8a3f-f155163-5a1009a LLVM 3.5.0svn) Target: x86_64-unknown-linux-gnu Thread model: posix @@ -64,8 +64,8 @@ For applications and benchmarks outside the directed test environment, developme ## Environment Variables - **HIP_PATH** : Location of HIP include, src, bin, lib directories. -- **HCC_HOME** : Path to HCC compiler. Default /opt/hcc. -- **HSA_PATH** : Path to HSA include, lib. Default /opt/hcc. +- **HCC_HOME** : Path to HCC compiler. Default /opt/rocm/hcc. +- **HSA_PATH** : Path to HSA include, lib. Default /opt/rocm/hsa. - **CUDA_PATH* : On nvcc system, this points to root of CUDA installation. ### Contribution guidelines ### diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index 33bc1d9eca..22e2dbaa55 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -16,8 +16,8 @@ use File::Basename; # Other environment variable controls: # HIP_PATH : Path to HIP directory, default is one dir level above location of this script # CUDA_PATH : Path to CUDA SDK (default /usr/local/cuda). Used on NVIDIA platforms only. -# HCC_HOME : Path to HCC SDK (default /opt/hcc). Used on AMD platforms only. -# HSA_PATH : Path to HSA dir (default /opt/hsa). Used on AMD platforms only. +# HCC_HOME : Path to HCC SDK (default /opt/rocm/hcc). Used on AMD platforms only. +# HSA_PATH : Path to HSA dir (default /opt/rocm/hsa). Used on AMD platforms only. if(scalar @ARGV == 0){ print "No Arguments passed, exiting ...\n"; @@ -59,10 +59,10 @@ $enablestdcpplib = 0; if ($HIP_PLATFORM eq "hcc") { $HSA_PATH=$ENV{'HSA_PATH'}; - $HSA_PATH="/opt/hsa" unless defined $HSA_PATH; + $HSA_PATH="/opt/rocm/hsa" unless defined $HSA_PATH; $HCC_HOME=$ENV{'HCC_HOME'}; - $HCC_HOME="/opt/hcc" unless defined $HCC_HOME; + $HCC_HOME="/opt/rocm/hcc" unless defined $HCC_HOME; # HCC* may be used to compile src/hip_hcc.o (and also feed the HIPCXXFLAGS below) $HCC = "$HCC_HOME/bin/hcc"; diff --git a/projects/hip/bin/hipconfig b/projects/hip/bin/hipconfig index 2d880f157d..08fb6baade 100755 --- a/projects/hip/bin/hipconfig +++ b/projects/hip/bin/hipconfig @@ -37,10 +37,10 @@ $CUDA_PATH=$ENV{'CUDA_PATH'}; $CUDA_PATH='/usr/local/cuda' unless defined $CUDA_PATH; $HCC_HOME=$ENV{'HCC_HOME'}; -$HCC_HOME='/opt/hcc' unless defined $HCC_HOME; +$HCC_HOME='/opt/rocm/hcc' unless defined $HCC_HOME; $HSA_PATH=$ENV{'HSA_PATH'}; -$HSA_PATH='/opt/hsa' unless defined $HSA_PATH; +$HSA_PATH='/opt/rocm/hsa' unless defined $HSA_PATH; #--- #HIP_PLATFORM controls whether to use NVCC or HCC for compilation: diff --git a/projects/hip/cmake/FindHCC.cmake b/projects/hip/cmake/FindHCC.cmake index b277778b64..98f9d94f31 100644 --- a/projects/hip/cmake/FindHCC.cmake +++ b/projects/hip/cmake/FindHCC.cmake @@ -10,24 +10,24 @@ if(UNIX) NAMES hsa-runtime64 PATHS ENV HSA_PATH - /opt/hsa + /opt/rocm/hsa PATH_SUFFIXES lib) if( NOT DEFINED ENV{HSA_PATH} ) - set( ENV{HSA_PATH} /opt/hsa) + set( ENV{HSA_PATH} /opt/rocm/hsa) endif() find_program(HCC NAMES hcc PATHS ENV HCC_PATH - /opt/hcc + /opt/rocm/hcc PATH_SUFFIXES /bin) if( NOT DEFINED ENV{HCC_PATH} ) - set( ENV{HCC_PATH} /opt/hcc) + set( ENV{HCC_PATH} /opt/rocm/hcc) endif() # this is now dynamic @@ -35,7 +35,7 @@ if(UNIX) # NAMES mcwamp # PATHS # ENV NCC_PATH -# /opt/hcc +# /opt/rocm/hcc # PATH_SUFFIXES # /lib) @@ -44,7 +44,7 @@ if(UNIX) hc.hpp PATHS ENV NCC_PATH - /opt/hcc + /opt/rocm/hcc PATH_SUFFIXES /include) @@ -70,4 +70,4 @@ if(UNIX) endif() else() message(SEND_ERROR "HCC is currently supported on unix platforms") -endif() \ No newline at end of file +endif() diff --git a/projects/hip/samples/0_Intro/hcc_dialects/Makefile b/projects/hip/samples/0_Intro/hcc_dialects/Makefile index 108d30201c..b6e5c10afc 100644 --- a/projects/hip/samples/0_Intro/hcc_dialects/Makefile +++ b/projects/hip/samples/0_Intro/hcc_dialects/Makefile @@ -4,8 +4,8 @@ HCC = $(HCC_HOME)/bin/hcc HCC_CFLAGS= `$(HCC_HOME)/bin/hcc-config --cxxflags` HCC_LDFLAGS= `$(HCC_HOME)/bin/hcc-config --ldflags` -CPPAMP_CFLAGS= -std=c++amp -stdlib=libc++ -I/opt/hcc/include -CPPAMP_LDFLAGS= -std=c++amp -L/opt/hcc/lib -Wl,--rpath=/opt/hcc/lib -lc++ -lc++abi -ldl -lpthread -Wl,--whole-archive -lmcwamp -Wl,--no-whole-archive +CPPAMP_CFLAGS= -std=c++amp -stdlib=libc++ -I$(HCC_HOME)/include +CPPAMP_LDFLAGS= -std=c++amp -L$(HCC_HOME)/lib -Wl,--rpath=$(HCC_HOME)/lib -lc++ -lc++abi -ldl -lpthread -Wl,--whole-archive -lmcwamp -Wl,--no-whole-archive HIP_PATH?=/opt/rocm/hip HIPCC=$(HIP_PATH)/bin/hipcc diff --git a/projects/hip/tests/src/CMakeLists.txt b/projects/hip/tests/src/CMakeLists.txt index a6a4472d18..cec6cf52e3 100644 --- a/projects/hip/tests/src/CMakeLists.txt +++ b/projects/hip/tests/src/CMakeLists.txt @@ -34,7 +34,7 @@ if (${HIP_PLATFORM} STREQUAL "hcc") set (HSA_PATH $ENV{HSA_PATH}) if (NOT DEFINED HSA_PATH) - set (HSA_PATH /opt/hsa) + set (HSA_PATH /opt/rocm/hsa) endif() set (CODEXL_PATH $ENV{CODEXL_PATH})