mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Add dynamo smoke tests to CI (#89302)
Add dynamo smoke tests to CI, which checks for python/torch/cuda versions and runs simple dynamo examples on a few backends, including inductor. Smoke tests will run on dynamo and inductor shards. Pull Request resolved: https://github.com/pytorch/pytorch/pull/89302 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
9e4a25c731
commit
0c3537a3c3
@ -215,6 +215,7 @@ test_dynamo_shard() {
|
||||
echo "NUM_TEST_SHARDS must be defined to run a Python test shard"
|
||||
exit 1
|
||||
fi
|
||||
python tools/dynamo/verify_dynamo.py
|
||||
# Temporarily disable test_fx for dynamo pending the investigation on TTS
|
||||
# regression in https://github.com/pytorch/torchdynamo/issues/784
|
||||
time python test/run_test.py \
|
||||
@ -249,6 +250,7 @@ test_inductor_distributed() {
|
||||
}
|
||||
|
||||
test_inductor() {
|
||||
python tools/dynamo/verify_dynamo.py
|
||||
python test/run_test.py --include test_modules test_ops --verbose
|
||||
PYTORCH_TEST_WITH_INDUCTOR=0 python test/run_test.py --include inductor/test_torchinductor --include inductor/test_torchinductor_opinfo --verbose
|
||||
# TODO: investigate "RuntimeError: CUDA driver API confirmed a leak"
|
||||
|
@ -94,6 +94,17 @@ def check_dynamo(backend, device, err_msg):
|
||||
try:
|
||||
import torch._dynamo as dynamo
|
||||
|
||||
if device == "cuda":
|
||||
import torch._inductor.utils as utils
|
||||
|
||||
if not utils.has_triton():
|
||||
print(
|
||||
f"WARNING: CUDA available but triton cannot be used. "
|
||||
f"Your GPU may not be supported. "
|
||||
f"Skipping CUDA check on {backend} backend\n"
|
||||
)
|
||||
return
|
||||
|
||||
dynamo.reset()
|
||||
|
||||
@dynamo.optimize(backend, nopython=True)
|
||||
|
Reference in New Issue
Block a user