mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-04-28 03:39:48 +00:00
[build] prepare v0.6.1 SFT wheel packaging on main (#1945)
Some checks failed
Book-CI / test (push) Waiting to run
Book-CI / test-1 (push) Waiting to run
Book-CI / test-2 (push) Waiting to run
Deploy / deploy (macos-latest) (push) Waiting to run
Deploy / deploy (ubuntu-latest) (push) Waiting to run
Deploy / deploy (windows-latest) (push) Waiting to run
Release Fake Tag / publish (push) Has been cancelled
Release to PyPI / Build & publish sglang-kt (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.11) (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.12) (push) Has been cancelled
Release sglang-kt to PyPI / Build sglang-kt wheel (push) Has been cancelled
Release to PyPI / Publish kt-kernel to PyPI (push) Has been cancelled
Release sglang-kt to PyPI / Publish sglang-kt to PyPI (push) Has been cancelled
Some checks failed
Book-CI / test (push) Waiting to run
Book-CI / test-1 (push) Waiting to run
Book-CI / test-2 (push) Waiting to run
Deploy / deploy (macos-latest) (push) Waiting to run
Deploy / deploy (ubuntu-latest) (push) Waiting to run
Deploy / deploy (windows-latest) (push) Waiting to run
Release Fake Tag / publish (push) Has been cancelled
Release to PyPI / Build & publish sglang-kt (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.11) (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.12) (push) Has been cancelled
Release sglang-kt to PyPI / Build sglang-kt wheel (push) Has been cancelled
Release to PyPI / Publish kt-kernel to PyPI (push) Has been cancelled
Release sglang-kt to PyPI / Publish sglang-kt to PyPI (push) Has been cancelled
* [build]: prepare 0.6.1 SFT wheel packaging on main * [build]: finalize py311+ wheel packaging defaults
This commit is contained in:
parent
9544a8960d
commit
85308615b9
15 changed files with 305 additions and 35 deletions
|
|
@ -12,7 +12,9 @@
|
|||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(KTRANSFORMERS_ENABLE_CPPTRACE)
|
||||
#include <cpptrace/cpptrace.hpp>
|
||||
#endif
|
||||
#include <csignal>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
|
|
@ -54,8 +56,8 @@ static const bool _is_plain_ = false;
|
|||
#if defined(__x86_64__)
|
||||
#include "operators/avx2/bf16-moe.hpp"
|
||||
#include "operators/avx2/fp8-moe.hpp"
|
||||
#include "operators/avx2/gptq_int4_avxvnni-moe.hpp"
|
||||
#include "operators/avx2/gptq_int4-moe.hpp"
|
||||
#include "operators/avx2/gptq_int4_avxvnni-moe.hpp"
|
||||
#endif
|
||||
|
||||
#include <pybind11/stl.h> // std::vector/std::pair/std::string conversions
|
||||
|
|
@ -74,7 +76,6 @@ static const bool _is_plain_ = false;
|
|||
namespace py = pybind11;
|
||||
using namespace pybind11::literals;
|
||||
|
||||
|
||||
py::object to_float_ptr(uintptr_t input_ptr, int size, ggml_type type) {
|
||||
if (type < 0 || type >= GGML_TYPE_COUNT) {
|
||||
PyErr_SetString(PyExc_ValueError, "Invalid ggml_type");
|
||||
|
|
@ -473,7 +474,6 @@ void bind_moe_module(py::module_& moe_module, const char* name) {
|
|||
}
|
||||
|
||||
PYBIND11_MODULE(kt_kernel_ext, m) {
|
||||
|
||||
py::class_<WorkerPool>(m, "WorkerPool").def(py::init<int>());
|
||||
py::class_<WorkerPoolConfig>(m, "WorkerPoolConfig")
|
||||
.def(py::init<>())
|
||||
|
|
@ -813,7 +813,7 @@ PYBIND11_MODULE(kt_kernel_ext, m) {
|
|||
bind_moe_module<AVX2_FP8_MOE_TP<avx2::GemmKernelAVX2FP8>>(moe_module, "AVX2FP8_MOE");
|
||||
bind_moe_module<AVX2_GPTQ_INT4_MOE_TP<avx2::GemmKernelAVX2GPTQInt4>>(moe_module, "AVX2GPTQInt4_MOE");
|
||||
bind_moe_module<AVXVNNI256_GPTQ_INT4_MOE_TP<avxvnni::GemmKernelAVXVNNI256GPTQInt4>>(moe_module,
|
||||
"AVXVNNI256GPTQInt4_MOE");
|
||||
"AVXVNNI256GPTQInt4_MOE");
|
||||
#endif
|
||||
|
||||
#if defined(USE_MOE_KERNEL)
|
||||
|
|
@ -976,6 +976,7 @@ PYBIND11_MODULE(kt_kernel_ext, m) {
|
|||
py::arg("size"), py::arg("type"));
|
||||
}
|
||||
|
||||
#if defined(KTRANSFORMERS_ENABLE_CPPTRACE)
|
||||
static void warmup_cpptrace() {
|
||||
// 避免第一次调用触发 lazy-loading(malloc 等) :contentReference[oaicite:7]{index=7}
|
||||
cpptrace::frame_ptr buffer[10];
|
||||
|
|
@ -1002,3 +1003,4 @@ __attribute__((constructor)) static void install_handlers() {
|
|||
sigaction(SIGABRT, &sa, nullptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue