Skip to content

Commit a438ef9

Browse files
Merge pull request ROCm#11 from PedramAlizadeh/pitchfork_layout
converting to Pitchfork layout standard
2 parents c72a105 + 0b2ba90 commit a438ef9

File tree

11 files changed

+55
-14
lines changed

11 files changed

+55
-14
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog for TransferBench
22

3+
## v1.13
4+
### Added
5+
- Added support for cmake
6+
7+
### Changed
8+
- Converted to the Pitchfork layout standard
9+
310
## v1.12
411
### Added
512
- Added support for TransferBench on NVIDIA platforms (via HIP_PLATFORM=nvidia)

CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
2+
if (DEFINED ENV{ROCM_PATH})
3+
set(ROCM_PATH "$ENV{ROCM_PATH}" CACHE STRING "ROCm install directory")
4+
else()
5+
set(ROCM_PATH "/opt/rocm" CACHE STRING "ROCm install directory")
6+
endif()
7+
cmake_minimum_required(VERSION 3.5)
8+
project(TransferBench CXX)
9+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -L${ROCM_PATH}/hsa/lib")
10+
include_directories(${ROCM_PATH}/hsa/include)
11+
link_libraries(numa hsa-runtime64)
12+
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ..)
13+
add_executable(TransferBench src/TransferBench.cpp)
14+
target_include_directories(TransferBench PRIVATE src/include)
15+

Makefile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
# Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All rights reserved.
2-
ROCM_PATH ?= /opt/rocm
3-
HIPCC=$(ROCM_PATH)/bin/hipcc
1+
#
2+
# Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
3+
#
44

5-
EXE=TransferBench
6-
CXXFLAGS = -O3 -I. -I$(ROCM_PATH)/hsa/include -lnuma -L$(ROCM_PATH)/hsa/lib -lhsa-runtime64
7-
8-
all: $(EXE)
9-
10-
$(EXE): $(EXE).cpp $(shell find -regex ".*\.\hpp")
11-
$(HIPCC) $(CXXFLAGS) $< -o $@
5+
all:
6+
cd src ; make
127

138
clean:
14-
rm -f *.o $(EXE)
9+
cd src ; make clean

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,18 @@ TransferBench is a simple utility capable of benchmarking simultaneous copies be
88
2. libnuma installed on system
99

1010
## Building
11-
To build TransferBench:
12-
* `make`
11+
To build TransferBench using Makefile:
12+
```shell
13+
$ make
14+
```
15+
16+
To build TransferBench using cmake:
17+
```shell
18+
$ mkdir build
19+
$ cd build
20+
$ CXX=/opt/rocm/bin/hipcc cmake ..
21+
$ make
22+
```
1323

1424
If ROCm is installed in a folder other than `/opt/rocm/`, set ROCM_PATH appropriately
1525

File renamed without changes.

src/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All rights reserved.
2+
ROCM_PATH ?= /opt/rocm
3+
HIPCC=$(ROCM_PATH)/bin/hipcc
4+
5+
EXE=TransferBench
6+
CXXFLAGS = -O3 -I. -Iinclude -I$(ROCM_PATH)/hsa/include -lnuma -L$(ROCM_PATH)/hsa/lib -lhsa-runtime64
7+
8+
all: $(EXE)
9+
10+
$(EXE): $(EXE).cpp $(shell find -regex ".*\.\hpp")
11+
$(HIPCC) $(CXXFLAGS) $< -o ../$@
12+
13+
clean:
14+
rm -f *.o ../$(EXE)
File renamed without changes.

EnvVars.hpp renamed to src/include/EnvVars.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ THE SOFTWARE.
2828
#include <time.h>
2929
#include "Kernels.hpp"
3030

31-
#define TB_VERSION "1.12"
31+
#define TB_VERSION "1.13"
3232

3333
extern char const MemTypeStr[];
3434
extern char const ExeTypeStr[];
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)