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
5901ce0e
Unverified
Commit
5901ce0e
authored
Mar 30, 2023
by
gilbertlee-amd
Committed by
GitHub
Mar 30, 2023
Browse files
Adding direct destination mem validation, env var refactor (#19)
parent
e6f64e97
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
193 deletions
+109
-193
CHANGELOG.md
CHANGELOG.md
+8
-0
src/TransferBench.cpp
src/TransferBench.cpp
+15
-3
src/include/EnvVars.hpp
src/include/EnvVars.hpp
+86
-190
No files found.
CHANGELOG.md
View file @
5901ce0e
# Changelog for TransferBench
## v1.18
### Added
-
Adding ability to validate GPU destination memory directly without going through CPU staging buffer (VALIDATE_DIRECT)
-
NOTE: This will only work on AMD devices with large-bar access enable and may slow things down considerably
### Changed
-
Refactored how environment variables are displayed
-
Mismatch stops after first detected error within an array instead of list all mismatched elements
## v1.17
### Added
-
Allow switch to GFX kernel for source array initialization (USE_PREP_KERNEL)
...
...
src/TransferBench.cpp
View file @
5901ce0e
...
...
@@ -1215,7 +1215,17 @@ void RunPeerToPeerBenchmarks(EnvVars const& ev, size_t N)
ev
.
useRemoteRead
?
"Local"
:
"Remote"
,
ev
.
useDmaCopy
?
"DMA"
:
"GFX"
);
printf
(
"%10s"
,
"SRC
\\
DST"
);
if
(
isBidirectional
)
{
printf
(
"%12s"
,
"SRC
\\
DST"
);
}
else
{
if
(
ev
.
useRemoteRead
)
printf
(
"%12s"
,
"SRC
\\
EXE+DST"
);
else
printf
(
"%12s"
,
"SRC+EXE
\\
DST"
);
}
for
(
int
i
=
0
;
i
<
numCpus
;
i
++
)
printf
(
"%7s %02d"
,
"CPU"
,
i
);
for
(
int
i
=
0
;
i
<
numGpus
;
i
++
)
printf
(
"%7s %02d"
,
"GPU"
,
i
);
printf
(
"
\n
"
);
...
...
@@ -1228,7 +1238,7 @@ void RunPeerToPeerBenchmarks(EnvVars const& ev, size_t N)
int
const
srcIndex
=
(
srcType
==
MEM_CPU
?
src
:
src
-
numCpus
);
if
(
!
ev
.
outputToCsv
)
printf
(
"%
7
s %02d"
,
(
srcType
==
MEM_CPU
)
?
"CPU"
:
"GPU"
,
srcIndex
);
printf
(
"%
9
s %02d"
,
(
srcType
==
MEM_CPU
)
?
"CPU"
:
"GPU"
,
srcIndex
);
for
(
int
dst
=
0
;
dst
<
numDevices
;
dst
++
)
{
...
...
@@ -1482,7 +1492,7 @@ void Transfer::ValidateDst(EnvVars const& ev)
for
(
int
dstIdx
=
0
;
dstIdx
<
this
->
numDsts
;
++
dstIdx
)
{
float
*
output
;
if
(
IsCpuType
(
this
->
dstType
[
dstIdx
]))
if
(
IsCpuType
(
this
->
dstType
[
dstIdx
])
||
ev
.
validateDirect
)
{
output
=
this
->
dstMem
[
dstIdx
]
+
initOffset
;
}
...
...
@@ -1525,6 +1535,8 @@ void Transfer::ValidateDst(EnvVars const& ev)
this
->
DstToStr
().
c_str
());
if
(
!
ev
.
continueOnError
)
exit
(
1
);
else
break
;
}
}
}
...
...
src/include/EnvVars.hpp
View file @
5901ce0e
This diff is collapsed.
Click to expand it.
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