Skip to content

Commit

Permalink
fix: Fix meta kernel ops import issue for Python only builds (#3322)
Browse files Browse the repository at this point in the history
  • Loading branch information
peri044 authored Dec 17, 2024
1 parent 827eca5 commit 544c545
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion py/torch_tensorrt/dynamo/runtime/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import torch_tensorrt
from torch_tensorrt.dynamo.runtime._PythonTorchTensorRTModule import ( # noqa: F401
PythonTorchTensorRTModule,
)
from torch_tensorrt.dynamo.runtime._TorchTensorRTModule import ( # noqa: F401
TorchTensorRTModule,
)
from torch_tensorrt.dynamo.runtime.register_fake_class import *

if torch_tensorrt.ENABLED_FEATURES.torch_tensorrt_runtime:
from torch_tensorrt.dynamo.runtime.meta_ops.register_meta_ops import *
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,13 +593,12 @@ def run(self):
)
]

packages += [
"torch_tensorrt.ts",
]
packages += ["torch_tensorrt.ts", "torch_tensorrt.dynamo.runtime.meta_ops"]

package_dir.update(
{
"torch_tensorrt.ts": "py/torch_tensorrt/ts",
"torch_tensorrt.dynamo.runtime.meta_ops": "py/torch_tensorrt/dynamo/runtime/meta_ops",
}
)

Expand Down

0 comments on commit 544c545

Please sign in to comment.