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
2bc62c48
Unverified
Commit
2bc62c48
authored
Aug 12, 2023
by
Paul Fultz II
Committed by
GitHub
Aug 12, 2023
Browse files
Add builds for sles in github actions (#2048)
parent
11c0d23f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
138 additions
and
2 deletions
+138
-2
.github/workflows/ci.yaml
.github/workflows/ci.yaml
+65
-0
src/include/migraphx/algorithm.hpp
src/include/migraphx/algorithm.hpp
+2
-0
tools/docker/sles.docker
tools/docker/sles.docker
+46
-0
tools/install_prereqs.sh
tools/install_prereqs.sh
+25
-2
No files found.
.github/workflows/ci.yaml
View file @
2bc62c48
...
@@ -170,6 +170,71 @@ jobs:
...
@@ -170,6 +170,71 @@ jobs:
git config --global --add safe.directory /data
git config --global --add safe.directory /data
python3 tools/format.py origin/${{ github.event_name == 'pull_request' && github.base_ref || 'develop' }}
python3 tools/format.py origin/${{ github.event_name == 'pull_request' && github.base_ref || 'develop' }}
sles
:
runs-on
:
ROCM-Ubuntu
steps
:
-
uses
:
actions/checkout@v3
with
:
fetch-depth
:
0
# In this step, this action saves a list of existing images,
# the cache is created without them in the post run.
# It also restores the cache if it exists.
-
name
:
Docker layer cache
uses
:
jpribyl/action-docker-layer-caching@v0.1.1
with
:
key
:
docker-layer-caching-migraphx-sles-${{hashFiles('hip-clang.docker', '**/*requirements.txt', '**/install_prereqs.sh', 'rbuild.ini')}}
restore-keys
:
docker-layer-caching-migraphx-sles-
# Ignore the failure of a step and avoid terminating the job.
continue-on-error
:
true
-
name
:
Build the Docker image
run
:
docker build . --file tools/docker/sles.docker --tag migraphx-sles
-
name
:
Restore cache files for ccache
uses
:
actions/cache/restore@v3
id
:
ccache_restore
with
:
path
:
${{ github.workspace }}/ccache
key
:
ccache-sles-${{ github.ref }}
restore-keys
:
ccache-sles-
-
name
:
Build migraphx
shell
:
bash -c "docker run -i -v=$GITHUB_WORKSPACE:/data -w /data migraphx-sles bash < {0}"
run
:
|
set -e
export CCACHE_COMPRESSLEVEL=10
export CCACHE_DIR=/data/ccache
export CCACHE_NOHASHDIR=true
export CCACHE_BASEDIR=/data
export CCACHE_MAXSIZE=1
mkdir build
cd build
CXX=/opt/rocm/llvm/bin/clang++ CC=/opt/rocm/llvm/bin/clang cmake \
-DBUILD_DEV=On \
-DCMAKE_CXX_COMPILER_LAUNCHER=/usr/local/bin/ccache \
-DCMAKE_C_COMPILER_LAUNCHER=/usr/local/bin/ccache \
..
make -j$(nproc) tests driver
-
name
:
Clear ccache cache before saving
if
:
${{ steps.ccache_restore.outputs.cache-hit }}
shell
:
bash
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
run
:
|
set +x
gh extension install actions/gh-actions-cache --pin v1.0.1
gh actions-cache delete ${{ steps.ccache_restore.outputs.cache-matched-key }} --confirm
-
name
:
Save cache files for ccache
uses
:
actions/cache/save@v3
if
:
always()
with
:
path
:
${{ github.workspace }}/ccache
key
:
ccache-sles-${{ github.ref }}
pyflakes
:
pyflakes
:
runs-on
:
ubuntu-20.04
runs-on
:
ubuntu-20.04
...
...
src/include/migraphx/algorithm.hpp
View file @
2bc62c48
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
#include <algorithm>
#include <algorithm>
#include <numeric>
#include <numeric>
#include <string>
#include <vector>
#include <migraphx/config.hpp>
#include <migraphx/config.hpp>
namespace
migraphx
{
namespace
migraphx
{
...
...
tools/docker/sles.docker
0 → 100644
View file @
2bc62c48
FROM
registry.suse.com/suse/sle15:15.4
RUN
sh
-c
'echo -e "
\
[rocm]\n
\
name=rocm\n
\
baseurl=https://repo.radeon.com/rocm/zyp/5.5/main\n
\
enabled=1\n
\
gpgcheck=1\n
\
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key\n
\
" > /etc/zypp/repos.d/rocm.repo'
RUN
cat
/etc/zypp/repos.d/rocm.repo
RUN
zypper
-n
--gpg-auto-import-keys
refresh
RUN
zypper
install
-y
-t
pattern devel_basis enhanced_base
RUN
zypper
--gpg-auto-import-keys
install
-y
\
doxygen
\
gcc-c++
\
gdb
\
git
\
python3-pip
# Workaround broken rocm packages
RUN
ln
-s
/opt/rocm-
*
/opt/rocm
RUN
echo
"/opt/rocm/lib"
>
/etc/ld.so.conf.d/rocm.conf
RUN
echo
"/opt/rocm/llvm/lib"
>
/etc/ld.so.conf.d/rocm-llvm.conf
RUN
ldconfig
ENV
LC_ALL=C.UTF-8
ENV
LANG=C.UTF-8
# Install yapf
RUN
pip3
install
yapf
==
0.28.0
# Install doc requirements
# ADD docs/.sphinx/requirements.txt /doc-requirements.txt
# RUN pip3 install -r /doc-requirements.txt
# Install dependencies
ADD
dev-requirements.txt /dev-requirements.txt
ADD
requirements.txt /requirements.txt
ADD
rbuild.ini /rbuild.ini
COPY
./tools/install_prereqs.sh /
RUN
/install_prereqs.sh /usr/local /
&&
rm
/install_prereqs.sh
tools/install_prereqs.sh
View file @
2bc62c48
...
@@ -31,9 +31,30 @@ set -e
...
@@ -31,9 +31,30 @@ set -e
export
LC_ALL
=
C.UTF-8
export
LC_ALL
=
C.UTF-8
export
LANG
=
C.UTF-8
export
LANG
=
C.UTF-8
source
/etc/os-release
if
[[
(
"
${
ID
}
"
==
"sles"
)
]]
;
then
zypper
-n
--gpg-auto-import-keys
install
-y
\
cmake
\
miopen-hip-devel
\
openmp-extras-devel
\
python3-devel
\
python3-pip
\
rocblas-devel
\
rocm-cmake
else
# Need pip3 and Python headers to build dependencies
apt update
&&
apt
install
-y
\
cmake
\
libnuma-dev
\
miopen-hip-dev
\
openmp-extras
\
python3-dev
\
python3-pip
\
rocblas-dev
\
rocm-cmake
fi
# Need pip3 and Python headers to build dependencies
apt update
&&
apt
install
-y
python3-pip python3-dev cmake rocm-cmake rocblas miopen-hip openmp-extras
# Needed for cmake to build various pip packages
# Needed for cmake to build various pip packages
pip3
install
setuptools wheel
pip3
install
setuptools wheel
...
@@ -56,9 +77,11 @@ echo "Dependencies are installed at $PREFIX"
...
@@ -56,9 +77,11 @@ echo "Dependencies are installed at $PREFIX"
# Install deps with rbuild
# Install deps with rbuild
rbuild prepare
-d
$PREFIX
-s
develop
rbuild prepare
-d
$PREFIX
-s
develop
if
[[
(
"
${
ID
}
"
!=
"sles"
)
]]
;
then
export
CMAKE_ARGS
=
"-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
export
CMAKE_ARGS
=
"-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
pip3
install
onnx
==
1.10.2
numpy
==
1.21.6
typing
==
3.7.4
pytest
==
6.0.1
packaging
==
23.0
pip3
install
onnx
==
1.10.2
numpy
==
1.21.6
typing
==
3.7.4
pytest
==
6.0.1
packaging
==
23.0
# pin version of protobuf in Python for onnx runtime unit tests between dist versions
# pin version of protobuf in Python for onnx runtime unit tests between dist versions
pip3
install
protobuf
==
3.20.0
pip3
install
protobuf
==
3.20.0
fi
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