Skip to content

Commit 544c545

Browse files
authored
fix: Fix meta kernel ops import issue for Python only builds (#3322)
1 parent 827eca5 commit 544c545

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import torch_tensorrt
12
from torch_tensorrt.dynamo.runtime._PythonTorchTensorRTModule import ( # noqa: F401
23
PythonTorchTensorRTModule,
34
)
45
from torch_tensorrt.dynamo.runtime._TorchTensorRTModule import ( # noqa: F401
56
TorchTensorRTModule,
67
)
7-
from torch_tensorrt.dynamo.runtime.register_fake_class import *
8+
9+
if torch_tensorrt.ENABLED_FEATURES.torch_tensorrt_runtime:
10+
from torch_tensorrt.dynamo.runtime.meta_ops.register_meta_ops import *

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,13 +593,12 @@ def run(self):
593593
)
594594
]
595595

596-
packages += [
597-
"torch_tensorrt.ts",
598-
]
596+
packages += ["torch_tensorrt.ts", "torch_tensorrt.dynamo.runtime.meta_ops"]
599597

600598
package_dir.update(
601599
{
602600
"torch_tensorrt.ts": "py/torch_tensorrt/ts",
601+
"torch_tensorrt.dynamo.runtime.meta_ops": "py/torch_tensorrt/dynamo/runtime/meta_ops",
603602
}
604603
)
605604

0 commit comments

Comments
 (0)