diff --git a/HIP-Examples-Applications/BinomialOption/Makefile b/HIP-Examples-Applications/BinomialOption/Makefile index 2f11d87..ea6f2dd 100644 --- a/HIP-Examples-Applications/BinomialOption/Makefile +++ b/HIP-Examples-Applications/BinomialOption/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = BinomialOption.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/BitonicSort/Makefile b/HIP-Examples-Applications/BitonicSort/Makefile index 6c62bad..6582c83 100644 --- a/HIP-Examples-Applications/BitonicSort/Makefile +++ b/HIP-Examples-Applications/BitonicSort/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = BitonicSort.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/FastWalshTransform/Makefile b/HIP-Examples-Applications/FastWalshTransform/Makefile index ee7c21a..f2ccb83 100644 --- a/HIP-Examples-Applications/FastWalshTransform/Makefile +++ b/HIP-Examples-Applications/FastWalshTransform/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = FastWalshTransform.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/FloydWarshall/Makefile b/HIP-Examples-Applications/FloydWarshall/Makefile index 30a5f98..4a8f1bc 100644 --- a/HIP-Examples-Applications/FloydWarshall/Makefile +++ b/HIP-Examples-Applications/FloydWarshall/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = FloydWarshall.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/HelloWorld/Makefile b/HIP-Examples-Applications/HelloWorld/Makefile index 216762a..c366ebe 100644 --- a/HIP-Examples-Applications/HelloWorld/Makefile +++ b/HIP-Examples-Applications/HelloWorld/Makefile @@ -1,9 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc +HIPCC=/opt/rocm/bin/hipcc TARGET=hcc @@ -32,5 +27,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/Histogram/Makefile b/HIP-Examples-Applications/Histogram/Makefile index 836b6d0..ce0361d 100644 --- a/HIP-Examples-Applications/Histogram/Makefile +++ b/HIP-Examples-Applications/Histogram/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = Histogram.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/MatrixMultiplication/Makefile b/HIP-Examples-Applications/MatrixMultiplication/Makefile index 8b89dd4..418c447 100644 --- a/HIP-Examples-Applications/MatrixMultiplication/Makefile +++ b/HIP-Examples-Applications/MatrixMultiplication/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = MatrixMultiplication.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/PrefixSum/Makefile b/HIP-Examples-Applications/PrefixSum/Makefile index 2119cb5..4967cea 100644 --- a/HIP-Examples-Applications/PrefixSum/Makefile +++ b/HIP-Examples-Applications/PrefixSum/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = PrefixSum.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/RecursiveGaussian/Makefile b/HIP-Examples-Applications/RecursiveGaussian/Makefile index defa4c9..7a34e3c 100644 --- a/HIP-Examples-Applications/RecursiveGaussian/Makefile +++ b/HIP-Examples-Applications/RecursiveGaussian/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = RecursiveGaussian.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/SimpleConvolution/Makefile b/HIP-Examples-Applications/SimpleConvolution/Makefile index b8099e7..7306a43 100644 --- a/HIP-Examples-Applications/SimpleConvolution/Makefile +++ b/HIP-Examples-Applications/SimpleConvolution/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = SimpleConvolution.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/dct/Makefile b/HIP-Examples-Applications/dct/Makefile index 03a48a4..9375383 100644 --- a/HIP-Examples-Applications/dct/Makefile +++ b/HIP-Examples-Applications/dct/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = dct.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/HIP-Examples-Applications/dwtHaar1D/Makefile b/HIP-Examples-Applications/dwtHaar1D/Makefile index b196ca3..c975a19 100644 --- a/HIP-Examples-Applications/dwtHaar1D/Makefile +++ b/HIP-Examples-Applications/dwtHaar1D/Makefile @@ -1,11 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=../../.. -endif - -HIPCC=$(HIP_PATH)/bin/hipcc - -TARGET=hcc +HIPCC=/opt/rocm/bin/hipcc SOURCES = dwtHaar1D.cpp OBJECTS = $(SOURCES:.cpp=.o) @@ -32,5 +25,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - diff --git a/add4/Makefile b/add4/Makefile index a0c6826..f6fb705 100644 --- a/add4/Makefile +++ b/add4/Makefile @@ -4,11 +4,7 @@ all: gpu-stream-hip common.o: common.cpp common.h Makefile -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=/opt/rocm -endif -HIPCC=$(HIP_PATH)/bin/hipcc +HIPCC=/opt/rocm/bin/hipcc hip-stream.o : hip-stream.cpp $(HIPCC) $(CXXFLAGS) -c $< -o $@ diff --git a/common/hip.all.make b/common/hip.all.make index c6c8e5b..32d5fb7 100644 --- a/common/hip.all.make +++ b/common/hip.all.make @@ -1,2 +1,2 @@ -include $(HIP_PATH)/examples/common/hip.prologue.make -include $(HIP_PATH)/examples/common/hip.epilogue.make +include /opt/rocm/hip/examples/common/hip.prologue.make +include /opt/rocm/hip/examples/common/hip.epilogue.make diff --git a/common/hip.prologue.make b/common/hip.prologue.make index 2ce0db1..041e91b 100644 --- a/common/hip.prologue.make +++ b/common/hip.prologue.make @@ -1,14 +1,11 @@ -# This file is designed to be included at beginning of Makefile, right after setting HIP_PATH. -# Note: define $HIP_PATH before including this file. -# HIP_PATH should be relevant to the parent makefile +# This file is designed to be included at beginning of Makefile. # # It should not include any concrete makefile steps, so "make" still runs the first step in the Makefile. # #------ ##Provide default if not already set: -HIP_PATH?=../.. -HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --compiler) +HIP_PLATFORM=$(shell /opt/rocm/bin/hipconfig --compiler) # CUDA toolkit installation path CUDA_DIR?=/usr/local/cuda-7.5 @@ -25,13 +22,11 @@ endif # nvcc (7.5) can handle openmp though. # use OMPCC and OMP_FLAGS -HIPCC=$(HIP_PATH)/bin/hipcc -HIPLD=$(HIP_PATH)/bin/hipcc +HIPCC=/opt/rocm/bin/hipcc +HIPLD=/opt/rocm/bin/hipcc #-- # Set up automatic make of HIP cpp depenendencies -# TODO - this can be removed when HIP has a proper make structure. -#HIP_SOURCES = $(HIP_PATH)/src/hip_hcc.cpp HIPCC_FLAGS += -I../../common # 'make dbg=1' enables HIPCC debugging and no opt switch. @@ -55,15 +50,11 @@ OMP_FLAGS = $(HIPCC_FLAGS) HIP_DEPS = else ifeq ($(HIP_PLATFORM), hcc) -#HIP_DEPS = $(HIP_SOURCES:.cpp=.o) OMPCC = gcc OMP_FLAGS += -fopenmp # Add dependencies to make hip_cc.o and other support files. -HSA_PATH ?= /opt/hsa -#HIP_SOURCES = $(HIP_PATH)/src/hip_hcc.cpp #HIP_DEPS = $(HIP_SOURCES:.cpp=.o) -#$(HIP_DEPS): HIPCC_FLAGS += -I$(HSA_PATH)/include %.o:: %.cpp $(HIPCC) $(HIPCC_FLAGS) $< -c -o $@ endif @@ -85,7 +76,7 @@ endif # $(HIPIFY) $< > $@ -KCFLAGS += $(OPT) -I$(HSA_PATH)/include -I$(HIP_PATH)/include -I$(GRID_LAUNCH_PATH) -I$(AM_PATH)/include +KCFLAGS += $(OPT) -I/opt/rocm/include -I/opt/rocm/hip/include -I$(GRID_LAUNCH_PATH) -I$(AM_PATH)/include %.o:: %.cpp $(HIPCC) $(HIPCC_FLAGS) $< -c -o $@ diff --git a/cuda-stream/Makefile b/cuda-stream/Makefile index fceec7d..170f4bc 100644 --- a/cuda-stream/Makefile +++ b/cuda-stream/Makefile @@ -1,8 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=/opt/rocm -endif -HIPCC=$(HIP_PATH)/bin/hipcc +HIPCC=/opt/rocm/bin/hipcc CXXFLAGS += -std=c++11 -O3 diff --git a/gpu-burn/Makefile b/gpu-burn/Makefile index 1419588..6f1c4a6 100644 --- a/gpu-burn/Makefile +++ b/gpu-burn/Makefile @@ -1,15 +1,8 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=/opt/rocm -endif - - -HCC_PATH ?= /opt/rocm/hcc -HIP_PLATFORM = $(shell $(HIP_PATH)/bin/hipconfig --platform) -HIP_INCLUDE = -I${HIP_PATH}/include -I${HCC_PATH}/include +HIP_PLATFORM = $(shell /opt/rocm/bin/hipconfig --platform) +HIP_INCLUDE = -I/opt/rocm/include BUILD_DIR ?= build -HIPCC = ${HIP_PATH}/bin/hipcc +HIPCC = /opt/rocm/bin/hipcc CPPFLAGS = -O3 LDFLAGS = -lm -lpthread diff --git a/mini-nbody/hip/HIP-nbody-block.sh b/mini-nbody/hip/HIP-nbody-block.sh index 65640ab..8b5c3d1 100755 --- a/mini-nbody/hip/HIP-nbody-block.sh +++ b/mini-nbody/hip/HIP-nbody-block.sh @@ -10,20 +10,8 @@ then rm nbody-block fi -if [ -z "$HIP_PATH" ] -then - -if [ -d /opt/rocm/hip ] -then - HIP_PATH=/opt/rocm/hip -else - HIP_PATH=/opt/rocm -fi - -fi - echo hipcc -I../ -DSHMOO nbody-block.cpp -o nbody-block -$HIP_PATH/bin/hipcc -I../ -DSHMOO nbody-block.cpp -o nbody-block +/opt/rocm/bin/hipcc -I../ -DSHMOO nbody-block.cpp -o nbody-block #To print our more details, remove DSHMOO flag #hipcc -I../ nbody-block.cpp -o nbody-block @@ -37,4 +25,3 @@ do ./$EXE $K K=$(($K*2)) done - diff --git a/mini-nbody/hip/HIP-nbody-orig.sh b/mini-nbody/hip/HIP-nbody-orig.sh index 5cdfdca..4345423 100755 --- a/mini-nbody/hip/HIP-nbody-orig.sh +++ b/mini-nbody/hip/HIP-nbody-orig.sh @@ -7,20 +7,8 @@ then rm nbody-orig fi -if [ -z "$HIP_PATH" ] -then - -if [ -d /opt/rocm/hip ] -then - HIP_PATH=/opt/rocm/hip -else - HIP_PATH=/opt/rocm -fi - -fi - echo hipcc -I../ -DSHMOO nbody-orig.cpp -o nbody-orig -$HIP_PATH/bin/hipcc -I../ -DSHMOO nbody-orig.cpp -o nbody-orig +/opt/rocm/bin/hipcc -I../ -DSHMOO nbody-orig.cpp -o nbody-orig #To print our more details, remove flag #hipcc -I../ nbody-orig.cpp -o nbody-orig @@ -35,4 +23,3 @@ do ./$EXE $K K=$(($K*2)) done - diff --git a/mini-nbody/hip/HIP-nbody-soa.sh b/mini-nbody/hip/HIP-nbody-soa.sh index e7861fd..1b6f4f2 100755 --- a/mini-nbody/hip/HIP-nbody-soa.sh +++ b/mini-nbody/hip/HIP-nbody-soa.sh @@ -10,20 +10,8 @@ then rm nbody-soa fi -if [ -z "$HIP_PATH" ] -then - -if [ -d /opt/rocm/hip ] -then - HIP_PATH=/opt/rocm/hip -else - HIP_PATH=/opt/rocm -fi - -fi - echo hipcc -I../ -DSHMOO nbody-soa.cpp -o nbody-soa -$HIP_PATH/bin/hipcc -I../ -DSHMOO nbody-soa.cpp -o nbody-soa +/opt/rocm/bin/hipcc -I../ -DSHMOO nbody-soa.cpp -o nbody-soa #To print our more details, remove DSHMOO flag #hipcc -I../ nbody-soa.cpp -o nbody-soa @@ -37,4 +25,3 @@ do ./$EXE $K K=$(($K*2)) done - diff --git a/openmp-helloworld/Makefile b/openmp-helloworld/Makefile index f048d26..325b4be 100644 --- a/openmp-helloworld/Makefile +++ b/openmp-helloworld/Makefile @@ -1,9 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=/opt/rocm -endif - -HIPCC=$(HIP_PATH)/bin/hipcc +HIPCC=/opt/rocm/bin/hipcc CXX=$(HIPCC) CXXFLAGS =-fopenmp diff --git a/reduction/Makefile b/reduction/Makefile index d040156..b66d71b 100644 --- a/reduction/Makefile +++ b/reduction/Makefile @@ -1,8 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=/opt/rocm -endif -HIPCC=$(HIP_PATH)/bin/hipcc +HIPCC=/opt/rocm/bin/hipcc CXXFLAGS += -std=c++11 -O3 diff --git a/rtm8/Makefile b/rtm8/Makefile index f0d89ab..fba11d6 100644 --- a/rtm8/Makefile +++ b/rtm8/Makefile @@ -1,8 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=/opt/rocm -endif -HIPCC=$(HIP_PATH)/bin/hipcc +HIPCC=/opt/rocm/bin/hipcc CXXFLAGS += -std=c++11 -O3 diff --git a/rtm8/build_hip.sh b/rtm8/build_hip.sh index 4ccaa42..86f4871 100755 --- a/rtm8/build_hip.sh +++ b/rtm8/build_hip.sh @@ -1,24 +1,10 @@ #!/bin/bash -if [ -z "$HIP_PATH" ] -then - -if [ -d /opt/rocm/hip ] -then - HIP_PATH=/opt/rocm/hip -else - HIP_PATH=/opt/rocm -fi - -fi - -echo "Using HIP_PATH=$HIP_PATH" - if [ -f "rtm8_hip" ] then rm rtm8_hip fi echo "hipcc -std=c++11 -O3 -o rtm8_hip rtm8.cpp" -$HIP_PATH/bin/hipcc -std=c++11 -O3 -o rtm8_hip rtm8.cpp +/opt/rocm/bin/hipcc -std=c++11 -O3 -o rtm8_hip rtm8.cpp diff --git a/strided-access/Makefile b/strided-access/Makefile index 46fe9b8..3610177 100644 --- a/strided-access/Makefile +++ b/strided-access/Makefile @@ -1,8 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=/opt/rocm -endif -HIPCC=$(HIP_PATH)/bin/hipcc +HIPCC=/opt/rocm/bin/hipcc CXXFLAGS += -std=c++11 -O3 diff --git a/vectorAdd/Makefile b/vectorAdd/Makefile index 9ec3970..d650f3b 100644 --- a/vectorAdd/Makefile +++ b/vectorAdd/Makefile @@ -1,9 +1,4 @@ -HIP_PATH?= $(wildcard /opt/rocm/hip) -ifeq (,$(HIP_PATH)) - HIP_PATH=/opt/rocm -endif - -HIPCC=$(HIP_PATH)/bin/hipcc +HIPCC=/opt/rocm/bin/hipcc TARGET=hcc @@ -33,6 +28,3 @@ test: $(EXECUTABLE) clean: rm -f $(EXECUTABLE) rm -f $(OBJECTS) - rm -f $(HIP_PATH)/src/*.o - -