Skip to content

Commit

Permalink
Merge pull request #10 from ROCmSoftwarePlatform/amd_readme_2
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
Mayank Daga authored May 2, 2018
2 parents 91916d3 + 4a3b479 commit eb2adff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,15 @@ 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 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:

```
Expand Down
24 changes: 9 additions & 15 deletions code/amd/Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit eb2adff

Please sign in to comment.