Unverified Commit 83fc9b36 authored by gilbertlee-amd's avatar gilbertlee-amd Committed by GitHub
Browse files

Fixing USE_INTERACTIVE bug (#142)

parent 9f68d14d
......@@ -3,6 +3,10 @@
Documentation for TransferBench is available at
[https://rocm.docs.amd.com/projects/TransferBench](https://rocm.docs.amd.com/projects/TransferBench).
## v1.56
### Fixed
- Fixed bug when using interactive mode. Interactive mode now starts prior to all warmup iterations
## v1.55
### Fixed
- Fixed missing header error when compiling on CentOS
......
......@@ -7,7 +7,7 @@ else()
endif()
cmake_minimum_required(VERSION 3.5)
project(TransferBench VERSION 1.55.0 LANGUAGES CXX)
project(TransferBench VERSION 1.56.0 LANGUAGES CXX)
# Default GPU architectures to build
#==================================================================================================
......
......@@ -18,7 +18,7 @@ endif
CXXFLAGS = -I$(ROCM_PATH)/include -lnuma -L$(ROCM_PATH)/lib -lhsa-runtime64
NVFLAGS = -x cu -lnuma -arch=native
COMMON_FLAGS = -g -O3 --std=c++20 -I./src/header -I./src/client -I./src/client/Presets
COMMON_FLAGS = -O3 --std=c++20 -I./src/header -I./src/client -I./src/client/Presets
LDFLAGS += -lpthread
all: $(EXE)
......
......@@ -23,7 +23,7 @@ THE SOFTWARE.
#pragma once
// TransferBench client version
#define CLIENT_VERSION "1.55.00"
#define CLIENT_VERSION "1.56.00"
#include "TransferBench.hpp"
#include "EnvVars.hpp"
......
......@@ -49,7 +49,7 @@ namespace TransferBench
using std::set;
using std::vector;
constexpr char VERSION[] = "1.54";
constexpr char VERSION[] = "1.56";
/**
* Enumeration of supported Executor types
......@@ -2226,6 +2226,26 @@ namespace {
}
}
// Pause before starting when running in iteractive mode
if (cfg.general.useInteractive) {
printf("Memory prepared:\n");
for (int i = 0; i < transfers.size(); i++) {
ExeInfo const& exeInfo = executorMap[transfers[i].exeDevice];
printf("Transfer %03d:\n", i);
for (int iSrc = 0; iSrc < transfers[i].srcs.size(); ++iSrc)
printf(" SRC %0d: %p\n", iSrc, transferResources[i]->srcMem[iSrc]);
for (int iDst = 0; iDst < transfers[i].dsts.size(); ++iDst)
printf(" DST %0d: %p\n", iDst, transferResources[i]->dstMem[iDst]);
}
printf("Hit <Enter> to continue: ");
if (scanf("%*c") != 0) {
printf("[ERROR] Unexpected input\n");
exit(1);
}
printf("\n");
}
// Perform iterations
size_t numTimedIterations = 0;
double totalCpuTimeSec = 0.0;
......@@ -2234,25 +2254,6 @@ namespace {
if (cfg.general.numIterations > 0 && iteration >= cfg.general.numIterations) break;
if (cfg.general.numIterations < 0 && totalCpuTimeSec > -cfg.general.numIterations) break;
// Pause before starting first timed iteration in iteractive mode
if (cfg.general.useInteractive && iteration == 0) {
printf("Memory prepared:\n");
for (int i = 0; i < transfers.size(); i++) {
ExeInfo const& exeInfo = executorMap[transfers[i].exeDevice];
printf("Transfer %03d:\n", i);
for (int iSrc = 0; iSrc < transfers[i].srcs.size(); ++iSrc)
printf(" SRC %0d: %p\n", iSrc, exeInfo.resources[i].srcMem[iSrc]);
for (int iDst = 0; iDst < transfers[i].dsts.size(); ++iDst)
printf(" DST %0d: %p\n", iDst, exeInfo.resources[i].dstMem[iDst]);
}
printf("Hit <Enter> to continue: ");
if (scanf("%*c") != 0) {
printf("[ERROR] Unexpected input\n");
exit(1);
}
printf("\n");
}
// Start CPU timing for this iteration
auto cpuStart = std::chrono::high_resolution_clock::now();
......
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