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
c2923b44
Unverified
Commit
c2923b44
authored
Jan 27, 2023
by
Paul Fultz II
Committed by
GitHub
Jan 27, 2023
Browse files
Merge branch 'develop' into jit-reduce-reg
parents
4685520e
635502be
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
7 deletions
+83
-7
.github/workflows/sync-onnxrt-main.yaml
.github/workflows/sync-onnxrt-main.yaml
+45
-0
Dockerfile
Dockerfile
+30
-4
src/module.cpp
src/module.cpp
+2
-1
test/onnx/.onnxrt-commit
test/onnx/.onnxrt-commit
+1
-0
tools/build_and_test_onnxrt.sh
tools/build_and_test_onnxrt.sh
+5
-2
No files found.
.github/workflows/sync-onnxrt-main.yaml
0 → 100644
View file @
c2923b44
name
:
Onnxruntime main weekly sync
on
:
schedule
:
-
cron
:
"
05
09
*
*
5"
jobs
:
sync
:
steps
:
-
uses
:
actions/checkout@v3
with
:
ref
:
develop
path
:
../
get_date
:
steps
:
-
run
:
echo "::set-output name=date::$(date +'%Y-%m-%d')"
update_file
:
needs
:
[
sync get_date
]
steps
:
-
run
:
git clone https://github.com/microsoft/onnxruntime.git && cd onnxruntime && git rev-parse HEAD >> ../test/onnx/.onnxrt-commit
Add_commit
:
needs
:
update_file
steps
:
-
name
:
Add & Commit
uses
:
EndBug/add-and-commit@v9.1.1
with
:
new_branch
:
onnxruntime-sync-${{ steps.date.outputs.date }}
add
:
../test/onnx/.onnxrt-commit
message
:
Update Onnxruntime commit to latest release
default_author
:
github_actions
push
:
true
PR
:
needs
:
Add_commit
steps
:
-
name
:
GitHub Action for creating Pull Requests
uses
:
devops-infra/action-pull-request@v0.5.3
with
:
github_token
:
${{ secrets.GITHUB_TOKEN }}
title
:
Sync Onnxruntime main
reviewer
:
pfultz2, causten
assignee
:
TedThemistokleous
label
:
automatic, onnxruntime
target_branch
:
develop
Dockerfile
View file @
c2923b44
...
...
@@ -5,6 +5,10 @@ ARG PREFIX=/usr/local
# Support multiarch
RUN
dpkg
--add-architecture
i386
# Install rocm key
RUN
apt-get update
&&
apt-get
install
-y
gnupg2
--no-install-recommends
curl
&&
\
curl
-sL
http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -
# Add rocm repository
RUN
sh
-c
'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/5.3/ ubuntu main > /etc/apt/sources.list.d/rocm.list'
...
...
@@ -32,10 +36,27 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-
libnuma-dev
\
miopen-hip
\
rocblas
\
hipfft
\
rocthrust
\
rocrand
\
hipsparse
\
rccl
\
rccl-dev
\
rocm-smi-lib
\
rocm-dev
\
roctracer-dev
\
hipcub
\
hipblas
\
hipify-clang
\
half
\
libssl-dev
\
zlib1g-dev
&&
\
apt-get clean
&&
\
rm
-rf
/var/lib/apt/lists/
*
# add this for roctracer dependancies
RUN
pip3
install
CppHeaderParser
packaging
==
22.0
# Workaround broken rocm packages
RUN
ln
-s
/opt/rocm-
*
/opt/rocm
RUN
echo
"/opt/rocm/lib"
>
/etc/ld.so.conf.d/rocm.conf
...
...
@@ -72,19 +93,24 @@ RUN /download_models.sh && rm /download_models.sh
# Install latest ccache version
RUN
cget
-p
$PREFIX
install
facebook/zstd@v1.4.5
-X
subdir
-DCMAKE_DIR
=
build/cmake
RUN
cget
-p
$PREFIX
install
ccache@v4.1
-DENABLE_TESTING
=
OFF
RUN
cget
-p
/opt/cmake
install
kitware/cmake@v3.24.3
# Install newer cmake for onnx runtime
ARG
CMAKE_VERSION=3.24.2
RUN
cget
-p
/opt/cmake
install
-X
binary https://github.com/Kitware/CMake/releases/download/v
${
CMAKE_VERSION
}
/cmake-
${
CMAKE_VERSION
}
-Linux-x86_64
.tar.gz
RUN
export
ONNXRT_COMMIT
=
$(
cat test
/onnx/.onnxrt-commit
)
ARG
ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
ARG
ONNXRUNTIME_BRANCH=main
ARG
ONNXRUNTIME_COMMIT=24f1bd6156cf5968bbc76dfb0e801a9b9c56b9fc
ARG
ONNXRUNTIME_COMMIT=$ONNXRT_COMMIT
# Let us know which commit where're using for CI
RUN
echo
"Onnxruntime Commit:"
&&
echo
$ONNXRUNTIME_COMMIT
RUN
git clone
--single-branch
--branch
${
ONNXRUNTIME_BRANCH
}
--recursive
${
ONNXRUNTIME_REPO
}
onnxruntime
&&
\
cd
onnxruntime
&&
\
git checkout
${
ONNXRUNTIME_COMMIT
}
&&
\
/bin/sh dockerfiles/scripts/install_common_deps.sh
ADD
tools/build_and_test_onnxrt.sh /onnxruntime/build_and_test_onnxrt.sh
RUN
cget
-p
/usr/local
install
ROCmSoftwarePlatform/rocMLIR@78b706fe9879587ab98b6614ae539265374a3fae
-DBUILD_MIXR_TARGET
=
On
-DLLVM_ENABLE_ZSTD
=
Off
-DLLVM_ENABLE_THREADS
=
Off
...
...
src/module.cpp
View file @
c2923b44
...
...
@@ -822,7 +822,8 @@ static void print_make_op(std::ostream& os, const operation& op)
static
void
print_py_shape
(
std
::
ostream
&
os
,
const
migraphx
::
shape
&
s
)
{
os
<<
"migraphx.shape("
<<
s
.
type_string
()
<<
", lens="
<<
to_json_string
(
s
.
lens
());
os
<<
"migraphx.shape(type="
<<
to_json_string
(
s
.
type_string
())
<<
", lens="
<<
to_json_string
(
s
.
lens
());
if
(
not
s
.
standard
())
os
<<
", strides="
<<
to_json_string
(
s
.
strides
());
os
<<
")"
;
...
...
test/onnx/.onnxrt-commit
0 → 100644
View file @
c2923b44
c9a53c925510a101f5ca94d5ecda0924e40a8463
tools/build_and_test_onnxrt.sh
View file @
c2923b44
...
...
@@ -26,5 +26,8 @@ pip3 install -r requirements.txt
# Add newer cmake to the path
export
PATH
=
"/opt/cmake/bin:
$PATH
"
export
CXXFLAGS
=
"-D__HIP_PLATFORM_HCC__=1 -w"
./build.sh
--config
Release
--update
--build
--parallel
--cmake_extra_defines
ONNXRUNTIME_VERSION
=
$(
cat
./VERSION_NUMBER
)
--test
--use_migraphx
# pip3 install /code/onnxruntime/build/Linux/Release/dist/*.whl
./build.sh
--config
Release
--cmake_extra_defines
CMAKE_HIP_COMPILER
=
/opt/rocm/llvm/bin/clang++
--update
--build
--parallel
--cmake_extra_defines
ONNXRUNTIME_VERSION
=
$(
cat
./VERSION_NUMBER
)
--skip_tests
--rocm_home
/opt/rocm
--use_migraphx
--migraphx_home
/opt/rocm
--rocm_version
=
`
cat
/opt/rocm/.info/version-dev
`
cd
build/Linux/Release
#Add test launcher for onnxrt tests
../../../tools/ci_build/github/pai/migraphx_test_launcher.sh
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