File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
dynamo/fx_ts_compat/test/core Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class _IRType(Enum):
15
15
16
16
ts = 0
17
17
fx = 1
18
- dynamo = 2
18
+ fx_ts_compat = 2
19
19
20
20
21
21
class _ModuleType (Enum ):
@@ -46,14 +46,14 @@ def _get_target_ir(module_type: _ModuleType, ir: str) -> _IRType:
46
46
47
47
ir_targets_torchscript = any ([ir == opt for opt in ["torchscript" , "ts" ]])
48
48
ir_targets_fx = ir == "fx"
49
- ir_targets_dynamo = ir == "dynamo "
49
+ ir_targets_fx_ts_compat = ir == "fx_ts_compat "
50
50
51
51
if module_is_tsable and ir_targets_torchscript :
52
52
return _IRType .ts
53
53
elif module_is_fxable and ir_targets_fx :
54
54
return _IRType .fx
55
- elif module_is_fxable and ir_targets_dynamo :
56
- return _IRType .dynamo
55
+ elif module_is_fxable and ir_targets_fx_ts_compat :
56
+ return _IRType .fx_ts_compat
57
57
else :
58
58
if ir == "default" :
59
59
# Options are listed in order of preference
@@ -152,8 +152,8 @@ def compile(
152
152
dynamic_batch = False ,
153
153
** kwargs ,
154
154
)
155
- elif target_ir == _IRType .dynamo :
156
- return torch_tensorrt .dynamo .compile (
155
+ elif target_ir == _IRType .fx_ts_compat :
156
+ return torch_tensorrt .dynamo .fx_ts_compat . compile (
157
157
module , inputs = inputs , enabled_precisions = enabled_precisions , ** kwargs
158
158
)
159
159
else :
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def forward(self, x):
21
21
22
22
trt_mod = torch_tensorrt .compile (
23
23
mod ,
24
- ir = "dynamo " ,
24
+ ir = "fx_ts_compat " ,
25
25
inputs = inputs ,
26
26
min_block_size = 1 ,
27
27
)
@@ -45,7 +45,7 @@ def forward(self, x):
45
45
46
46
trt_mod = torch_tensorrt .compile (
47
47
mod ,
48
- ir = "dynamo " ,
48
+ ir = "fx_ts_compat " ,
49
49
inputs = inputs ,
50
50
min_block_size = 1 ,
51
51
)
@@ -76,7 +76,7 @@ def forward(self, x):
76
76
77
77
trt_mod = torch_tensorrt .compile (
78
78
mod ,
79
- ir = "dynamo " ,
79
+ ir = "fx_ts_compat " ,
80
80
inputs = inputs ,
81
81
min_block_size = 1 ,
82
82
)
You can’t perform that action at this time.
0 commit comments