File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed
Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 2929/3rdparty /cmdline
3030/3rdparty /sentencepiece
3131/3rdparty /xdnn
32+ /3rdparty /gpudnn
3233
3334
3435# MLServer
Original file line number Diff line number Diff line change @@ -116,6 +116,13 @@ link_directories(${CMAKE_SOURCE_DIR}/3rdparty/onednn/build/src)
116116link_directories (${CMAKE_SOURCE_DIR} /3rdparty/xdnn)
117117link_directories (${CMAKE_SOURCE_DIR} /3rdparty/mkl/lib)
118118
119+ if (WITH_GPU)
120+ include ("cmake/gpudnn.cmake" )
121+ include_directories (${CMAKE_SOURCE_DIR} /3rdparty/gpudnn)
122+ link_directories (${CMAKE_SOURCE_DIR} /3rdparty/gpudnn)
123+ list (APPEND DEPEND_LIST "gpudnn_lib" )
124+ endif ()
125+
119126find_package (oneCCL REQUIRED)
120127
121128if (MPI_FOUND AND oneCCL_FOUND)
@@ -143,9 +150,15 @@ option(BUILD_WITH_SHARED_LIBS "Build with shared libraries" OFF)
143150if (BUILD_WITH_SHARED_LIBS)
144151 message (STATUS "Notice: Building with shared libraries." )
145152 list (APPEND 3RDPART_LIB_LIST "xdnn" )
153+ if (WITH_GPU)
154+ list (APPEND 3RDPART_LIB_LIST "gpudnn" )
155+ endif ()
146156else ()
147157 message (STATUS "Notice: Building with static libraries." )
148158 list (APPEND 3RDPART_LIB_LIST "xdnn_static" )
159+ if (WITH_GPU)
160+ list (APPEND 3RDPART_LIB_LIST "gpudnn_static" )
161+ endif ()
149162endif ()
150163
151164# pipeline parallel feature
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2024 Intel Corporation
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+ # ============================================================================
15+
16+ cmake_minimum_required (VERSION 3.18)
17+
18+ # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
19+ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0" )
20+ cmake_policy (SET CMP0135 NEW)
21+ endif ()
22+
23+ project (dependency NONE)
24+
25+ include (ExternalProject)
26+
27+ # cmake-format: off
28+ ExternalProject_Add(gpudnn_lib
29+ URL https://github.com/intel/xFasterTransformer/releases/download/gpuDNN/gpudnn_v0.1.tar.gz
30+ URL_HASH MD5=05b3554413e454ed027014e44a5c7fe4
31+ TIMEOUT 60
32+ SOURCE_DIR ${CMAKE_SOURCE_DIR} /3rdparty/gpudnn
33+ CONFIGURE_COMMAND ""
34+ BUILD_COMMAND ""
35+ INSTALL_COMMAND ""
36+ TEST_COMMAND ""
37+ )
38+ # cmake-format: on
You can’t perform that action at this time.
0 commit comments