Skip to content

feat: Set default ir to dynamo export #2029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/include/torch_tensorrt/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#define XSTR(x) #x
#define STR(x) XSTR(x)

#define TORCH_TENSORRT_MAJOR_VERSION 1
#define TORCH_TENSORRT_MINOR_VERSION 5
#define TORCH_TENSORRT_MAJOR_VERSION 2
#define TORCH_TENSORRT_MINOR_VERSION 0
#define TORCH_TENSORRT_PATCH_VERSION 0
#define TORCH_TENSORRT_VERSION \
STR(TORCH_TENSORRT_MAJOR_VERSION) \
Expand Down
12 changes: 6 additions & 6 deletions py/torch_tensorrt/_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ def _get_target_ir(module_type: _ModuleType, ir: str) -> _IRType:
else:
if ir == "default":
# Options are listed in order of preference
if module_is_tsable:
if module_is_fxable:
logging.log(
logging.Level.Info, "ir was set to default, using TorchScript as ir"
logging.Level.Info, "ir was set to default, using dynamo as ir"
)
return _IRType.ts
elif module_is_fxable:
return _IRType.dynamo
elif module_is_tsable:
logging.log(
logging.Level.Warning,
"Input graph is a torch.fx.GraphModule but the ir provided is default (ts). Please set ir=dynamo to suppress the warning.",
"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",
)
return _IRType.dynamo
return _IRType.ts
else:
raise ValueError("Module was provided in an unsupported format")
else:
Expand Down
2 changes: 1 addition & 1 deletion py/versions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.5.0.dev0"
__version__ = "2.0.0.dev0"
__cuda_version__ = "12.1"
__cudnn_version__ = "8.8"
__tensorrt_version__ = "8.6"