forked from ROCm/FBGEMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ROCm#30 from ROCmSoftwarePlatform/update-from-public
Update from public repo 2022-08-02
- Loading branch information
Showing
151 changed files
with
11,675 additions
and
3,154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# This workflow builds the fbgemm_gpu docs and deploys them to gh-pages. | ||
name: Generate documentation | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build_docs_job: | ||
runs-on: linux.2xlarge | ||
steps: | ||
# Checkout the repository to the GitHub Actions runner | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
# Update references | ||
# TODO: update the git submodule sync after we fixed the auto-sync part | ||
- name: Git Sumbodule Update | ||
run: | | ||
git submodule init | ||
git submodule update --remote --recursive | ||
git log | ||
- name: Update pip | ||
run: | | ||
sudo yum update -y | ||
sudo yum -y install git python3-pip | ||
sudo pip3 install --upgrade pip | ||
- name: Setup conda | ||
run: | | ||
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh | ||
bash ~/miniconda.sh -b -p $HOME/miniconda | ||
- name: setup Path | ||
run: | | ||
echo "/home/ec2-user/miniconda/bin" >> $GITHUB_PATH | ||
echo "CONDA=/home/ec2-user/miniconda" >> $GITHUB_PATH | ||
- name: create conda env | ||
run: | | ||
conda create --name build_binary python=3.9 | ||
conda info | ||
- name: check python version | ||
run: | | ||
conda run -n build_binary python --version | ||
- name: Install gcc | ||
shell: bash | ||
run: | | ||
sudo yum group install -y "Development Tools" | ||
- name: Setup Path | ||
run: | | ||
echo /usr/local/bin >> $GITHUB_PATH | ||
- name: Install PyTorch | ||
shell: bash | ||
run: | | ||
conda run -n build_binary python -m pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html | ||
- name: Test PyTorch Installation | ||
run: | | ||
conda run -n build_binary python -c "import torch.distributed" | ||
echo "torch.distributed succeeded" | ||
- name: Install fbgemm_gpu nightly | ||
run: | | ||
conda run -n build_binary python -m pip install fbgemm-gpu-nightly-cpu | ||
- name: Test fbgemm_gpu installation | ||
shell: bash | ||
run: | | ||
conda run -n build_binary \ | ||
python -c "import fbgemm_gpu" | ||
- name: Install Doxygen | ||
run: | | ||
conda install -n build_binary -c conda-forge doxygen | ||
which doxygen | ||
- name: Build the docset | ||
run: | | ||
conda run -n build_binary python -m pip install -r fbgemm_gpu/docs/requirements.txt | ||
cd ./fbgemm_gpu/docs | ||
conda run -n build_binary doxygen Doxyfile.in | ||
conda run -n build_binary make html | ||
cd .. | ||
- name: Get output time | ||
run: echo "The time was ${{ steps.build.outputs.time }}" | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: fbgemm_gpu/docs/build/html # The folder the action should deploy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
|
||
# exit immediately on failure, or if an undefined variable is used | ||
set -eux | ||
|
||
FBGEMM_REPO_DIR=${1:-/workspace/FBGEMM} | ||
|
||
git config --global --add safe.directory "$FBGEMM_REPO_DIR" | ||
git config --global --add safe.directory "$FBGEMM_REPO_DIR/third_party/asmjit" | ||
git config --global --add safe.directory "$FBGEMM_REPO_DIR/third_party/cpuinfo" | ||
git config --global --add safe.directory "$FBGEMM_REPO_DIR/third_party/googletest" | ||
git config --global --add safe.directory "$FBGEMM_REPO_DIR/third_party/hipify_torch" | ||
|
||
# Install dependencies | ||
apt-get update --allow-insecure-repositories && \ | ||
apt-get install -y --allow-unauthenticated \ | ||
git \ | ||
jq \ | ||
sshfs \ | ||
sshpass \ | ||
unzip | ||
|
||
apt-get install -y locales | ||
locale-gen en_US.UTF-8 | ||
|
||
pip3 install click | ||
pip3 install jinja2 | ||
pip3 install ninja | ||
pip3 install scikit-build | ||
pip3 install --upgrade hypothesis | ||
pip3 install --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/rocm5.1.1/ | ||
|
||
pip3 list | ||
|
||
# Build fbgemm_gpu | ||
cd "$FBGEMM_REPO_DIR/fbgemm_gpu" | ||
MAX_JOBS="$(nproc)" | ||
export MAX_JOBS | ||
export PYTORCH_ROCM_ARCH="gfx908" | ||
python setup.py build develop | ||
|
||
export FBGEMM_TEST_WITH_ROCM=1 | ||
|
||
# Test fbgemm_gpu | ||
cd test | ||
|
||
python batched_unary_embeddings_test.py --verbose | ||
python input_combine_test.py --verbose | ||
python jagged_tensor_ops_test.py --verbose | ||
python layout_transform_ops_test.py --verbose | ||
python merge_pooled_embeddings_test.py --verbose | ||
python metric_ops_test.py --verbose | ||
python permute_pooled_embedding_modules_test.py --verbose | ||
python quantize_ops_test.py --verbose | ||
python sparse_ops_test.py --verbose | ||
python split_embedding_inference_converter_test.py --verbose | ||
python split_table_batched_embeddings_test.py --verbose | ||
python uvm_test.py --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.