[Renderer] Separate out RendererConfig from ModelConfig (#30145)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -17,6 +17,7 @@ from vllm.config import (
|
||||
DeviceConfig,
|
||||
ModelConfig,
|
||||
PassConfig,
|
||||
RendererConfig,
|
||||
VllmConfig,
|
||||
get_current_vllm_config,
|
||||
set_current_vllm_config,
|
||||
@@ -276,6 +277,7 @@ def sequence_parallelism_pass_on_test_model(
|
||||
|
||||
vllm_config = VllmConfig(
|
||||
model_config=model_config,
|
||||
renderer_config=RendererConfig(model_config=model_config),
|
||||
device_config=device_config,
|
||||
compilation_config=compilation_config,
|
||||
)
|
||||
|
||||
@@ -15,6 +15,7 @@ from vllm.config import (
|
||||
CompilationConfig,
|
||||
ModelConfig,
|
||||
PassConfig,
|
||||
RendererConfig,
|
||||
VllmConfig,
|
||||
set_current_vllm_config,
|
||||
)
|
||||
@@ -219,8 +220,11 @@ def test_fix_functionalization(
|
||||
torch.set_default_device("cuda")
|
||||
torch.set_default_dtype(dtype)
|
||||
|
||||
model_config = ModelConfig(dtype=dtype)
|
||||
|
||||
vllm_config = VllmConfig(
|
||||
model_config=ModelConfig(dtype=dtype),
|
||||
model_config=model_config,
|
||||
renderer_config=RendererConfig(model_config=model_config),
|
||||
compilation_config=CompilationConfig(
|
||||
custom_ops=["all"],
|
||||
pass_config=PassConfig(
|
||||
|
||||
@@ -15,6 +15,7 @@ from vllm.config import (
|
||||
CompilationMode,
|
||||
ModelConfig,
|
||||
PassConfig,
|
||||
RendererConfig,
|
||||
VllmConfig,
|
||||
)
|
||||
from vllm.model_executor.layers.layernorm import RMSNorm
|
||||
@@ -154,8 +155,11 @@ def test_fusion_rmsnorm_quant(
|
||||
custom_ops.append("+rms_norm")
|
||||
if enable_quant_fp8_custom_op:
|
||||
custom_ops.append("+quant_fp8")
|
||||
|
||||
model_config = ModelConfig(dtype=dtype)
|
||||
vllm_config = VllmConfig(
|
||||
model_config=ModelConfig(dtype=dtype),
|
||||
model_config=model_config,
|
||||
renderer_config=RendererConfig(model_config=model_config),
|
||||
compilation_config=CompilationConfig(
|
||||
mode=CompilationMode.VLLM_COMPILE,
|
||||
custom_ops=custom_ops,
|
||||
|
||||
@@ -24,6 +24,7 @@ from vllm.config import (
|
||||
CompilationMode,
|
||||
ModelConfig,
|
||||
PassConfig,
|
||||
RendererConfig,
|
||||
SchedulerConfig,
|
||||
VllmConfig,
|
||||
set_current_vllm_config,
|
||||
@@ -325,6 +326,7 @@ def test_attention_quant_pattern(
|
||||
)
|
||||
vllm_config = VllmConfig(
|
||||
model_config=model_config,
|
||||
renderer_config=RendererConfig(model_config=model_config),
|
||||
scheduler_config=SchedulerConfig(
|
||||
max_num_seqs=1024,
|
||||
max_model_len=model_config.max_model_len,
|
||||
|
||||
@@ -7,7 +7,7 @@ import torch
|
||||
|
||||
from vllm.compilation.inductor_pass import CallableInductorPass, InductorPass
|
||||
from vllm.compilation.pass_manager import PostGradPassManager
|
||||
from vllm.config import ModelConfig, VllmConfig
|
||||
from vllm.config import ModelConfig, RendererConfig, VllmConfig
|
||||
|
||||
|
||||
# dummy custom pass that doesn't inherit
|
||||
@@ -43,7 +43,11 @@ class ProperPass(InductorPass):
|
||||
)
|
||||
def test_pass_manager_uuid(callable):
|
||||
# Some passes need dtype to be set
|
||||
config = VllmConfig(model_config=ModelConfig(dtype=torch.bfloat16))
|
||||
model_config = ModelConfig(dtype=torch.bfloat16)
|
||||
config = VllmConfig(
|
||||
model_config=model_config,
|
||||
renderer_config=RendererConfig(model_config=model_config),
|
||||
)
|
||||
|
||||
pass_manager = PostGradPassManager()
|
||||
pass_manager.configure(config)
|
||||
|
||||
@@ -19,6 +19,7 @@ from vllm.config import (
|
||||
CompilationMode,
|
||||
ModelConfig,
|
||||
PassConfig,
|
||||
RendererConfig,
|
||||
VllmConfig,
|
||||
set_current_vllm_config,
|
||||
)
|
||||
@@ -133,8 +134,10 @@ def test_qk_norm_rope_fusion(
|
||||
if enable_rope_custom_op:
|
||||
custom_ops.append("+rotary_embedding")
|
||||
|
||||
model_config = ModelConfig(dtype=dtype)
|
||||
vllm_config = VllmConfig(
|
||||
model_config=ModelConfig(dtype=dtype),
|
||||
model_config=model_config,
|
||||
renderer_config=RendererConfig(model_config=model_config),
|
||||
compilation_config=CompilationConfig(
|
||||
mode=CompilationMode.VLLM_COMPILE,
|
||||
custom_ops=custom_ops,
|
||||
|
||||
Reference in New Issue
Block a user