feat: sort cuda graphs in descending order

This commit is contained in:
drbh 2024-06-21 16:07:30 +00:00
parent 197c47a302
commit 98e9be7221

View File

@ -15,6 +15,13 @@ if cuda_graphs is not None:
else:
cuda_graphs = None
# sorting the cuda graphs in descending order helps reduce the
# memory impact and results in less memory usage
if cuda_graphs is not None:
cuda_graphs.sort(reverse=True)
CUDA_GRAPHS = cuda_graphs
# This is overridden at model loading.