Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
1258af71
Unverified
Commit
1258af71
authored
Apr 25, 2022
by
Frank Lee
Committed by
GitHub
Apr 25, 2022
Browse files
[ci] cache cuda extension (#860)
parent
c6930d8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
.github/workflows/build.yml
.github/workflows/build.yml
+4
-5
tests/components_to_test/simple_net.py
tests/components_to_test/simple_net.py
+1
-2
No files found.
.github/workflows/build.yml
View file @
1258af71
...
...
@@ -18,18 +18,17 @@ jobs:
options
:
--gpus all --rm -v /data/scratch/cifar-10:/data/scratch/cifar-10
timeout-minutes
:
40
steps
:
-
name
:
Install dependencies
run
:
|
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install -U pip setuptools wheel --user
-
uses
:
actions/checkout@v2
with
:
ssh-key
:
${{ secrets.SSH_KEY_FOR_CI }}
-
name
:
Install Colossal-AI
run
:
|
[ ! -z "$(ls -A /github/home/cuda_ext_cache/)" ] && cp -r /github/home/cuda_ext_cache/* /__w/ColossalAI/ColossalAI/
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-test.txt
pip install -v --no-cache-dir .
pip install -v -e .
cp -r /__w/ColossalAI/ColossalAI/build /github/home/cuda_ext_cache/
cp /__w/ColossalAI/ColossalAI/*.so /github/home/cuda_ext_cache/
-
name
:
Unit Testing
run
:
|
PYTHONPATH=$PWD pytest tests
...
...
tests/components_to_test/simple_net.py
View file @
1258af71
from
zmq
import
device
import
torch
import
torch.nn
as
nn
import
torch.nn.functional
as
F
from
colossalai.nn
import
CheckpointModule
from
.utils.dummy_data_generator
import
DummyDataGenerator
from
.registry
import
non_distributed_component_funcs
from
colossalai.utils.cuda
import
get_current_device
class
SimpleNet
(
CheckpointModule
):
"""
In this no-leaf module, it has subordinate nn.modules and a nn.Parameter.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment