Skip to content

Commit

Permalink
some bugfix
Browse files Browse the repository at this point in the history
- uuid crash issue
- update lora implement
- set page size by param
- delete deprecated files
  • Loading branch information
laiwenzh committed Dec 20, 2024
1 parent 0174d94 commit 163850f
Show file tree
Hide file tree
Showing 121 changed files with 3,886 additions and 4,653 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "third_party/from_source/cutlass"]
path = third_party/from_source/cutlass
url = https://github.com/NVIDIA/cutlass.git
path = third_party/from_source/cutlass
url = https://github.com/NVIDIA/cutlass.git
15 changes: 6 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ set(CONFIG_HOST_CPU_TYPE "X86" CACHE STRING "host cpu type, like X86, ARMV9, etc
##
option(ENABLE_NV_STATIC_LIB "build with static lib of nvidia" OFF)
option(USE_SYSTEM_NV_LIB "use system nccl lib instead download binary." OFF)
option(BUILD_HIEDNN "build HIE-DNN from source" OFF)
option(ENABLE_CUDA_PINNED_WEIGHT_LOAD "enable cuda pinned memory for load weight" OFF)
option(ENABLE_SPAN_ATTENTION "enable build with span attention" ON)
option(ENABLE_MULTINUMA "enable multinuma, if on cpu multinuma service will be compiled" OFF)
Expand Down Expand Up @@ -174,18 +175,14 @@ if(LOCK_CHECK)
endif()

if (ENABLE_CUDA)
include(cuda)
list(APPEND ALLSPARK_DEFINITION "-DENABLE_CUDA")

if (ENABLE_CUSPARSELT)
set(ENABLE_CUSPARSELT ON)
list(APPEND ALLSPARK_DEFINITION "-DENABLE_CUSPARSELT")
endif()

if (ENABLE_CUSPARSELT)
list(APPEND ALLSPARK_DEFINITION "-DENABLE_CUSPARSELT")
endif()
include(cuda)
if (ENABLE_SPARSE)
list(APPEND ALLSPARK_DEFINITION "-DENABLE_SPARSE")
list(APPEND ALLSPARK_DEFINITION "-DENABLE_SPARSE")
endif()

if (ENABLE_FP8)
list(APPEND ALLSPARK_DEFINITION "-DENABLE_FP8")
endif()
Expand Down
12 changes: 7 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ with_platform="${AS_PLATFORM:-cuda}"
cuda_version="${AS_CUDA_VERSION:-12.4}"
cuda_sm="${AS_CUDA_SM:-80;86;90a}"
NCCL_VERSION="${AS_NCCL_VERSION:-2.23.4}"
build_folder="${AS_BUILD_FOLDER:-build}"

## NCCL Version Map:
## the corresponding pre-build nccl will download on oss.
Expand All @@ -22,9 +23,9 @@ build_type="${AS_BUILD_TYPE:-Release}"
cuda_static="${AS_CUDA_STATIC:-OFF}"
build_package="${AS_BUILD_PACKAGE:-ON}"
enable_glibcxx11_abi="${AS_CXX11_ABI:-OFF}"
build_hiednn="${AS_BUILD_HIEDNN:-ON}"
enable_span_attn="${ENABLE_SPAN_ATTENTION:-ON}"
enable_multinuma="${ENABLE_MULTINUMA:-OFF}"

function clone_pull {
GIT_URL=$1
DIRECTORY=$2
Expand All @@ -42,11 +43,11 @@ function clone_pull {
}

if [ "$clean" == "ON" ]; then
rm -rf build
rm -rf ${build_folder}
fi

if [ ! -d "./build" ]; then
mkdir build && cd build
if [ ! -d "./${build_folder}" ]; then
mkdir ${build_folder} && cd ${build_folder}

conan profile new dashinfer_compiler_profile --detect --force
conanfile=../conan/conanfile.txt
Expand Down Expand Up @@ -74,7 +75,7 @@ if [ ! -d "./build" ]; then
cd ../
fi

cd build
cd ${build_folder}
source ./activate.sh
export PATH=`pwd`/bin:$PATH

Expand All @@ -94,6 +95,7 @@ if [ "${with_platform,,}" == "cuda" ]; then
-DBUILD_PYTHON=OFF \
-DALWAYS_READ_LOAD_MODEL=OFF \
-DENABLE_SPAN_ATTENTION=${enable_span_attn} \
-DBUILD_HIEDNN=${build_hiednn} \
-DENABLE_MULTINUMA=OFF
elif [ "${with_platform,,}" == "x86" ]; then
cmake .. \
Expand Down
46 changes: 0 additions & 46 deletions cmake/FindHIEDNN.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions cmake/cutlass.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ 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)
message(STATUS "Use cutlass from submodule")
set(CUTLASS_SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/from_source/cutlass)

include(ExternalProject)

Expand Down
6 changes: 0 additions & 6 deletions cmake/flash-attention.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ else()
set(FLASHATTN_LIBRARY_NAME libflash-attn.so)
endif()

option(FLASHATTN_BUILD_FROM_SOURCE "build flash-attn from source or use prebuilt lib" ON)
# make sure you copy prebuild and source code under csrc together, to avoid header aligment issue.

include(ExternalProject)

if (FLASHATTN_BUILD_FROM_SOURCE)
message(STATUS "build flash-attention from source")

message(STATUS "Use flash-attention from external project")
Expand Down Expand Up @@ -78,9 +75,6 @@ if (FLASHATTN_BUILD_FROM_SOURCE)
ExternalProject_Get_Property(project_flashattn SOURCE_SUBDIR)
set(FLASHATTN_INCLUDE_DIR ${SOURCE_DIR}/${SOURCE_SUBDIR})

else() # FLASHATTN_BUILD_FROM_SOURCE
message(FATAL_ERROR "flash attention build only support source code build.")
endif() # FLASHATTN_BUILD_FROM_SOURCE

message(STATUS "FLASHATTN_LIBRARY_PATH: ${FLASHATTN_LIBRARY_PATH}")
message(STATUS "FLASHATTN_INCLUDE_DIR: ${FLASHATTN_INCLUDE_DIR}")
Expand Down
3 changes: 2 additions & 1 deletion cmake/hie-dnn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ set(HIEDNN_LIBRARY_PATH ${HIEDNN_INSTALL}/lib64/libhiednn_static.a)
message(STATUS "HIEDNN_INSTALL: ${HIEDNN_INSTALL}")
message(STATUS "HIEDNN_LIBRARY_PATH: ${HIEDNN_LIBRARY_PATH}")

set(HIEDNN_SOURCE_DIR ${PROJECT_SOURCE_DIR}/HIE-DNN)
set(HIEDNN_SOURCE_DIR ${PROJECT_SOURCE_DIR}/HIE-DNN)
message(STATUS "Build HIE-DNN in: ${HIEDNN_SOURCE_DIR}")

include(ExternalProject)

Expand Down
2 changes: 1 addition & 1 deletion csrc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ set(ALLSPARK_INC_DIR
${CMAKE_BINARY_DIR}/csrc
)

list(APPEND ALLSPARK_INC_DIR ${PROJECT_SOURCE_DIR}/third_party/from_source/cutlass/include)
list(APPEND ALLSPARK_INC_DIR ${PROJECT_SOURCE_DIR}/third_party/from_source/cutlass/include)

set(ALLSPARK_3RD_LIBS
${THREAD_LIB}
Expand Down
Loading

0 comments on commit 163850f

Please sign in to comment.