forked from pytorch/FBGEMM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_and_test.sh
executable file
·58 lines (47 loc) · 1.69 KB
/
build_and_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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