[CI] Add Triton Ascend in CI (#4921)
Add triton-ascend in UT and e2e
- vLLM version: v0.12.0
- vLLM main:
ad32e3e19c
---------
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
This commit is contained in:
@@ -15,10 +15,23 @@
|
||||
# limitations under the License.
|
||||
# This file is a part of the vllm-ascend project.
|
||||
#
|
||||
import sys
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from vllm_ascend.utils import adapt_patch # noqa E402
|
||||
from vllm_ascend.utils import register_ascend_customop
|
||||
|
||||
# triton and torch_npu is not available in the environment, so we need to mock them
|
||||
sys.modules['torch_npu'].npu.current_device = MagicMock(return_value=0)
|
||||
sys.modules['torch_npu._inductor'] = MagicMock()
|
||||
|
||||
triton_runtime = MagicMock()
|
||||
triton_runtime.driver.active.utils.get_device_properties.return_value = {
|
||||
'num_aic': 8,
|
||||
'num_vectorcore': 8,
|
||||
}
|
||||
sys.modules['triton.runtime'] = triton_runtime
|
||||
|
||||
adapt_patch()
|
||||
adapt_patch(True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user