mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 08:56:32 +00:00
fix some cython code
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user