TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

🐛 [Bug] .tests.py.ts.api.test_classes

Open narendasan opened this issue 5 months ago • 0 comments

Bug Description

api/test_classes.py:6: in <module>
    import torch_tensorrt as torchtrt
/opt/python/cp39-cp39/lib/python3.9/site-packages/torch_tensorrt/__init__.py:125: in <module>
    from torch_tensorrt.runtime import *  # noqa: F403
/opt/python/cp39-cp39/lib/python3.9/site-packages/torch_tensorrt/runtime/__init__.py:5: in <module>
    from torch_tensorrt.runtime._cudagraphs import (
/opt/python/cp39-cp39/lib/python3.9/site-packages/torch_tensorrt/runtime/_cudagraphs.py:61: in <module>
    class _CudagraphsContextManager(object):
/opt/python/cp39-cp39/lib/python3.9/site-packages/torch_tensorrt/runtime/_cudagraphs.py:74: in _CudagraphsContextManager
    def __enter__(self) -> torch.nn.Module | torch.fx.GraphModule:
E   TypeError: unsupported operand type(s) for |: 'type' and 'type'

To Reproduce

Steps to reproduce the behavior:

Expected behavior

Environment

Build information about Torch-TensorRT can be found by turning on debug messages

  • Torch-TensorRT Version (e.g. 1.0.0):
  • PyTorch Version (e.g. 1.0):
  • CPU Architecture:
  • OS (e.g., Linux):
  • How you installed PyTorch (conda, pip, libtorch, source):
  • Build command you used (if compiling from source):
  • Are you using local sources or building from archives:
  • Python version:
  • CUDA version:
  • GPU models and configuration:
  • Any other relevant information:

Additional context

narendasan avatar Jun 13 '25 23:06 narendasan