From b107243421e6f07cb9673d393cce671891d78cf5 Mon Sep 17 00:00:00 2001 From: Chao Liu Date: Thu, 19 Apr 2018 15:23:33 -0500 Subject: [PATCH 1/2] update readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 25539c9..d3b833c 100644 --- a/README.md +++ b/README.md @@ -858,6 +858,14 @@ At present only `fp32 train` benchmarks are enabled. The `Makefile` in `code/amd` is for an AMD `gfx900` GPU. To benchmark other generations, please modify the `Makefile` accordingly. +Setting your enviroment variables before compiling/running: + +``` +export CPATH=PATH_TO_MIOPEN/include:PATH_TO_MIOPENGEMM/include/miopengemm:/opt/rocm/include +export LD_LIBRARY_PATH=PATH_TO_MIOPEN/lib:PATH_TO_MIOPENGEMM/lib:/opt/rocm/lib +export LIBRARY_PATH=PATH_TO_MIOPEN/lib:PATH_TO_MIOPENGEMM/lib:/opt/rocm/lib +``` + To compile the convolution, RNNs and GEMM benchmarks, run: ``` From 4a3b479ee63990fc172abd347a4d678574d93cc8 Mon Sep 17 00:00:00 2001 From: Chao Liu Date: Fri, 20 Apr 2018 18:31:59 -0500 Subject: [PATCH 2/2] update README.md for AMD build --- README.md | 7 ++++--- code/amd/Makefile | 24 +++++++++--------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index d3b833c..81a8762 100644 --- a/README.md +++ b/README.md @@ -861,9 +861,10 @@ The `Makefile` in `code/amd` is for an AMD `gfx900` GPU. To benchmark other gene Setting your enviroment variables before compiling/running: ``` -export CPATH=PATH_TO_MIOPEN/include:PATH_TO_MIOPENGEMM/include/miopengemm:/opt/rocm/include -export LD_LIBRARY_PATH=PATH_TO_MIOPEN/lib:PATH_TO_MIOPENGEMM/lib:/opt/rocm/lib -export LIBRARY_PATH=PATH_TO_MIOPEN/lib:PATH_TO_MIOPENGEMM/lib:/opt/rocm/lib +export PATH=PATH_TO_ROCM/bin:$PATH +export CPATH=PATH_TO_MIOPEN/include:$CPATH +export LIBRARY_PATH=PATH_TO_MIOPEN/lib:$LIBRARY_PATH +export LD_LIBRARY_PATH=PATH_TO_MIOPEN/lib:PATH_TO_MIOPENGEMM/lib:$LD_LIBRARY_PATH ``` To compile the convolution, RNNs and GEMM benchmarks, run: diff --git a/code/amd/Makefile b/code/amd/Makefile index 39a5bbd..dddaeac 100644 --- a/code/amd/Makefile +++ b/code/amd/Makefile @@ -1,41 +1,35 @@ SOURCE_DIR?=. - -HIPCC=/opt/rocm/bin/hipcc -ROCM_PATH=/opt/rocm - BIN_DIR?=bin MKDIR=mkdir -p +#hipcc +HIPCC=hipcc + #BLAS ROCBLAS_LIB=rocblas #CONV -CONV_LIBRARY?=MIOpen -CONV_PATH?=$ -.PHONY=all conv clean +MIOPEN_LIB?=MIOpen -INC_DIR=${SOURCE_DIR}/../kernels +#DeepBench +DEEPBENCH_INC=${SOURCE_DIR}/../kernels all: conv rnn gemm #OPT=-g -O0 -fsanitize=undefined -fno-omit-frame-pointer OPT=-O3 -TARGETS= conv: $(MKDIR) $(BIN_DIR) - $(HIPCC) ${SOURCE_DIR}/conv_bench_rocm.cpp -o $(BIN_DIR)/conv_bench -I$(ROCM_PATH)/include -I$(INC_DIR) -l$(CONV_LIBRARY) $(OPT) -std=c++11 --amdgpu-target=gfx900 + $(HIPCC) ${SOURCE_DIR}/conv_bench_rocm.cpp -o $(BIN_DIR)/conv_bench -I$(DEEPBENCH_INC) -l$(MIOPEN_LIB) $(OPT) -std=c++11 --amdgpu-target=gfx900 rnn: $(MKDIR) $(BIN_DIR) - $(HIPCC) ${SOURCE_DIR}/rnn_bench_rocm.cpp -o $(BIN_DIR)/rnn_bench -I$(ROCM_PATH)/include -I$(INC_DIR) -l$(CONV_LIBRARY) $(OPT) -std=c++11 --amdgpu-target=gfx900 + $(HIPCC) ${SOURCE_DIR}/rnn_bench_rocm.cpp -o $(BIN_DIR)/rnn_bench -I$(DEEPBENCH_INC) -l$(MIOPEN_LIB) $(OPT) -std=c++11 --amdgpu-target=gfx900 gemm: $(MKDIR) $(BIN_DIR) - $(HIPCC) ${SOURCE_DIR}/gemm_bench.cpp -o $(BIN_DIR)/gemm_bench -I$(ROCM_PATH)/include -I$(INC_DIR) -l$(ROCBLAS_LIB) $(OPT) -std=c++11 --amdgpu-target=gfx900 + $(HIPCC) ${SOURCE_DIR}/gemm_bench.cpp -o $(BIN_DIR)/gemm_bench -I$(DEEPBENCH_INC) -l$(ROCBLAS_LIB) $(OPT) -std=c++11 --amdgpu-target=gfx900 clean: rm -rf $(BIN_DIR) - - -rebuild: clean all