Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/build-check-share-runner.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Build Check
name: Build Check with Shared Runner
# docker download mirror should setup in self host machine.
# the mirror status can be found at : https://status.daocloud.io/status/docker
on:
pull_request:
merge_group:
workflow_dispatch:


Expand All @@ -17,7 +15,7 @@ jobs:
exclude:
- arch: X64
image: "dev-centos8-arm:v2"
on-runs: ubuntu-22.04
runs-on: ubuntu-22.04
container:
image: dashinfer/${{ matrix.image }}
env:
Expand Down
50 changes: 11 additions & 39 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,27 @@ jobs:
env:
# force use node16 instead of node20
# otherwise it may cause GLIBCXX_2.27 not found
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
# ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
ENABLE_CUDA: ${{ matrix.enable_cuda }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: false

- name: Pull LFS
run: |
git lfs install --force
git lfs pull

- name: Init submodule
run: |
git submodule init
git submodule update
lfs: true
submodules: true

- name: Build tgz package
shell: bash
run: |
git config --global --add safe.directory /__w/dash-infer/dash-infer
source /root/.bashrc
if [ -f "/miniconda/etc/profile.d/conda.sh" ]; then
source /miniconda/etc/profile.d/conda.sh
fi
source activate ds_py

git fetch --tags
TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')

export AS_RELEASE_VERSION=$VERSION_NUMBER

echo "ENABLE_CUDA value: $ENABLE_CUDA"

# export ENABLE_MULTINUMA="ON"
Expand Down Expand Up @@ -92,36 +77,23 @@ jobs:
# otherwise it may cause GLIBCXX_2.27 not found
# ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
ENABLE_CUDA: ${{ matrix.enable_cuda }}
BUILD_VERSION: 3.10
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: false

- name: Pull LFS
run: |
git lfs install --force
git lfs pull

- name: Init submodule
run: |
git submodule init
git submodule update
lfs: true
submodules: true

- name: Build manylinux wheels
shell: bash
run: |
git config --global --add safe.directory /__w/dash-infer/dash-infer
source /root/.bashrc
if [ -f "/miniconda/etc/profile.d/conda.sh" ]; then
source /miniconda/etc/profile.d/conda.sh
fi

git fetch --tags
TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')

export AS_RELEASE_VERSION=$VERSION_NUMBER

echo "ENABLE_CUDA value: $ENABLE_CUDA"

if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
Expand All @@ -130,7 +102,7 @@ jobs:
if [ "$ENABLE_CUDA" -eq "1" ];
then
export AS_PLATFORM="cuda"
export AS_CUDA_SM="'70;75;80;86;89;90a'"
export AS_CUDA_SM="'80;90a'"
bash scripts/release/python_manylinux_build_cuda.sh
else
bash scripts/release/python_manylinux_build.sh
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "third_party/from_source/cutlass"]
path = third_party/from_source/cutlass
url = https://github.com/NVIDIA/cutlass.git
65 changes: 44 additions & 21 deletions cmake/cutlass.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,58 @@ set(CUTLASS_NVCC_ARCHS ${CMAKE_CUDA_ARCHITECTURES} CACHE STRING "The SM architec
set(CUTLASS_INSTALL ${INSTALL_LOCATION}/cutlass/install)
message(STATUS "CUTLASS_INSTALL: ${CUTLASS_INSTALL}")

message(STATUS "Use cutlass from submodule")
set(CUTLASS_SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/from_source/cutlass)
# 核心修复方案
set(CUTLASS_SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/from_source/cutlass)
set(CUTLASS_PACKAGE_FILE ${PROJECT_SOURCE_DIR}/third_party/cutlass_3.5.0.tgz)

# 验证文件存在性
if(NOT EXISTS "${CUTLASS_PACKAGE_FILE}")
message(FATAL_ERROR "Required package not found: ${CUTLASS_PACKAGE_FILE}")
endif()

include(ExternalProject)

ExternalProject_Add(
project_cutlass
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/cutlass
SOURCE_DIR ${CUTLASS_SOURCE_DIR}
CMAKE_GENERATOR "Ninja"
BUILD_COMMAND ${CMAKE_COMMAND} --build . -j32 -v
CMAKE_ARGS
-DCUTLASS_ENABLE_TESTS=${CUTLASS_ENABLE_TESTS}
-DCUTLASS_ENABLE_TOOLS=${CUTLASS_ENABLE_TOOLS}
-DCUTLASS_ENABLE_EXAMPLES=${CUTLASS_ENABLE_EXAMPLES}
-DCUTLASS_NVCC_ARCHS=${CUTLASS_NVCC_ARCHS}
-DCMAKE_INSTALL_PREFIX=${CUTLASS_INSTALL}
project_cutlass
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/cutlass
URL file://${CUTLASS_PACKAGE_FILE}
URL_HASH SHA256=40a3e0eca7d713d6d23db34f6527244f71442149708a87fe736282c952f83d60 # 替换为实际文件哈希
SOURCE_DIR ${CUTLASS_SOURCE_DIR}
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS
-DCUTLASS_ENABLE_TESTS=${CUTLASS_ENABLE_TESTS}
-DCUTLASS_ENABLE_TOOLS=${CUTLASS_ENABLE_TOOLS}
-DCUTLASS_ENABLE_EXAMPLES=${CUTLASS_ENABLE_EXAMPLES}
-DCUTLASS_NVCC_ARCHS=${CUTLASS_NVCC_ARCHS}
-DCMAKE_INSTALL_PREFIX=${CUTLASS_INSTALL}
-DBUILD_TESTING=OFF
-DBUILD_BENCHMARKS=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_GEMM_TESTS=OFF
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} -j${NPROC}
INSTALL_COMMAND ${CMAKE_COMMAND} --install . --config ${CMAKE_BUILD_TYPE}
UPDATE_COMMAND ""
PATCH_COMMAND ""
)

unset(CUTLASS_ENABLE_TESTS)
unset(CUTLASS_ENABLE_TOOLS)
unset(CUTLASS_ENABLE_EXAMPLES)
unset(CUTLASS_NVCC_ARCHS)
# 依赖关系处理
#add_dependencies(your_project_target project_cutlass)

# ExternalProject_Get_Property(project_cutlass BINARY_DIR)
ExternalProject_Get_Property(project_cutlass SOURCE_DIR)
# 路径配置
ExternalProject_Get_Property(project_cutlass INSTALL_DIR)
set(CUTLASS_INCLUDE_DIR ${SOURCE_DIR}/include)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${CUTLASS_INSTALL}")
set(CUTLASS_INCLUDE_DIR ${INSTALL_DIR}/include)
set(CUTLASS_LIBRARY_DIR ${INSTALL_DIR}/lib)
set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${INSTALL_DIR}")

# 验证输出
message(STATUS "CUTLASS_INCLUDE_DIR: ${CUTLASS_INCLUDE_DIR}")
message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
message(STATUS "CUDA_ARCHITECTURES: ${CUTLASS_NVCC_ARCHS}")
message("===========================")

# 清理临时变量
unset(CUTLASS_ENABLE_TESTS)
unset(CUTLASS_ENABLE_TOOLS)
unset(CUTLASS_ENABLE_EXAMPLES)
unset(CUTLASS_NVCC_ARCHS)

1 change: 0 additions & 1 deletion csrc/core/kernel/cuda/xformer_mha/debug_utils.h

This file was deleted.

Loading
Loading