Skip to content

TensorRT quits Python if TensorFlow is imported #1774

@daniel-kukiela

Description

@daniel-kukiela

Description

TensorRT code silently quits Python if TensorFlow is imported.

Environment

TensorRT Version: 8.2.3.0
NVIDIA GPU: GTX 1080Ti / RTX 8000
NVIDIA Driver Version: 30.0.15.1123
CUDA Version: 11.4.3
CUDNN Version: 8.2.4.15
Operating System: Windows 10 21H2
Python Version (if applicable): 3.9.6
Tensorflow Version (if applicable): 2.7.0 (tested also with 2.5.0)
Baremetal or Container (if so, version): baremetal

Relevant Files

Used plan file: https://www.dropbox.com/s/mbsnwesfb0wmbp3/upsample_fp16.plan?dl=0

Steps To Reproduce

import tensorrt as trt
import pycuda.driver as cuda
import pycuda.autoinit
import tensorflow


file = 'upsample_fp16.plan'
f = open(file, 'rb')

TRT_LOGGER = trt.Logger(trt.Logger.WARNING)
trt_runtime = trt.Runtime(TRT_LOGGER)
engine = trt_runtime.deserialize_cuda_engine(f.read())
print(engine.get_binding_shape(0))
print(set(engine.get_binding_shape(0)))
print(trt.volume(engine.get_binding_shape(0)))

If you comment out import tensorflow the code works, otherwise silently quits Python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedIssue has been triaged by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions