Skip to content

Commit 8f42a18

Browse files
committed
chore: Rename ir to fx_ts_compat
Signed-off-by: Dheeraj Peri <[email protected]>
1 parent 8b15cdc commit 8f42a18

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

py/torch_tensorrt/_compile.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class _IRType(Enum):
1515

1616
ts = 0
1717
fx = 1
18-
dynamo = 2
18+
fx_ts_compat = 2
1919

2020

2121
class _ModuleType(Enum):
@@ -46,14 +46,14 @@ def _get_target_ir(module_type: _ModuleType, ir: str) -> _IRType:
4646

4747
ir_targets_torchscript = any([ir == opt for opt in ["torchscript", "ts"]])
4848
ir_targets_fx = ir == "fx"
49-
ir_targets_dynamo = ir == "dynamo"
49+
ir_targets_fx_ts_compat = ir == "fx_ts_compat"
5050

5151
if module_is_tsable and ir_targets_torchscript:
5252
return _IRType.ts
5353
elif module_is_fxable and ir_targets_fx:
5454
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
5757
else:
5858
if ir == "default":
5959
# Options are listed in order of preference
@@ -152,8 +152,8 @@ def compile(
152152
dynamic_batch=False,
153153
**kwargs,
154154
)
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(
157157
module, inputs=inputs, enabled_precisions=enabled_precisions, **kwargs
158158
)
159159
else:

py/torch_tensorrt/dynamo/fx_ts_compat/test/core/test_input.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def forward(self, x):
2121

2222
trt_mod = torch_tensorrt.compile(
2323
mod,
24-
ir="dynamo",
24+
ir="fx_ts_compat",
2525
inputs=inputs,
2626
min_block_size=1,
2727
)
@@ -45,7 +45,7 @@ def forward(self, x):
4545

4646
trt_mod = torch_tensorrt.compile(
4747
mod,
48-
ir="dynamo",
48+
ir="fx_ts_compat",
4949
inputs=inputs,
5050
min_block_size=1,
5151
)
@@ -76,7 +76,7 @@ def forward(self, x):
7676

7777
trt_mod = torch_tensorrt.compile(
7878
mod,
79-
ir="dynamo",
79+
ir="fx_ts_compat",
8080
inputs=inputs,
8181
min_block_size=1,
8282
)

0 commit comments

Comments
 (0)