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
gaoqiong
MIGraphX
Commits
55156faa
Commit
55156faa
authored
Jul 21, 2023
by
umangyadav
Browse files
Merge remote-tracking branch 'upstream/develop' into resnet50_partition
parents
f5ee52ad
3216fe52
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
.github/workflows/ci.yaml
.github/workflows/ci.yaml
+2
-0
.github/workflows/performance.yaml
.github/workflows/performance.yaml
+2
-2
Jenkinsfile
Jenkinsfile
+1
-3
src/targets/gpu/compile_hip_code_object.cpp
src/targets/gpu/compile_hip_code_object.cpp
+4
-5
No files found.
.github/workflows/ci.yaml
View file @
55156faa
...
@@ -323,6 +323,7 @@ jobs:
...
@@ -323,6 +323,7 @@ jobs:
env
:
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
run
:
|
run
:
|
set +x
gh extension install actions/gh-actions-cache --pin v1.0.1
gh extension install actions/gh-actions-cache --pin v1.0.1
gh actions-cache delete ${{ steps.ccache_restore.outputs.cache-matched-key }} --confirm
gh actions-cache delete ${{ steps.ccache_restore.outputs.cache-matched-key }} --confirm
...
@@ -439,6 +440,7 @@ jobs:
...
@@ -439,6 +440,7 @@ jobs:
env
:
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
run
:
|
run
:
|
set +x
gh extension install actions/gh-actions-cache
gh extension install actions/gh-actions-cache
gh actions-cache delete ${{ steps.ccache_restore_fpga.outputs.cache-matched-key }} --confirm
gh actions-cache delete ${{ steps.ccache_restore_fpga.outputs.cache-matched-key }} --confirm
continue-on-error
:
true
continue-on-error
:
true
...
...
.github/workflows/performance.yaml
View file @
55156faa
...
@@ -12,7 +12,7 @@ on:
...
@@ -12,7 +12,7 @@ on:
rocm_release
:
rocm_release
:
description
:
ROCm Version
description
:
ROCm Version
required
:
true
required
:
true
default
:
'
5.
5
'
default
:
'
5.
6
'
performance_reports_repo
:
performance_reports_repo
:
description
:
Repository where performance reports are stored
description
:
Repository where performance reports are stored
required
:
true
required
:
true
...
@@ -48,7 +48,7 @@ jobs:
...
@@ -48,7 +48,7 @@ jobs:
release
:
release
:
uses
:
ROCmSoftwarePlatform/migraphx-benchmark/.github/workflows/perf-test.yml@main
uses
:
ROCmSoftwarePlatform/migraphx-benchmark/.github/workflows/perf-test.yml@main
with
:
with
:
rocm_release
:
${{ github.event.inputs.rocm_release || '5.
5
' }}
rocm_release
:
${{ github.event.inputs.rocm_release || '5.
6
' }}
result_number
:
${{ github.event.inputs.result_number || '10' }}
result_number
:
${{ github.event.inputs.result_number || '10' }}
flags
:
${{ github.event.inputs.flags || '-r' }}
flags
:
${{ github.event.inputs.flags || '-r' }}
performance_reports_repo
:
${{ github.event.inputs.performance_reports_repo || 'ROCmSoftwarePlatform/migraphx-reports' }}
performance_reports_repo
:
${{ github.event.inputs.performance_reports_repo || 'ROCmSoftwarePlatform/migraphx-reports' }}
...
...
Jenkinsfile
View file @
55156faa
...
@@ -15,13 +15,11 @@ def rocmtestnode(Map conf) {
...
@@ -15,13 +15,11 @@ def rocmtestnode(Map conf) {
def
compiler
=
bconf
.
get
(
"compiler"
,
"/opt/rocm/llvm/bin/clang++"
)
def
compiler
=
bconf
.
get
(
"compiler"
,
"/opt/rocm/llvm/bin/clang++"
)
def
flags
=
bconf
.
get
(
"flags"
,
""
)
def
flags
=
bconf
.
get
(
"flags"
,
""
)
def
gpu_debug
=
bconf
.
get
(
"gpu_debug"
,
"0"
)
def
gpu_debug
=
bconf
.
get
(
"gpu_debug"
,
"0"
)
def
hiprtc_workarounds
=
bconf
.
get
(
"hiprtc_workarounds"
,
"0"
)
def
cmd
=
"""
def
cmd
=
"""
ulimit -c unlimited
ulimit -c unlimited
echo "leak:dnnl::impl::malloc" > suppressions.txt
echo "leak:dnnl::impl::malloc" > suppressions.txt
export LSAN_OPTIONS="suppressions=\$(pwd)/suppressions.txt"
export LSAN_OPTIONS="suppressions=\$(pwd)/suppressions.txt"
export MIGRAPHX_GPU_DEBUG=${gpu_debug}
export MIGRAPHX_GPU_DEBUG=${gpu_debug}
export MIGRAPHX_ENABLE_HIPRTC_WORKAROUNDS=${hiprtc_workarounds}
export CXX=${compiler}
export CXX=${compiler}
export CXXFLAGS='-Werror'
export CXXFLAGS='-Werror'
env
env
...
@@ -109,7 +107,7 @@ rocmtest clang_debug: rocmnode('cdna') { cmake_build ->
...
@@ -109,7 +107,7 @@ rocmtest clang_debug: rocmnode('cdna') { cmake_build ->
stage
(
'hipRTC Debug'
)
{
stage
(
'hipRTC Debug'
)
{
def
sanitizers
=
"undefined"
def
sanitizers
=
"undefined"
def
debug_flags
=
"-g -O2 -fsanitize=${sanitizers} -fno-sanitize-recover=${sanitizers}"
def
debug_flags
=
"-g -O2 -fsanitize=${sanitizers} -fno-sanitize-recover=${sanitizers}"
cmake_build
(
flags:
"-DCMAKE_BUILD_TYPE=debug -DMIGRAPHX_ENABLE_PYTHON=Off -DCMAKE_CXX_FLAGS_DEBUG='${debug_flags}' -DCMAKE_C_FLAGS_DEBUG='${debug_flags}' -DMIGRAPHX_USE_HIPRTC=On"
,
gpu_debug:
true
,
hiprtc_workarounds:
true
)
cmake_build
(
flags:
"-DCMAKE_BUILD_TYPE=debug -DMIGRAPHX_ENABLE_PYTHON=Off -DCMAKE_CXX_FLAGS_DEBUG='${debug_flags}' -DCMAKE_C_FLAGS_DEBUG='${debug_flags}' -DMIGRAPHX_USE_HIPRTC=On"
,
gpu_debug:
true
)
}
}
},
clang_release:
rocmnode
(
'cdna'
)
{
cmake_build
->
},
clang_release:
rocmnode
(
'cdna'
)
{
cmake_build
->
stage
(
'Hip Clang Release'
)
{
stage
(
'Hip Clang Release'
)
{
...
...
src/targets/gpu/compile_hip_code_object.cpp
View file @
55156faa
...
@@ -135,14 +135,13 @@ compute_global_for(context& ctx, std::size_t n, std::size_t over)
...
@@ -135,14 +135,13 @@ compute_global_for(context& ctx, std::size_t n, std::size_t over)
std
::
size_t
max_global
=
ctx
.
get_current_device
().
get_cu_count
()
*
std
::
size_t
max_global
=
ctx
.
get_current_device
().
get_cu_count
()
*
ctx
.
get_current_device
().
get_max_workitems_per_cu
();
ctx
.
get_current_device
().
get_max_workitems_per_cu
();
return
[
n
,
over
,
max_global
](
std
::
size_t
local
)
{
return
[
n
,
over
,
max_global
](
std
::
size_t
local
)
{
std
::
size_t
num_elements
=
n
;
// hip require global workitems multiple of local workitems. It may degrade performance.
// [TODO]: consider adding "fno-hip-uniform-block" flag when it becomes available.
// https://reviews.llvm.org/D155213
std
::
size_t
num_elements
=
((
n
+
local
-
1
)
/
local
)
*
local
;
std
::
size_t
groups
=
(
num_elements
+
local
-
1
)
/
local
;
std
::
size_t
groups
=
(
num_elements
+
local
-
1
)
/
local
;
std
::
size_t
max_blocks
=
max_global
/
local
;
std
::
size_t
max_blocks
=
max_global
/
local
;
std
::
size_t
nglobal
=
std
::
min
(
max_blocks
*
over
,
groups
)
*
local
;
std
::
size_t
nglobal
=
std
::
min
(
max_blocks
*
over
,
groups
)
*
local
;
#ifdef MIGRAPHX_USE_HIPRTC
if
(
enabled
(
MIGRAPHX_ENABLE_HIPRTC_WORKAROUNDS
{}))
num_elements
=
((
num_elements
+
local
-
1
)
/
local
)
*
local
;
#endif
return
std
::
min
(
nglobal
,
num_elements
);
return
std
::
min
(
nglobal
,
num_elements
);
};
};
}
}
...
...
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