Skip to content

Commit dfcd04a

Browse files
committed
fix: Repair import error for legacy TS testing
- Wrap Dynamo-dependent imports in version check - Temporarily enable Legacy TS testing on CI
1 parent b5dbc11 commit dfcd04a

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.circleci/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,3 +1597,22 @@ workflows:
15971597
trt-version-short: << pipeline.parameters.trt-version-short >>
15981598
cudnn-version: << pipeline.parameters.cudnn-version >>
15991599
python-version: << pipeline.parameters.python-version >>
1600+
1601+
# Temporary, for CI run
1602+
- build-x86_64-linux:
1603+
name: build-x86_64-linux-legacy
1604+
torch-build: << pipeline.parameters.torch-build-legacy >>
1605+
torchvision-build: << pipeline.parameters.torchvision-build-legacy >>
1606+
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
1607+
python-version: << pipeline.parameters.python-version >>
1608+
legacy: << pipeline.parameters.enable-legacy >>
1609+
1610+
- test-py-ts-x86_64-linux:
1611+
name: test-py-ts-x86_64-linux-legacy
1612+
torch-build: << pipeline.parameters.torch-build-legacy >>
1613+
torchvision-build: << pipeline.parameters.torchvision-build-legacy >>
1614+
torch-build-index: << pipeline.parameters.torch-build-index-legacy >>
1615+
trt-version-long: << pipeline.parameters.trt-version-long >>
1616+
python-version: << pipeline.parameters.python-version >>
1617+
requires:
1618+
- build-x86_64-linux-legacy

py/torch_tensorrt/dynamo/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
from torch_tensorrt.dynamo import fx_ts_compat
2-
from .backend import compile
1+
import torch
2+
3+
if not torch.__version__.startswith("1"):
4+
from torch_tensorrt.dynamo import fx_ts_compat
5+
from .backend import compile

0 commit comments

Comments
 (0)