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
+2 -2
View File
@@ -14,11 +14,11 @@ cdef class OnnxEngine(InferenceEngine):
model_meta = self.session.get_modelmeta()
print("Metadata:", model_meta.custom_metadata_map)
cdef tuple get_input_shape(self):
cpdef tuple get_input_shape(self):
shape = self.input_shape
return shape[2], shape[3]
cdef int get_batch_size(self):
cpdef int get_batch_size(self):
return self.batch_size
cpdef run(self, input_data):