File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -61,17 +61,15 @@ def _get_target_ir(module_type: _ModuleType, ir: str) -> _IRType:
61
61
else :
62
62
if ir == "default" :
63
63
# Options are listed in order of preference
64
- if module_is_tsable :
64
+ if module_is_fxable :
65
65
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 fx_ts_compat as ir"
67
67
)
68
- return _IRType .ts
69
- elif module_is_fxable :
68
+ return _IRType .fx_ts_compat
69
+ elif module_is_tsable :
70
70
raise ValueError (
71
- "Was given a torch.fx.GraphModule, fx is not currently supported by Torch-TensorRT "
71
+ "ir is set to default but a TorchScript module is provided. Please provide torch.fx.GraphModule or torch.nn.Module as input or set ir = ts "
72
72
)
73
- # logging.log(logging.Level.Info, "ir was set to default, using TorchScript as fx")
74
- # return _IRType.fx
75
73
else :
76
74
raise ValueError ("Module was provided with in an unsupported format" )
77
75
else :
You can’t perform that action at this time.
0 commit comments