Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test rocm runner #6

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/fbgemmci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,62 @@ jobs:
python3 -c "import fbgemm_gpu"
python3 -c "import fbgemm_gpu.split_embedding_codegen_lookup_invokers"

test_amd_gpu:
runs-on: rocm
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2

- name: Install ROCm 5.1.1
shell: bash
run: |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
wget https://repo.radeon.com/amdgpu-install/22.10.1/ubuntu/focal/amdgpu-install_22.10.1.50101-1_all.deb
export DEBIAN_FRONTEND=noninteractive
sudo apt install -y ./amdgpu-install_22.10.1.50101-1_all.deb
amdgpu-install -y --usecase=hiplibsdk,rocm
sudo rm amdgpu-install_22.10.1.50101-1_all.deb

- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install git pip python3-dev mesa-common-dev clang comgr libopenblas-dev jp intel-mkl-full locales libnuma-dev
sudo apt-get install -y hipify-clang || true
sudo pip install cmake scikit-build ninja jinja2 numpy hypothesis --no-input
sudo apt-get clean
# Install pytorch 1.11 as required by fbgemm_gpu
sudo pip install --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/rocm5.1.1/

- name: Checkout submodules
shell: bash
run: |
cd fbgemm_gpu
git submodule sync
git submodule update --init --recursive

- name: Build fbgemm_gpu
shell: bash
run: |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
cd fbgemm_gpu
sudo PYTORCH_ROCM_ARCH=gfx908 python3 setup.py install

- name: Test fbgemm_gpu installation
shell: bash
run: |
cd fbgemm_gpu
cd test
python3 input_combine_test.py
python3 quantize_ops_test.py
python3 sparse_ops_test.py
FBGEMM_TEST_WITH_ROCM=1 python3 split_table_batched_embeddings_test.py
python3 -c "import fbgemm_gpu"
python3 -c "import fbgemm_gpu.split_embedding_codegen_lookup_invokers"

build_cpu_only:
runs-on: ${{ matrix.os }}
strategy:
Expand Down