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

This commit is contained in:
Alex Bezdieniezhnykh
2025-04-30 23:08:53 +03:00
parent ae83bc8542
commit 1c4bdabfb5
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)