Skip to content

Commit

Permalink
[CI] Add torch.compile works without numpy test (#109624) (#109818)
Browse files Browse the repository at this point in the history
Fixes #109387

Pull Request resolved: #109624
Approved by: https://github.com/albanD

Co-authored-by: Nikita Shulga <nshulga@meta.com>
  • Loading branch information
atalman and malfet committed Sep 21, 2023
1 parent fca4233 commit 1841d54
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .ci/pytorch/test.sh
Expand Up @@ -544,6 +544,10 @@ test_without_numpy() {
python -c "import sys;sys.path.insert(0, 'fake_numpy');from unittest import TestCase;import torch;x=torch.randn(3,3);TestCase().assertRaises(RuntimeError, lambda: x.numpy())"
# Regression test for https://github.com/pytorch/pytorch/issues/66353
python -c "import sys;sys.path.insert(0, 'fake_numpy');import torch;print(torch.tensor([torch.tensor(0.), torch.tensor(1.)]))"
# Regression test for https://github.com/pytorch/pytorch/issues/109387
if [[ "${TEST_CONFIG}" == *dynamo* ]]; then
python -c "import sys;sys.path.insert(0, 'fake_numpy');import torch;torch.compile(lambda x:print(x))('Hello World')"
fi
popd
}

Expand Down

0 comments on commit 1841d54

Please sign in to comment.