[MISC] Add patch module (#526)
This PR added patch module for vllm 1. platform patch: the patch will be registered when load the platform 2. worker patch: the patch will be registered when worker is started. The detail is: 1. patch_common: patch for main and 0.8.4 version 4. patch_main: patch for main verison 5. patch_0_8_4: patch for 0.8.4 version
This commit is contained in:
@@ -51,3 +51,10 @@ def current_stream() -> torch.npu.Stream:
|
||||
# we return the default stream.
|
||||
_current_stream = torch.npu.current_stream()
|
||||
return _current_stream
|
||||
|
||||
|
||||
def adapt_patch(is_global_patch: bool = False):
|
||||
if is_global_patch:
|
||||
from vllm_ascend.patch import platform # noqa: F401
|
||||
else:
|
||||
from vllm_ascend.patch import worker # noqa: F401
|
||||
|
||||
Reference in New Issue
Block a user