fix some cython code

This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-03-29 21:18:18 +03:00
parent ad5530b9ef
commit 6269a7485c
32 changed files with 17108 additions and 2728 deletions
+7 -2
View File
@@ -72,10 +72,15 @@ cdef class TensorRTEngine(InferenceEngine):
pass
return 2 * 1024 * 1024 * 1024 if total_memory is None else total_memory # default 2 Gb
@property
def engine_name(self):
return "tensorrt"
@staticmethod
def get_engine_filename(int device_id):
def get_engine_filename():
try:
device = cuda.Device(device_id)
from engines import tensor_gpu_index
device = cuda.Device(max(tensor_gpu_index, 0))
sm_count = device.multiprocessor_count
cc_major, cc_minor = device.compute_capability()
return f"azaion.cc_{cc_major}.{cc_minor}_sm_{sm_count}.engine"