Skip to content

Commit 65277c5

Browse files
authored
feat: Set default ir to dynamo export (#2029)
1 parent 0eae97f commit 65277c5

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

cpp/include/torch_tensorrt/macros.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
#define XSTR(x) #x
2424
#define STR(x) XSTR(x)
2525

26-
#define TORCH_TENSORRT_MAJOR_VERSION 1
27-
#define TORCH_TENSORRT_MINOR_VERSION 5
26+
#define TORCH_TENSORRT_MAJOR_VERSION 2
27+
#define TORCH_TENSORRT_MINOR_VERSION 0
2828
#define TORCH_TENSORRT_PATCH_VERSION 0
2929
#define TORCH_TENSORRT_VERSION \
3030
STR(TORCH_TENSORRT_MAJOR_VERSION) \

py/torch_tensorrt/_compile.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ def _get_target_ir(module_type: _ModuleType, ir: str) -> _IRType:
6161
else:
6262
if ir == "default":
6363
# Options are listed in order of preference
64-
if module_is_tsable:
64+
if module_is_fxable:
6565
logging.log(
66-
logging.Level.Info, "ir was set to default, using TorchScript as ir"
66+
logging.Level.Info, "ir was set to default, using dynamo as ir"
6767
)
68-
return _IRType.ts
69-
elif module_is_fxable:
68+
return _IRType.dynamo
69+
elif module_is_tsable:
7070
logging.log(
7171
logging.Level.Warning,
72-
"Input graph is a torch.fx.GraphModule but the ir provided is default (ts). Please set ir=dynamo to suppress the warning.",
72+
"Input graph is a Torchscript module but the ir provided is default (dynamo). Please set ir=torchscript to suppress the warning. Compiling the module with ir=torchscript",
7373
)
74-
return _IRType.dynamo
74+
return _IRType.ts
7575
else:
7676
raise ValueError("Module was provided in an unsupported format")
7777
else:

py/versions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.5.0.dev0"
1+
__version__ = "2.0.0.dev0"
22
__cuda_version__ = "12.1"
33
__cudnn_version__ = "8.8"
44
__tensorrt_version__ = "8.6"

0 commit comments

Comments
 (0)