Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
one
TransferBench
Commits
83fc9b36
Unverified
Commit
83fc9b36
authored
Nov 26, 2024
by
gilbertlee-amd
Committed by
GitHub
Nov 26, 2024
Browse files
Fixing USE_INTERACTIVE bug (#142)
parent
9f68d14d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
23 deletions
+28
-23
CHANGELOG.md
CHANGELOG.md
+4
-0
CMakeLists.txt
CMakeLists.txt
+1
-1
Makefile
Makefile
+1
-1
src/client/Client.hpp
src/client/Client.hpp
+1
-1
src/header/TransferBench.hpp
src/header/TransferBench.hpp
+21
-20
No files found.
CHANGELOG.md
View file @
83fc9b36
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
Documentation for TransferBench is available at
Documentation for TransferBench is available at
[
https://rocm.docs.amd.com/projects/TransferBench
](
https://rocm.docs.amd.com/projects/TransferBench
)
.
[
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
## v1.55
### Fixed
### Fixed
-
Fixed missing header error when compiling on CentOS
-
Fixed missing header error when compiling on CentOS
...
...
CMakeLists.txt
View file @
83fc9b36
...
@@ -7,7 +7,7 @@ else()
...
@@ -7,7 +7,7 @@ else()
endif
()
endif
()
cmake_minimum_required
(
VERSION 3.5
)
cmake_minimum_required
(
VERSION 3.5
)
project
(
TransferBench VERSION 1.5
5
.0 LANGUAGES CXX
)
project
(
TransferBench VERSION 1.5
6
.0 LANGUAGES CXX
)
# Default GPU architectures to build
# Default GPU architectures to build
#==================================================================================================
#==================================================================================================
...
...
Makefile
View file @
83fc9b36
...
@@ -18,7 +18,7 @@ endif
...
@@ -18,7 +18,7 @@ endif
CXXFLAGS
=
-I
$(ROCM_PATH)
/include
-lnuma
-L
$(ROCM_PATH)
/lib
-lhsa-runtime64
CXXFLAGS
=
-I
$(ROCM_PATH)
/include
-lnuma
-L
$(ROCM_PATH)
/lib
-lhsa-runtime64
NVFLAGS
=
-x
cu
-lnuma
-arch
=
native
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
LDFLAGS
+=
-lpthread
all
:
$(EXE)
all
:
$(EXE)
...
...
src/client/Client.hpp
View file @
83fc9b36
...
@@ -23,7 +23,7 @@ THE SOFTWARE.
...
@@ -23,7 +23,7 @@ THE SOFTWARE.
#pragma once
#pragma once
// TransferBench client version
// TransferBench client version
#define CLIENT_VERSION "1.5
5
.00"
#define CLIENT_VERSION "1.5
6
.00"
#include "TransferBench.hpp"
#include "TransferBench.hpp"
#include "EnvVars.hpp"
#include "EnvVars.hpp"
...
...
src/header/TransferBench.hpp
View file @
83fc9b36
...
@@ -49,7 +49,7 @@ namespace TransferBench
...
@@ -49,7 +49,7 @@ namespace TransferBench
using
std
::
set
;
using
std
::
set
;
using
std
::
vector
;
using
std
::
vector
;
constexpr
char
VERSION
[]
=
"1.5
4
"
;
constexpr
char
VERSION
[]
=
"1.5
6
"
;
/**
/**
* Enumeration of supported Executor types
* Enumeration of supported Executor types
...
@@ -2226,6 +2226,26 @@ namespace {
...
@@ -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
// Perform iterations
size_t
numTimedIterations
=
0
;
size_t
numTimedIterations
=
0
;
double
totalCpuTimeSec
=
0.0
;
double
totalCpuTimeSec
=
0.0
;
...
@@ -2234,25 +2254,6 @@ namespace {
...
@@ -2234,25 +2254,6 @@ namespace {
if
(
cfg
.
general
.
numIterations
>
0
&&
iteration
>=
cfg
.
general
.
numIterations
)
break
;
if
(
cfg
.
general
.
numIterations
>
0
&&
iteration
>=
cfg
.
general
.
numIterations
)
break
;
if
(
cfg
.
general
.
numIterations
<
0
&&
totalCpuTimeSec
>
-
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
// Start CPU timing for this iteration
auto
cpuStart
=
std
::
chrono
::
high_resolution_clock
::
now
();
auto
cpuStart
=
std
::
chrono
::
high_resolution_clock
::
now
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment