utils.py 453 Bytes
Newer Older
lizhigong's avatar
lizhigong committed
1
2
3
4
5


import os

zero_overhead = os.environ.get('VLLM_ZERO_OVERHEAD') == '1'
6
7
disable_auto_finish_thread = os.environ.get('VLLM_ZERO_DISABLE_AUTO_THREAD') == '1'
zero_no_thread = os.environ.get('VLLM_ZERO_NO_THREAD') == '1'
lizhigong's avatar
lizhigong committed
8
9

def is_zero_overhead():
10
11
12
13
14
15
16
    return zero_overhead

def is_zero_auto_thread():
    return (not disable_auto_finish_thread) and zero_overhead and (not zero_no_thread)

def is_zero_no_thread():
    return zero_no_thread and zero_overhead