[Model] Support DeepSeek-V4

This commit is contained in:
chenxb002
2026-04-24 09:50:34 +08:00
commit b9925203b8
172 changed files with 44780 additions and 0 deletions

18
csrc/torch_bindings.cpp Normal file
View File

@@ -0,0 +1,18 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright contributors to the vLLM-MLU project
#include <torch/extension.h>
#include <torch/library.h>
#include <torch/version.h>
#include <pybind11/pybind11.h>
#include "ops.h"
#include "utils.h"
TORCH_LIBRARY_EXPAND(_C, ops)
{
// vLLM-MLU custom ops
ops.def("weak_ref_tensor(Tensor input) -> Tensor");
ops.impl("weak_ref_tensor", torch::kPrivateUse1, &vllm_mlu::weak_ref_tensor);
}
REGISTER_EXTENSION(_C)