remove cpdef, add constants h

This commit is contained in:
Oleksandr Bezdieniezhnykh
2025-08-12 14:53:14 +03:00
parent ad782bcbaa
commit 9e4dc5404c
6 changed files with 68 additions and 13 deletions
+3 -3
View File
@@ -112,13 +112,13 @@ cdef class TensorRTEngine(InferenceEngine):
constants_inf.log('conversion done!')
return bytes(plan)
cpdef tuple get_input_shape(self):
cdef tuple get_input_shape(self):
return self.input_shape[2], self.input_shape[3]
cpdef int get_batch_size(self):
cdef int get_batch_size(self):
return self.batch_size
cpdef run(self, input_data):
cdef run(self, input_data):
try:
cuda.memcpy_htod_async(self.d_input, input_data, self.stream)
self.context.set_tensor_address(self.input_name, int(self.d_input)) # input buffer