/*
Copyright (c) 2025-2025 Huawei Technologies Co., Ltd.

sysHAX-adapter is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
    http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
PURPOSE.
See the Mulan PSL v2 for more details.
Created: 2025-11-27
Desc: CPU inference Python bindings
*/

#include <torch/extension.h>
#include <pybind11/pybind11.h>
#include "cpu_inference.h"

PYBIND11_MODULE(cpu_inference, m) {
    m.def("cal_experts", &cal_experts, "Get next token logits from hidden states");
    m.def("load_weight", &load_weight, 
          "加载PyTorch权重\n"
          "参数:\n"
          "  weight_infos: list of dict, 格式: [{'data': torch.Tensor, 'meta': (int, int)}]");
    m.def("load_config", &load_config, "");
}