[Bugfix] Fix triton placeholder patch period (#704)
Fix triton placeholder patch period Signed-off-by: MengqingCao <cmq0113@163.com>
This commit is contained in:
@@ -23,5 +23,9 @@ def register():
|
|||||||
|
|
||||||
|
|
||||||
def register_model():
|
def register_model():
|
||||||
|
# TODO: fixme when TritonPlaceholder fixed
|
||||||
|
from vllm_ascend.utils import vllm_version_is
|
||||||
|
if vllm_version_is("0.8.4"):
|
||||||
|
import vllm_ascend.patch.worker.patch_0_8_4.patch_tritonplaceholder # noqa
|
||||||
from .models import register_model
|
from .models import register_model
|
||||||
register_model()
|
register_model()
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
# Adapted from vllm/triton_utils/importing.py
|
# Adapted from vllm/triton_utils/importing.py
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import importlib
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
from importlib.util import find_spec
|
from importlib.util import find_spec
|
||||||
@@ -40,6 +41,8 @@ if not HAS_TRITON:
|
|||||||
self.autotune = self._dummy_decorator("autotune")
|
self.autotune = self._dummy_decorator("autotune")
|
||||||
self.heuristics = self._dummy_decorator("heuristics")
|
self.heuristics = self._dummy_decorator("heuristics")
|
||||||
self.language = TritonLanguagePlaceholder()
|
self.language = TritonLanguagePlaceholder()
|
||||||
|
self.__spec__ = importlib.machinery.ModuleSpec(
|
||||||
|
name="triton", loader=None, origin="placeholder")
|
||||||
logger.warning_once(
|
logger.warning_once(
|
||||||
"Triton is not installed. Using dummy decorators. "
|
"Triton is not installed. Using dummy decorators. "
|
||||||
"Install it via `pip install triton` to enable kernel"
|
"Install it via `pip install triton` to enable kernel"
|
||||||
|
|||||||
Reference in New Issue
Block a user