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
1d34a197
Unverified
Commit
1d34a197
authored
Oct 30, 2023
by
gilbertlee-amd
Committed by
GitHub
Oct 30, 2023
Browse files
Adding ALWAYS_VALIDATE to allow per-iteration validation (#61)
parent
9c2ecae2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
CHANGELOG.md
CHANGELOG.md
+4
-0
src/TransferBench.cpp
src/TransferBench.cpp
+9
-1
src/include/EnvVars.hpp
src/include/EnvVars.hpp
+6
-2
No files found.
CHANGELOG.md
View file @
1d34a197
# Changelog for TransferBench
## v1.33
### Added
-
Adding ALWAYS_VALIDATE env var to allow for validation after every iteration instead of just once at end of all iterations
## v1.32
### Modified
-
Increased line limit from 2048 to 32768
...
...
src/TransferBench.cpp
View file @
1d34a197
...
...
@@ -472,6 +472,15 @@ void ExecuteTransfers(EnvVars const& ev,
auto
cpuDelta
=
std
::
chrono
::
high_resolution_clock
::
now
()
-
cpuStart
;
double
deltaSec
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
duration
<
double
>>
(
cpuDelta
).
count
();
if
(
ev
.
alwaysValidate
)
{
for
(
auto
transferPair
:
transferList
)
{
Transfer
*
transfer
=
transferPair
.
second
;
transfer
->
ValidateDst
(
ev
);
}
}
if
(
iteration
>=
0
)
{
++
numTimedIterations
;
...
...
@@ -494,7 +503,6 @@ void ExecuteTransfers(EnvVars const& ev,
// Validate that each transfer has transferred correctly
size_t
totalBytesTransferred
=
0
;
int
const
numTransfers
=
transferList
.
size
();
for
(
auto
transferPair
:
transferList
)
{
Transfer
*
transfer
=
transferPair
.
second
;
...
...
src/include/EnvVars.hpp
View file @
1d34a197
...
...
@@ -29,7 +29,7 @@ THE SOFTWARE.
#include "Compatibility.hpp"
#include "Kernels.hpp"
#define TB_VERSION "1.3
2
"
#define TB_VERSION "1.3
3
"
extern
char
const
MemTypeStr
[];
extern
char
const
ExeTypeStr
[];
...
...
@@ -72,6 +72,7 @@ public:
int
const
DEFAULT_SWEEP_TIME_LIMIT
=
0
;
// Environment variables
int
alwaysValidate
;
// Validate after each iteration instead of once after all iterations
int
blockSize
;
// Size of each threadblock (must be multiple of 64)
int
blockBytes
;
// Each CU, except the last, gets a multiple of this many bytes to copy
int
blockOrder
;
// How blocks are ordered in single-stream mode (0=Sequential, 1=Interleaved, 2=Random)
...
...
@@ -166,6 +167,7 @@ public:
else
if
(
archName
==
"gfx940"
)
defaultGpuKernel
=
6
;
else
if
(
archName
==
"gfx941"
)
defaultGpuKernel
=
6
;
alwaysValidate
=
GetEnvVar
(
"ALWAYS_VALIDATE"
,
0
);
blockSize
=
GetEnvVar
(
"BLOCK_SIZE"
,
256
);
blockBytes
=
GetEnvVar
(
"BLOCK_BYTES"
,
256
);
blockOrder
=
GetEnvVar
(
"BLOCK_ORDER"
,
0
);
...
...
@@ -479,6 +481,7 @@ public:
{
printf
(
"Environment variables:
\n
"
);
printf
(
"======================
\n
"
);
printf
(
" ALWAYS_VALIDATE - Validate after each iteration instead of once after all iterations
\n
"
);
printf
(
" BLOCK_SIZE - # of threads per threadblock (Must be multiple of 64). Defaults to 256
\n
"
);
printf
(
" BLOCK_BYTES - Each CU (except the last) receives a multiple of BLOCK_BYTES to copy
\n
"
);
printf
(
" BLOCK_ORDER - Threadblock ordering in single-stream mode (0=Serial, 1=Interleaved, 2=Random)
\n
"
);
...
...
@@ -521,7 +524,8 @@ public:
else
if
(
!
hideEnv
)
printf
(
"EnvVar,Value,Description,(TransferBench v%s)
\n
"
,
TB_VERSION
);
if
(
hideEnv
)
return
;
PRINT_EV
(
"ALWAYS_VALIDATE"
,
alwaysValidate
,
std
::
string
(
"Validating after "
)
+
(
alwaysValidate
?
"each iteration"
:
"all iterations"
));
PRINT_EV
(
"BLOCK_SIZE"
,
blockSize
,
std
::
string
(
"Threadblock size of "
+
std
::
to_string
(
blockSize
)));
PRINT_EV
(
"BLOCK_BYTES"
,
blockBytes
,
...
...
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