Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210010058
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210010058
Commits
621178b7
Commit
621178b7
authored
3 years ago
by
黄一智
Browse files
Options
Downloads
Patches
Plain Diff
[why] add rocm_bw_test and hiptest
[who] huangyizhi
parent
60bb14ac
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test.sh
+29
-3
29 additions, 3 deletions
test.sh
with
29 additions
and
3 deletions
test.sh
+
29
−
3
View file @
621178b7
...
...
@@ -6,10 +6,11 @@
PROJECT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
)
"
kfdtest_dir
=
${
PROJECT_DIR
}
/ROCm/ROCT-Thunk-Interface/tests/kfdtest
rocm_smi_test_dir
=
${
PROJECT_DIR
}
/ROCm/rocm_smi_lib/tests/rocm_smi_test
hip
test_dir
=
${
PROJECT_DIR
}
/
tests/hip
test
cuda
test_dir
=
${
PROJECT_DIR
}
/tests
/cudatest
rocm_bw_
test_dir
=
${
PROJECT_DIR
}
/
ROCm/rocm_bandwidth_
test
test
s
_dir
=
${
PROJECT_DIR
}
/tests
kfdtest
=
false
rocm_smi_test
=
false
rocm_bw_test
=
false
hiptest
=
false
cudatest
=
false
all
=
false
...
...
@@ -27,6 +28,7 @@ Test helper script
-a | --all Test all
--kfdtest Test kfd driver and ROCT
--rocm_smi_test Test rocm smi lib
--rocm_bw_test Test rocm bandwidth
--hiptest Test HIP
--cudatest Test CUDA
EOF
...
...
@@ -57,9 +59,24 @@ function func_rocm_smi_test()
sudo
./rsmitst64
}
function
func_rocm_bw_test
()
{
printf
"Will test rocm bandwdith
\n
"
cd
${
rocm_bw_test_dir
}
mkdir
-p
build
&&
cd
build
rm
-rf
*
CXX
=
hipcc
CXXFLAGS
=
--rocm-path
=
/opt/rocm cmake
-DBUILD_BENCHMARK
=
ON
-D
AMDGPU_TARGETS
=
gfx803
-DCMAKE_INSTALL_PATH
=
/opt/rocm ..
make
./rocm-bandwidth-test
}
function
func_hiptest
()
{
printf
"Will test HIP
\n
"
cd
${
tests_dir
}
git clone https://github.com.cnpmjs.org/ROCm-Developer-Tools/HIP-Examples.git
cd
HIP-Examples
./test_all.sh
}
function
func_cudatest
()
...
...
@@ -73,7 +90,7 @@ function func_cudatest()
getopt
-T
if
[[
$?
-eq
4
]]
;
then
GETOPT_PARSE
=
$(
getopt
--name
"
${
0
}
"
--longoptions
help
,all,kfdtest,rocm_smi_test,hiptest,cudatest
--options
ha
--
"
$@
"
)
GETOPT_PARSE
=
$(
getopt
--name
"
${
0
}
"
--longoptions
help
,all,kfdtest,rocm_smi_test,
rocm_bw_test,
hiptest,cudatest
--options
ha
--
"
$@
"
)
else
echo
"Need a new version of getopt"
exit
1
...
...
@@ -101,6 +118,9 @@ while true; do
--rocm_smi_test
)
rocm_smi_test
=
true
shift
;;
--rocm_bw_test
)
rocm_bw_test
=
true
shift
;;
--hiptest
)
hiptest
=
true
shift
;;
...
...
@@ -117,10 +137,12 @@ done
# Begin test
printf
"Will begin test
\n
"
set
-x
mkdir
-p
${
tests_dir
}
if
[[
"
${
all
}
"
==
true
]]
;
then
kfdtest
=
true
rocm_smi_test
=
true
rocm_bw_test
=
true
hiptest
=
true
cudatest
=
true
fi
...
...
@@ -133,6 +155,10 @@ if [[ "${rocm_smi_test}" == true ]]; then
func_rocm_smi_test
fi
if
[[
"
${
rocm_bw_test
}
"
==
true
]]
;
then
func_rocm_bw_test
fi
if
[[
"
${
hiptest
}
"
==
true
]]
;
then
func_hiptest
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment