[v1] Refactor kernel plugin (#9669)

Co-authored-by: frozenleaves <frozen@Mac.local>
This commit is contained in:
浮梦
2025-12-31 18:26:48 +08:00
committed by GitHub
parent 4e1d69579a
commit 16735b9e35
19 changed files with 777 additions and 433 deletions

View File

@@ -216,9 +216,9 @@ def load_model(
"You are try to using future feature about kernels, please note that this feature "
"is not supported for all models. If get any error, please disable this feature, or report the issue."
)
from ..v1.plugins.model_plugins.kernels.registry import apply_available_kernels
from ..v1.plugins.model_plugins.kernels.interface import apply_default_kernels
model = apply_available_kernels(model)
model = apply_default_kernels(model=model, include_kernels=model_args.use_v1_kernels)
trainable_params, all_param = count_parameters(model)
if is_trainable: