Skip to content

Commit 0518252

Browse files
committed
add manual workflow to run tests with precompiled ops
1 parent 7300f3e commit 0518252

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Tests-w-precompiled-ops
4+
5+
# Controls when the action will run.
6+
on:
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11+
jobs:
12+
# This workflow contains a single job called "build"
13+
build:
14+
# The type of runner that the job will run on
15+
runs-on: self-hosted
16+
17+
# Steps represent a sequence of tasks that will be executed as part of the job
18+
steps:
19+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20+
- uses: actions/checkout@v2
21+
22+
# Runs a single command using the runners shell
23+
- name: environment
24+
run: |
25+
nvidia-smi
26+
which python
27+
python --version
28+
which nvcc
29+
nvcc --version
30+
python -c "import torch; print('torch:', torch.__version__, torch)"
31+
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
32+
33+
# Runs a set of commands using the runners shell
34+
- name: Install deepspeed
35+
run: |
36+
DS_BUILD_OPS=1 pip install .[dev]
37+
ds_report
38+
39+
- name: Formatting checks
40+
run: |
41+
pre-commit run --all-files
42+
43+
# Runs a set of commands using the runners shell
44+
- name: Unit tests
45+
run: |
46+
if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
47+
TORCH_EXTENSIONS_DIR=./torch-extensions pytest --durations=0 --forked --verbose -x tests/unit/

0 commit comments

Comments
 (0)