mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-07-18 11:17:11 +08:00
[Refactor] Change the way of import triton (#20774)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
parent
3b3b778d4a
commit
c1acd6d7d4
@ -6,7 +6,6 @@ from typing import Optional
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import torch
|
import torch
|
||||||
import triton.language as tl
|
|
||||||
|
|
||||||
from tests.kernels.moe.utils import (batched_moe,
|
from tests.kernels.moe.utils import (batched_moe,
|
||||||
make_quantized_test_activations,
|
make_quantized_test_activations,
|
||||||
@ -18,6 +17,7 @@ from vllm.model_executor.layers.fused_moe.fused_batched_moe import (
|
|||||||
invoke_moe_batched_triton_kernel)
|
invoke_moe_batched_triton_kernel)
|
||||||
from vllm.model_executor.layers.fused_moe.fused_moe import fused_topk
|
from vllm.model_executor.layers.fused_moe.fused_moe import fused_topk
|
||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
|
from vllm.triton_utils import tl
|
||||||
|
|
||||||
MNK_FACTORS = [
|
MNK_FACTORS = [
|
||||||
(1, 128, 128),
|
(1, 128, 128),
|
||||||
|
|||||||
@ -8,10 +8,9 @@
|
|||||||
# - Thomas Parnell <tpa@zurich.ibm.com>
|
# - Thomas Parnell <tpa@zurich.ibm.com>
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
import triton
|
|
||||||
import triton.language as tl
|
|
||||||
|
|
||||||
from vllm.logger import init_logger
|
from vllm.logger import init_logger
|
||||||
|
from vllm.triton_utils import tl, triton
|
||||||
|
|
||||||
logger = init_logger(__name__)
|
logger = init_logger(__name__)
|
||||||
|
|
||||||
|
|||||||
@ -8,12 +8,11 @@ https://arxiv.org/abs/2310.18547
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
import triton
|
|
||||||
import triton.language as tl
|
|
||||||
|
|
||||||
from vllm.lora.ops.triton_ops.kernel_utils import do_expand_kernel
|
from vllm.lora.ops.triton_ops.kernel_utils import do_expand_kernel
|
||||||
from vllm.lora.ops.triton_ops.utils import _get_lora_b_ptr
|
from vllm.lora.ops.triton_ops.utils import _get_lora_b_ptr
|
||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
|
from vllm.triton_utils import tl, triton
|
||||||
from vllm.utils import direct_register_custom_op
|
from vllm.utils import direct_register_custom_op
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,12 +8,11 @@ https://arxiv.org/abs/2310.18547
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
import triton
|
|
||||||
import triton.language as tl
|
|
||||||
|
|
||||||
from vllm.lora.ops.triton_ops.kernel_utils import do_shrink_kernel
|
from vllm.lora.ops.triton_ops.kernel_utils import do_shrink_kernel
|
||||||
from vllm.lora.ops.triton_ops.utils import _get_lora_a_ptr
|
from vllm.lora.ops.triton_ops.utils import _get_lora_a_ptr
|
||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
|
from vllm.triton_utils import tl, triton
|
||||||
from vllm.utils import direct_register_custom_op
|
from vllm.utils import direct_register_custom_op
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,8 +4,6 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
import triton
|
|
||||||
import triton.language as tl
|
|
||||||
|
|
||||||
import vllm.model_executor.layers.fused_moe.modular_kernel as mk
|
import vllm.model_executor.layers.fused_moe.modular_kernel as mk
|
||||||
from vllm.model_executor.layers.fused_moe.config import FusedMoEQuantConfig
|
from vllm.model_executor.layers.fused_moe.config import FusedMoEQuantConfig
|
||||||
@ -18,6 +16,7 @@ from vllm.model_executor.layers.fused_moe.utils import (
|
|||||||
normalize_scales_shape)
|
normalize_scales_shape)
|
||||||
from vllm.model_executor.layers.quantization.utils.quant_utils import (
|
from vllm.model_executor.layers.quantization.utils.quant_utils import (
|
||||||
group_broadcast)
|
group_broadcast)
|
||||||
|
from vllm.triton_utils import tl, triton
|
||||||
|
|
||||||
|
|
||||||
@triton.jit
|
@triton.jit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user