Skip to content

[Bug] error with kt-kernel installation #1591

@jli113

Description

@jli113

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/kvcache-ai/ktransformers/discussions. Otherwise, it will be closed.
  • 5. To help the community, I will use Chinese/English or attach an Chinese/English translation if using another language. Non-Chinese/English content without translation may be closed.

Describe the bug

Processing /home/k1/ktransformers/kt-kernel
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting torch>=2.0.0 (from kt-kernel==0.1.0)
Using cached torch-2.9.0-cp311-cp311-manylinux_2_28_x86_64.whl.metadata (30 kB)
Collecting safetensors>=0.4.0 (from kt-kernel==0.1.0)
Using cached safetensors-0.6.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.1 kB)
Collecting compressed-tensors>=0.7.0 (from kt-kernel==0.1.0)
Using cached compressed_tensors-0.12.2-py3-none-any.whl.metadata (7.0 kB)
Collecting numpy>=1.24.0 (from kt-kernel==0.1.0)
Using cached numpy-2.3.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (62 kB)
Collecting triton>=2.0.0 (from kt-kernel==0.1.0)
Using cached triton-3.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (1.7 kB)
Collecting black>=25.9.0 (from kt-kernel==0.1.0)
Using cached black-25.11.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (85 kB)
Collecting click>=8.0.0 (from black>=25.9.0->kt-kernel==0.1.0)
Using cached click-8.3.0-py3-none-any.whl.metadata (2.6 kB)
Collecting mypy-extensions>=0.4.3 (from black>=25.9.0->kt-kernel==0.1.0)
Using cached mypy_extensions-1.1.0-py3-none-any.whl.metadata (1.1 kB)
Collecting packaging>=22.0 (from black>=25.9.0->kt-kernel==0.1.0)
Using cached packaging-25.0-py3-none-any.whl.metadata (3.3 kB)
Collecting pathspec>=0.9.0 (from black>=25.9.0->kt-kernel==0.1.0)
Using cached pathspec-0.12.1-py3-none-any.whl.metadata (21 kB)
Collecting platformdirs>=2 (from black>=25.9.0->kt-kernel==0.1.0)
Using cached platformdirs-4.5.0-py3-none-any.whl.metadata (12 kB)
Collecting pytokens>=0.3.0 (from black>=25.9.0->kt-kernel==0.1.0)
Using cached pytokens-0.3.0-py3-none-any.whl.metadata (2.0 kB)
Collecting transformers (from compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached transformers-4.57.1-py3-none-any.whl.metadata (43 kB)
Collecting pydantic>=2.0 (from compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached pydantic-2.12.4-py3-none-any.whl.metadata (89 kB)
Collecting loguru (from compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached loguru-0.7.3-py3-none-any.whl.metadata (22 kB)
Collecting annotated-types>=0.6.0 (from pydantic>=2.0->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)
Collecting pydantic-core==2.41.5 (from pydantic>=2.0->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.3 kB)
Collecting typing-extensions>=4.14.1 (from pydantic>=2.0->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB)
Collecting typing-inspection>=0.4.2 (from pydantic>=2.0->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached typing_inspection-0.4.2-py3-none-any.whl.metadata (2.6 kB)
Collecting filelock (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached filelock-3.20.0-py3-none-any.whl.metadata (2.1 kB)
Collecting sympy>=1.13.3 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached sympy-1.14.0-py3-none-any.whl.metadata (12 kB)
Collecting networkx>=2.5.1 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached networkx-3.5-py3-none-any.whl.metadata (6.3 kB)
Collecting jinja2 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB)
Collecting fsspec>=0.8.5 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached fsspec-2025.10.0-py3-none-any.whl.metadata (10 kB)
Collecting nvidia-cuda-nvrtc-cu12==12.8.93 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl.metadata (1.7 kB)
Collecting nvidia-cuda-runtime-cu12==12.8.90 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.7 kB)
Collecting nvidia-cuda-cupti-cu12==12.8.90 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.7 kB)
Collecting nvidia-cudnn-cu12==9.10.2.21 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl.metadata (1.8 kB)
Collecting nvidia-cublas-cu12==12.8.4.1 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl.metadata (1.7 kB)
Collecting nvidia-cufft-cu12==11.3.3.83 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.7 kB)
Collecting nvidia-curand-cu12==10.3.9.90 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl.metadata (1.7 kB)
Collecting nvidia-cusolver-cu12==11.7.3.90 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl.metadata (1.8 kB)
Collecting nvidia-cusparse-cu12==12.5.8.93 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.8 kB)
Collecting nvidia-cusparselt-cu12==0.7.1 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl.metadata (7.0 kB)
Collecting nvidia-nccl-cu12==2.27.5 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.0 kB)
Collecting nvidia-nvshmem-cu12==3.3.20 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_nvshmem_cu12-3.3.20-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.1 kB)
Collecting nvidia-nvtx-cu12==12.8.90 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.8 kB)
Collecting nvidia-nvjitlink-cu12==12.8.93 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl.metadata (1.7 kB)
Collecting nvidia-cufile-cu12==1.13.1.3 (from torch>=2.0.0->kt-kernel==0.1.0)
Using cached nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.7 kB)
Collecting mpmath<1.4,>=1.1.0 (from sympy>=1.13.3->torch>=2.0.0->kt-kernel==0.1.0)
Using cached mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)
Collecting MarkupSafe>=2.0 (from jinja2->torch>=2.0.0->kt-kernel==0.1.0)
Using cached markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (2.7 kB)
Collecting huggingface-hub<1.0,>=0.34.0 (from transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached huggingface_hub-0.36.0-py3-none-any.whl.metadata (14 kB)
Collecting pyyaml>=5.1 (from transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (2.4 kB)
Collecting regex!=2019.12.17 (from transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached regex-2025.11.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (40 kB)
Collecting requests (from transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached requests-2.32.5-py3-none-any.whl.metadata (4.9 kB)
Collecting tokenizers<=0.23.0,>=0.22.0 (from transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached tokenizers-0.22.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB)
Collecting tqdm>=4.27 (from transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
Collecting hf-xet<2.0.0,>=1.1.3 (from huggingface-hub<1.0,>=0.34.0->transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached hf_xet-1.2.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.9 kB)
Collecting charset_normalizer<4,>=2 (from requests->transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (37 kB)
Collecting idna<4,>=2.5 (from requests->transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached idna-3.11-py3-none-any.whl.metadata (8.4 kB)
Collecting urllib3<3,>=1.21.1 (from requests->transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached urllib3-2.5.0-py3-none-any.whl.metadata (6.5 kB)
Collecting certifi>=2017.4.17 (from requests->transformers->compressed-tensors>=0.7.0->kt-kernel==0.1.0)
Using cached certifi-2025.10.5-py3-none-any.whl.metadata (2.5 kB)
Using cached black-25.11.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.6 MB)
Using cached click-8.3.0-py3-none-any.whl (107 kB)
Using cached compressed_tensors-0.12.2-py3-none-any.whl (183 kB)
Using cached mypy_extensions-1.1.0-py3-none-any.whl (5.0 kB)
Using cached numpy-2.3.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.9 MB)
Using cached packaging-25.0-py3-none-any.whl (66 kB)
Using cached pathspec-0.12.1-py3-none-any.whl (31 kB)
Using cached platformdirs-4.5.0-py3-none-any.whl (18 kB)
Using cached pydantic-2.12.4-py3-none-any.whl (463 kB)
Using cached pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB)
Using cached pytokens-0.3.0-py3-none-any.whl (12 kB)
Using cached safetensors-0.6.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (485 kB)
Using cached torch-2.9.0-cp311-cp311-manylinux_2_28_x86_64.whl (899.8 MB)
Using cached nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl (594.3 MB)
Using cached nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (10.2 MB)
Using cached nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl (88.0 MB)
Using cached nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (954 kB)
Using cached nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl (706.8 MB)
Using cached nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (193.1 MB)
Using cached nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.2 MB)
Using cached nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl (63.6 MB)
Using cached nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl (267.5 MB)
Using cached nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (288.2 MB)
Using cached nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl (287.2 MB)
Using cached nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (322.3 MB)
Using cached nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl (39.3 MB)
Using cached nvidia_nvshmem_cu12-3.3.20-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (124.7 MB)
Using cached nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (89 kB)
Using cached triton-3.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (170.4 MB)
Using cached fsspec-2025.10.0-py3-none-any.whl (200 kB)
Using cached networkx-3.5-py3-none-any.whl (2.0 MB)
Using cached sympy-1.14.0-py3-none-any.whl (6.3 MB)
Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Using cached typing_extensions-4.15.0-py3-none-any.whl (44 kB)
Using cached typing_inspection-0.4.2-py3-none-any.whl (14 kB)
Using cached filelock-3.20.0-py3-none-any.whl (16 kB)
Using cached jinja2-3.1.6-py3-none-any.whl (134 kB)
Using cached markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (22 kB)
Using cached loguru-0.7.3-py3-none-any.whl (61 kB)
Using cached transformers-4.57.1-py3-none-any.whl (12.0 MB)
Using cached huggingface_hub-0.36.0-py3-none-any.whl (566 kB)
Using cached hf_xet-1.2.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)
Using cached tokenizers-0.22.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)
Using cached pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (806 kB)
Using cached regex-2025.11.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (800 kB)
Using cached tqdm-4.67.1-py3-none-any.whl (78 kB)
Using cached requests-2.32.5-py3-none-any.whl (64 kB)
Using cached charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (151 kB)
Using cached idna-3.11-py3-none-any.whl (71 kB)
Using cached urllib3-2.5.0-py3-none-any.whl (129 kB)
Using cached certifi-2025.10.5-py3-none-any.whl (163 kB)
Building wheels for collected packages: kt-kernel
Building wheel for kt-kernel (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for kt-kernel (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [162 lines of output]
/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsWarning: license overwritten by pyproject.toml
corresp(dist, value, root_dir)
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-311/kt_kernel
copying python/experts_base.py -> build/lib.linux-x86_64-cpython-311/kt_kernel
copying python/experts.py -> build/lib.linux-x86_64-cpython-311/kt_kernel
copying python/init.py -> build/lib.linux-x86_64-cpython-311/kt_kernel
running egg_info
writing kt_kernel.egg-info/PKG-INFO
writing dependency_links to kt_kernel.egg-info/dependency_links.txt
writing requirements to kt_kernel.egg-info/requires.txt
writing top-level names to kt_kernel.egg-info/top_level.txt
reading manifest file 'kt_kernel.egg-info/SOURCES.txt'
writing manifest file 'kt_kernel.egg-info/SOURCES.txt'
running build_ext
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No .git directory found; skipping git hooks installation
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- CMAKE_CXX_FLAGS: -O3 -ffast-math
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- x86 detected
-- Found BLIS include at /usr/include/x86_64-linux-gnu
-- Found BLIS library /usr/lib/x86_64-linux-gnu/libblis.so
-- ARCH_FLAGS: -mfma;-mavx;-mavx2;-march=native
CMake Deprecation Warning at third_party/pybind11/CMakeLists.txt:13 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

    Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
    to tell CMake that the project requires at least <min> but has been updated
    to work with policies introduced by <max> or earlier.


  -- pybind11 v2.14.0 dev1
  -- Found PythonInterp: /home/k1/miniconda3/envs/kt/bin/python3.11 (found suitable version "3.11.14", minimum required is "3.7")
  -- Found PythonLibs: /home/k1/miniconda3/envs/kt/lib/libpython3.11.so
  -- Performing Test HAS_FLTO
  -- Performing Test HAS_FLTO - Success
  -- Found Git: /usr/bin/git (found version "2.34.1")
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Found OpenMP_C: -fopenmp (found version "4.5")
  -- Found OpenMP_CXX: -fopenmp (found version "4.5")
  -- OpenMP found
  -- Warning: ccache not found - consider installing it for faster compilation or disable this warning with LLAMA_CCACHE=OFF
  -- CMAKE_SYSTEM_PROCESSOR: x86_64
  -- x86 detected
  -- Looking for a CUDA compiler
  -- Looking for a CUDA compiler - /usr/local/cuda/bin/nvcc
  -- CUDA detected
  -- Found CUDAToolkit: /usr/local/cuda/targets/x86_64-linux/include (found version "12.8.61")
  -- enabling CUDA
  -- The CUDA compiler identification is NVIDIA 12.8.61 with host compiler GNU 11.4.0
  -- Detecting CUDA compiler ABI info
  -- Detecting CUDA compiler ABI info - done
  -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
  -- Detecting CUDA compile features
  -- Detecting CUDA compile features - done
  -- SOURCE_DIR7:
  CMake Warning at CMakeLists.txt:485 (message):
    clang-format not found.  Please install clang-format (>=18) or pass
    -DCLANG_FORMAT_BIN=/full/path and reconfigure.


  -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
  CMake Error at CMakeLists.txt:531 (message):
    FindHWLOC needs pkg-config program and PKG_CONFIG_PATH must contain the
    path to hwloc.pc file.


  -- Configuring incomplete, errors occurred!
  -- CPUINFER_USE_CUDA not set; auto-detected CUDA toolkit: YES
  Detected CPU info: {'vendor': 'amd', 'arch': 'x86_64', 'features': {'AVX2'}, 'raw': {'flags': {'rdtscp', 'nonstop_tsc', 'bmi2', '3dnowprefetch', 'rdseed', 'wdt', 'pclmulqdq', 'rdpru', 'sha_ni', 'succor', 'cqm_mbm_total', 'xsavec', 'fpu', 'avx', 'perfctr_core', 'aperfmperf', 'avx2', 'xgetbv1', 'rep_good', 'lahf_lm', 'cmp_legacy', 'ssbd', 'v_vmsave_vmload', 'clzero', 'cmov', 'mca', 'monitor', 'mba', 'bpext', 'nopl', 'stibp', 'nrip_save', 'vmmcall', 'sme', 'cx8', 'sep', 'misalignsse', 'topoext', 'clwb', 'clflush', 'cat_l3', 'adx', 'pge', 'mwaitx', 'ibrs', 'npt', 'xsaves', 'cpuid', 'sse4_1', 'lm', 'pni', 'aes', 'perfctr_nb', 'smep', 'lbrv', 'pae', 'sev_es', 'apic', 'svm', 'ibpb', 'syscall', 'mmxext', 'constant_tsc', 'cqm', 'smca', 'msr', 'fxsr', 'tsc', 'pat', 'abm', 'umip', 'vgif', 'fxsr_opt', 'overflow_recov', 'vme', 'avic', 'extd_apicid', 'decodeassists', 'cqm_mbm_local', 'rapl', 'mce', 'pfthreshold', 'tsc_scale', 'pse', 'tce', 'rdrand', 'xsaveerptr', 'sev', 'extapic', 'perfctr_llc', 'smap', 'cqm_occup_llc', 'fma', 'sse', 'popcnt', 'ht', 'cx16', 'ibs', 'flushbyasid', 'wbnoinvd', 'xsaveopt', 'hw_pstate', 'bmi1', 'movbe', 'rdpid', 'svm_lock', 'pausefilter', 'sse4a', 'vmcb_clean', 'osvw', 'v_spec_ctrl', 'arat', 'ibpb_exit_to_user', 'rdt_a', 'mmx', 'cqm_llc', 'mtrr', 'sse4_2', 'nx', 'cpb', 'ssse3', 'cr8_legacy', 'cdp_l3', 'f16c', 'clflushopt', 'skinit', 'xsave', 'irperf', 'sse2', 'fsgsbase', 'pdpe1gb', 'de', 'pse36'}}}
  -- Detected AMD CPU; enabling AMD MoE kernel (-DKTRANSFORMERS_CPU_MOE_AMD=ON)
  -- CPU detection: vendor=amd arch=x86_64 features=['AVX2']
  -- Enabling CUDA backend (-DKTRANSFORMERS_USE_CUDA=ON)
  -- CMake configure args:
      -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/k1/ktransformers/kt-kernel/build/lib.linux-x86_64-cpython-311/
      -DPYTHON_EXECUTABLE=/home/k1/miniconda3/envs/kt/bin/python3.11
      -DCMAKE_BUILD_TYPE=Release
      -DLLAMA_NATIVE=ON
      -DKTRANSFORMERS_CPU_MOE_AMD=ON
      -DKTRANSFORMERS_USE_CUDA=ON
  Traceback (most recent call last):
    File "/home/k1/miniconda3/envs/kt/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
      main()
    File "/home/k1/miniconda3/envs/kt/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/k1/miniconda3/envs/kt/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
      return _build_backend().build_wheel(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 435, in build_wheel
      return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 423, in _build
      return self._build_with_temp_dir(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
      exec(code, locals())
    File "<string>", line 330, in <module>
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 115, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 186, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
      self.run_command("build")
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
      cmd_obj.run()
    File "<string>", line 106, in run
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 96, in run
      _build_ext.run(self)
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 368, in run
      self.build_extensions()
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 484, in build_extensions
      self._build_extensions_serial()
    File "/tmp/pip-build-env-p1ahpgx8/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 510, in _build_extensions_serial
      self.build_extension(ext)
    File "<string>", line 298, in build_extension
    File "/home/k1/miniconda3/envs/kt/lib/python3.11/subprocess.py", line 571, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['cmake', '/home/k1/ktransformers/kt-kernel', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/k1/ktransformers/kt-kernel/build/lib.linux-x86_64-cpython-311/', '-DPYTHON_EXECUTABLE=/home/k1/miniconda3/envs/kt/bin/python3.11', '-DCMAKE_BUILD_TYPE=Release', '-DLLAMA_NATIVE=ON', '-DKTRANSFORMERS_CPU_MOE_AMD=ON', '-DKTRANSFORMERS_USE_CUDA=ON']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for kt-kernel
Failed to build kt-kernel
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> kt-kernel

Reproduction

repo installation:

conda create  -n ktransformers python=3.11
git clone https://github.com/kvcache-ai/ktransformers.git
cd ktransformers
git submodule update --init --recursive
cd kt-kernel
pip install .

clang installation:

wget https://apt.llvm.org/llvm.sh 
chmod u+x llvm.sh
sudo ./llvm.sh 18

Environment

Ubuntu 22.04.5 LTS
Eight RTX 4000 ADA
Single AMD EPYC 7402P

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions