Commit 3282bbb5 authored by PedramAlizadeh's avatar PedramAlizadeh
Browse files

Added pthread linking

parent 5b686add
# Changelog for TransferBench
## v1.14
### Added
- Added documentation
- Added pthread linking in src/Makefile and CMakeLists.txt
## v1.13
### Added
- Added support for cmake
- Added documentation
### Changed
- Converted to the Pitchfork layout standard
......
......@@ -6,9 +6,9 @@ else()
endif()
cmake_minimum_required(VERSION 3.5)
project(TransferBench CXX)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -L${ROCM_PATH}/hsa/lib")
include_directories(${ROCM_PATH}/hsa/include)
link_libraries(numa hsa-runtime64)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -L${ROCM_PATH}/lib")
include_directories(${ROCM_PATH}/include)
link_libraries(numa hsa-runtime64 pthread)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ..)
add_executable(TransferBench src/TransferBench.cpp)
target_include_directories(TransferBench PRIVATE src/include)
......
......@@ -8,3 +8,4 @@ The user has control over the SRC and DST memory locations by indicating memory
The executor of the transfer can also be specified by the user. The options are CPU, kernel-based GPU, and SDMA-based GPU (DMA) executors. TransferBench also provides the option to choose the number of sub-executors. In case of a CPU executor this argument specifies the number of CPU threads, while for a GPU executor it defines the number of compute units (CU). If DMA is specified as the executor, the sub-executor argument determines the number of streams to be used.
For more examples, please refer to the example.cfg file in the examples folder.
......@@ -3,12 +3,12 @@ ROCM_PATH ?= /opt/rocm
HIPCC=$(ROCM_PATH)/bin/hipcc
EXE=TransferBench
CXXFLAGS = -O3 -I. -Iinclude -I$(ROCM_PATH)/hsa/include -lnuma -L$(ROCM_PATH)/hsa/lib -lhsa-runtime64
CXXFLAGS = -O3 -I. -Iinclude -I$(ROCM_PATH)/include -lnuma -L$(ROCM_PATH)/lib -lhsa-runtime64
LDFLAGS += -lpthread
all: $(EXE)
$(EXE): $(EXE).cpp $(shell find -regex ".*\.\hpp")
$(HIPCC) $(CXXFLAGS) $< -o ../$@
$(HIPCC) $(CXXFLAGS) $< -o ../$@ $(LDFLAGS)
clean:
rm -f *.o ../$(EXE)
......@@ -28,7 +28,7 @@ THE SOFTWARE.
#include <time.h>
#include "Kernels.hpp"
#define TB_VERSION "1.13"
#define TB_VERSION "1.14"
extern char const MemTypeStr[];
extern char const ExeTypeStr[];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment