File tree Expand file tree Collapse file tree 5 files changed +122
-11
lines changed Expand file tree Collapse file tree 5 files changed +122
-11
lines changed Original file line number Diff line number Diff line change
1
+ name : linux-x64-gpu
2
+ on :
3
+ push :
4
+ paths :
5
+ - ' .github/workflows/linux-x64-gpu.yml'
6
+ - ' src/**'
7
+ - ' CMakeLists.txt'
8
+ pull_request :
9
+ paths :
10
+ - ' .github/workflows/linux-x64-gpu.yml'
11
+ - ' src/**'
12
+ - ' CMakeLists.txt'
13
+ concurrency :
14
+ group : linux-x64-gpu-${{ github.ref }}
15
+ cancel-in-progress : true
16
+ permissions :
17
+ contents : read
18
+
19
+ jobs :
20
+ build :
21
+ strategy :
22
+ matrix :
23
+ cudaver : [11.8, 12.1]
24
+ name : cuda-${{ matrix.cudaver }}
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - name : Free disk space
28
+ uses : jlumbroso/free-disk-space@main
29
+ with :
30
+ # This might remove tools that are actually needed, if set to "true" but frees about 6 GB
31
+ tool-cache : false
32
+ docker-images : false
33
+ # All of these default to true, but feel free to set to "false" if necessary for your workflow
34
+ android : true
35
+ dotnet : true
36
+ haskell : true
37
+ large-packages : true
38
+ swap-storage : false
39
+ - name : Checkout repository
40
+ uses : actions/checkout@v3
41
+ - name : Build
42
+ uses : addnab/docker-run-action@v3
43
+ with :
44
+ image : openmmlab/lmdeploy-builder:cuda${{ matrix.cudaver }}
45
+ options : -v ${{ github.workspace }}:/work
46
+ run : |
47
+ cd /work
48
+ source /opt/conda/bin/activate
49
+ conda activate py38
50
+ mkdir build && cd build
51
+ cmake .. \
52
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
53
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
54
+ -DCMAKE_INSTALL_PREFIX=./install \
55
+ -DCMAKE_CUDA_FLAGS="-lineinfo" \
56
+ -DUSE_NVTX=ON \
57
+ -DBUILD_TEST=ON
58
+ make -j$(nproc) && make install
59
+ cd ..
60
+ rm -rf build
61
+ python setup.py bdist_wheel --plat-name manylinux2014_x86_64 -d /tmp
Original file line number Diff line number Diff line change
1
+ name : windows-x64-gpu
2
+ on :
3
+ push :
4
+ paths :
5
+ - ' .github/workflows/windows-x64-gpu.yml'
6
+ - ' src/**'
7
+ - ' CMakeLists.txt'
8
+ pull_request :
9
+ paths :
10
+ - ' .github/workflows/windows-x64-gpu.yml'
11
+ - ' src/**'
12
+ - ' CMakeLists.txt'
13
+ concurrency :
14
+ group : windows-x64-gpu-${{ github.ref }}
15
+ cancel-in-progress : true
16
+ permissions :
17
+ contents : read
18
+
19
+ jobs :
20
+ build :
21
+ strategy :
22
+ matrix :
23
+ cudaver : [11.8.0, 12.1.0]
24
+ name : cuda-${{ matrix.cudaver }}
25
+ runs-on : windows-latest
26
+ steps :
27
+ - name : Checkout repository
28
+ uses : actions/checkout@v3
29
+ - name : Set up python
30
+ uses : actions/setup-python@v4
31
+ with :
32
+ python-version : ' 3.8'
33
+ - name : Install python packages
34
+ run : |
35
+ pip install -r requirements/build.txt
36
+ pip install wheel
37
+ - name : Setup CUDA Toolkit
38
+ id : cuda-toolkit
39
+ shell : pwsh
40
+ run : ./builder/windows/setup_cuda.ps1
41
+ env :
42
+ INPUT_CUDA_VERSION : ${{ matrix.cudaver }}
43
+ - name : Build wheel
44
+ run : |
45
+ $env:BUILD_TEST="ON"
46
+ mkdir build
47
+ cd build
48
+ ..\builder\windows\generate.ps1
49
+ cmake --build . --config Release -- /m /v:q
50
+ if (-Not $?) {
51
+ echo "build failed"
52
+ exit 1
53
+ }
54
+ cmake --install . --config Release
55
+ cd ..
56
+ rm build -Force -Recurse
57
+ python setup.py bdist_wheel -d build/wheel
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- cmake_minimum_required (VERSION 3.18 FATAL_ERROR )
15
+ cmake_minimum_required (VERSION 3.11 FATAL_ERROR )
16
16
project (TurboMind LANGUAGES CXX CUDA )
17
17
18
18
find_package (CUDA 11.4 REQUIRED )
19
19
20
-
21
- set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} /cmake/Modules )
22
-
23
20
option (BUILD_TEST "Build tests" OFF )
24
21
25
22
include (FetchContent )
@@ -51,8 +48,6 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold")
51
48
set (CUDA_PATH ${CUDA_TOOLKIT_ROOT_DIR} )
52
49
53
50
54
- list (APPEND CMAKE_MODULE_PATH ${CUDA_PATH} /lib64 )
55
-
56
51
# profiling
57
52
option (USE_NVTX "Whether or not to use nvtx" ON )
58
53
if (USE_NVTX )
Original file line number Diff line number Diff line change 10
10
cmake ${builder} .. \
11
11
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
12
12
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
13
+ -DCMAKE_INSTALL_PREFIX=${WORKSPACE_PATH} /install \
13
14
-DCMAKE_CUDA_FLAGS=" -lineinfo" \
14
15
-DUSE_NVTX=ON \
15
- -DBUILD_TEST=ON \
16
- -DFETCHCONTENT_UPDATES_DISCONNECTED=ON \
17
- -DLMDEPLOY_ASAN_ENABLE=OFF \
18
- -DLMDEPLOY_UBSAN_ENABLE=OFF \
19
- -DCMAKE_CUDA_ARCHITECTURES=" 80-real"
16
+ -DBUILD_TEST=OFF
Original file line number Diff line number Diff line change 5
5
#include " src/turbomind/kernels/gemm/gemm.h"
6
6
#include " src/turbomind/kernels/gemm/types.h"
7
7
#include " src/turbomind/utils/cuda_utils.h"
8
+ #include " src/turbomind/utils/macro.h"
8
9
#include < cuda_fp16.h>
9
10
#include < cuda_runtime.h>
10
11
#include < fstream>
You can’t perform that action at this time.
0 commit comments