mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
70 lines
2.1 KiB
YAML
70 lines
2.1 KiB
YAML
name: AMD Offline Tests
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- triton-mlir
|
|
|
|
jobs:
|
|
Integration-Tests:
|
|
runs-on: "ubuntu-latest"
|
|
|
|
container:
|
|
image: ubuntu:22.04
|
|
options: --user root
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Clear cache
|
|
run: |
|
|
rm -rf ~/.triton
|
|
|
|
- name: Update PATH
|
|
run: |
|
|
echo "PATH=${HOME}/.local/bin:${PATH}" >> "${GITHUB_ENV}"
|
|
|
|
- name: Prerequisite
|
|
run: |
|
|
apt update
|
|
apt install -y libpython3-dev python3-pip git wget
|
|
# get rocm related utilities
|
|
wget https://repo.radeon.com/amdgpu-install/5.5/ubuntu/jammy/amdgpu-install_5.5.50500-1_all.deb
|
|
apt-get install -y ./amdgpu-install_5.5.50500-1_all.deb
|
|
amdgpu-install -y --usecase=rocm --no-dkms
|
|
# remove unused packages to free some disk space
|
|
cp /opt/rocm/llvm/bin/ld.lld .
|
|
apt purge -y rocblas rocm-llvm
|
|
mkdir -p /opt/rocm/llvm/bin
|
|
mv ld.lld /opt/rocm/llvm/bin/ld.lld
|
|
# install pytorch
|
|
pip3 install torch==2.0.1 --index-url https://download.pytorch.org/whl/rocm5.4.2
|
|
# uninstall system triton to eliminate conflicts with testing version
|
|
pip3 uninstall -y pytorch-triton-rocm
|
|
|
|
- name: Install Triton
|
|
run: |
|
|
cd python
|
|
pip3 install ninja
|
|
# Install in system, because need to override system triton. Otherwise lit tests will use wrong version
|
|
DEBUG=TRUE TRITON_USE_ROCM=TRUE TRITON_USE_ASSERT_ENABLED_LLVM=TRUE python3 -m pip install --no-build-isolation -vvv -e .
|
|
|
|
- name: Run lit tests
|
|
run: |
|
|
python3 -m pip install lit
|
|
cd python
|
|
LIT_TEST_DIR="build/$(ls build | grep -i cmake)/test"
|
|
if [ ! -d "${LIT_TEST_DIR}" ]; then
|
|
echo "Could not find '${LIT_TEST_DIR}'" ; exit -1
|
|
fi
|
|
lit -v "${LIT_TEST_DIR}"
|
|
|
|
- name: Run CXX unittests
|
|
run: |
|
|
cd python
|
|
cd "build/$(ls build | grep -i cmake)"
|
|
ctest
|