Commit 2f40fa7d authored by myhloli's avatar myhloli
Browse files

perf(inference): adjust batch ratio for GPU memory sizes

- Remove separate condition for GPU memory >= 24GB
- Simplify logic to use a single threshold of 16GB
parent 74e954da
......@@ -257,9 +257,7 @@ def may_batch_image_analyze(
if str(device).startswith('npu') or str(device).startswith('cuda'):
gpu_memory = int(os.getenv('VIRTUAL_VRAM_SIZE', round(get_vram(device))))
if gpu_memory is not None:
if gpu_memory >= 24:
batch_ratio = 32
elif gpu_memory >= 16:
if gpu_memory >= 16:
batch_ratio = 16
elif gpu_memory >= 12:
batch_ratio = 8
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment