Reapply "import Tensorrt not in compile time in order to dynamically load tensorrt only if nvidia gpu is present"

This reverts commit cf01e5d952.
This commit is contained in:
Alex Bezdieniezhnykh
2025-04-30 23:47:46 +03:00
parent cf01e5d952
commit 28069f63f9
4 changed files with 12 additions and 20 deletions
+3 -11
View File
@@ -16,17 +16,9 @@ cdef class TensorRTEngine(InferenceEngine):
cdef object stream
@staticmethod
cdef get_gpu_memory_bytes(int device_id)
@staticmethod
cdef get_engine_filename(int device_id)
cpdef tuple get_input_shape(self)
@staticmethod
cdef convert_from_onnx(bytes onnx_model)
cpdef int get_batch_size(self)
cdef tuple get_input_shape(self)
cdef int get_batch_size(self)
cdef run(self, input_data)
cpdef run(self, input_data)