From 9eb7fb9157f622bb2c87839788bbec1d5ef51ad2 Mon Sep 17 00:00:00 2001 From: Tyler Michael Smith Date: Fri, 16 Oct 2026 15:57:49 -0400 Subject: [PATCH] [Build] Remove unused `tools/install_deepgemm.sh` (#61265) Signed-off-by: Tyler Michael Smith Co-authored-by: Codex Co-authored-by: Misha Goin Co-authored-by: Kevin H. Luu --- .buildkite/test_areas/kernels.yaml | 1 - cmake/external_projects/deepgemm.cmake | 1 - tools/install_deepgemm.sh | 131 ------------------------- 3 files changed, 133 deletions(-) delete mode 100755 tools/install_deepgemm.sh diff --git a/.buildkite/test_areas/kernels.yaml b/.buildkite/test_areas/kernels.yaml index a1612bc3e8..aa2124e33f 100644 --- a/.buildkite/test_areas/kernels.yaml +++ b/.buildkite/test_areas/kernels.yaml @@ -545,7 +545,6 @@ steps: num_devices: 1 source_file_dependencies: - cmake/external_projects/deepgemm.cmake - - tools/install_deepgemm.sh - tools/build_deepgemm_C.py - tools/setup_deepgemm_pythons.sh - tools/check_wheel_deepgemm.py diff --git a/cmake/external_projects/deepgemm.cmake b/cmake/external_projects/deepgemm.cmake index 26eb5ffe6b..f92321db42 100644 --- a/cmake/external_projects/deepgemm.cmake +++ b/cmake/external_projects/deepgemm.cmake @@ -27,7 +27,6 @@ if(DEEPGEMM_SRC_DIR) set(deepgemm_SOURCE_DIR "${DEEPGEMM_SRC_DIR}") message(STATUS "DeepGEMM using local DEEPGEMM_SRC_DIR: ${deepgemm_SOURCE_DIR}") else() - # Keep in sync with tools/install_deepgemm.sh set(_DEEPGEMM_UPSTREAM_REPO "https://github.com/vllm-project/DeepGEMM.git") # Pinned to the fork's dev branch: upstream's 26/09/30 release (2.8.1) # plus the SM120 port, the SM90 paged-MQA kv_block=32/next_n=4 port, diff --git a/tools/install_deepgemm.sh b/tools/install_deepgemm.sh deleted file mode 100755 index b3f7ceb43f..0000000000 --- a/tools/install_deepgemm.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/bash -# Script to build and/or install DeepGEMM from source -# Default: build and install immediately -# Optional: build wheels to a directory for later installation (useful in multi-stage builds) -set -e - -# Default values -# Keep DEEPGEMM_GIT_REF in sync with cmake/external_projects/deepgemm.cmake -DEEPGEMM_GIT_REPO="https://github.com/vllm-project/DeepGEMM.git" -# NOTE: This targets the vLLM fork's dev branch: upstream's 26/09/30 release -# plus the sm120 and sm90 paged-MQA ports, the SwiGLU alpha/beta and SiTU -# Mega MoE activations, NVFP4 Mega MoE, and BF16/FP8/NVFP4 swiglustep. -# Uses the PyTorch 2.11 stable ABI and CPython 3.10 limited API. -DEEPGEMM_GIT_REF="a7a927731b109fdfec770df7c2a5be5d7e2216b5" -WHEEL_DIR="" - -# Parse command line arguments -while [[ $# -gt 0 ]]; do - case $1 in - --ref) - if [[ -z "$2" || "$2" =~ ^- ]]; then - echo "Error: --ref requires an argument." >&2 - exit 1 - fi - DEEPGEMM_GIT_REF="$2" - shift 2 - ;; - --cuda-version) - if [[ -z "$2" || "$2" =~ ^- ]]; then - echo "Error: --cuda-version requires an argument." >&2 - exit 1 - fi - CUDA_VERSION="$2" - shift 2 - ;; - --wheel-dir) - if [[ -z "$2" || "$2" =~ ^- ]]; then - echo "Error: --wheel-dir requires a directory path." >&2 - exit 1 - fi - WHEEL_DIR="$2" - shift 2 - ;; - -h|--help) - echo "Usage: $0 [OPTIONS]" - echo "Options:" - echo " --ref REF Git reference to checkout (default: $DEEPGEMM_GIT_REF)" - echo " --cuda-version VER CUDA version (auto-detected if not provided)" - echo " --wheel-dir PATH If set, build wheel into PATH but do not install" - echo " -h, --help Show this help message" - exit 0 - ;; - *) - echo "Unknown option: $1" >&2 - exit 1 - ;; - esac -done - -# Auto-detect CUDA version if not provided -if [ -z "$CUDA_VERSION" ]; then - if command -v nvcc >/dev/null 2>&1; then - CUDA_VERSION=$(nvcc --version | grep "release" | sed -n 's/.*release \([0-9]\+\.[0-9]\+\).*/\1/p') - echo "Auto-detected CUDA version: $CUDA_VERSION" - else - echo "Warning: Could not auto-detect CUDA version. Please specify with --cuda-version" - exit 1 - fi -fi - -# Extract major and minor version numbers -CUDA_MAJOR="${CUDA_VERSION%%.*}" -CUDA_MINOR="${CUDA_VERSION#"${CUDA_MAJOR}".}" -CUDA_MINOR="${CUDA_MINOR%%.*}" -echo "CUDA version: $CUDA_VERSION (major: $CUDA_MAJOR, minor: $CUDA_MINOR)" - -# Check CUDA version requirement -if [ "$CUDA_MAJOR" -lt 12 ] || { [ "$CUDA_MAJOR" -eq 12 ] && [ "$CUDA_MINOR" -lt 8 ]; }; then - echo "Skipping DeepGEMM build/installation (requires CUDA 12.8+ but got ${CUDA_VERSION})" - exit 0 -fi - -echo "Preparing DeepGEMM build..." -echo "Repository: $DEEPGEMM_GIT_REPO" -echo "Reference: $DEEPGEMM_GIT_REF" - -# Create a temporary directory for the build -INSTALL_DIR=$(mktemp -d) -trap 'rm -rf "$INSTALL_DIR"' EXIT - -# Clone the repository -git clone --recursive --shallow-submodules "$DEEPGEMM_GIT_REPO" "$INSTALL_DIR/deepgemm" -pushd "$INSTALL_DIR/deepgemm" - -# Checkout the specific reference -git checkout "$DEEPGEMM_GIT_REF" -git submodule sync --recursive -git submodule update --init --recursive - -# Clean previous build artifacts -# (Based on https://github.com/deepseek-ai/DeepGEMM/blob/main/install.sh) -rm -rf -- build dist *.egg-info 2>/dev/null || true - -# Build wheel -echo "🏗️ Building DeepGEMM wheel..." -python3 setup.py bdist_wheel - -# If --wheel-dir was specified, copy wheels there and exit -if [ -n "$WHEEL_DIR" ]; then - mkdir -p "$WHEEL_DIR" - cp dist/*.whl "$WHEEL_DIR"/ - echo "✅ Wheel built and copied to $WHEEL_DIR" - popd - exit 0 -fi - -# Default behaviour: install built wheel -if command -v uv >/dev/null 2>&1; then - echo "Installing DeepGEMM wheel using uv..." - if [ -n "$VLLM_DOCKER_BUILD_CONTEXT" ]; then - uv pip install --system dist/*.whl - else - uv pip install dist/*.whl - fi -else - echo "Installing DeepGEMM wheel using pip..." - python3 -m pip install dist/*.whl -fi - -popd -echo "✅ DeepGEMM installation completed successfully"