vstrt/{trtexec}/CMakeLists.txt: linking cublas #211
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build (Windows-TRT) | |
on: | |
push: | |
paths: | |
- 'vstrt/**' | |
- '.github/workflows/windows-trt.yml' | |
workflow_call: | |
inputs: | |
tag: | |
description: 'which tag to upload to' | |
required: true | |
type: string | |
secrets: | |
REPO_TOKEN: | |
required: true | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'which tag to upload to' | |
default: '' | |
jobs: | |
build-windows: | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: cmd | |
working-directory: vstrt | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Setup Ninja | |
run: pip install ninja | |
- name: Cache CUDA | |
id: cache-cuda | |
uses: actions/cache@v3 | |
with: | |
path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA | |
key: ${{ runner.os }}-vstrt-cuda-12.2.2 | |
- name: Setup CUDA | |
if: steps.cache-cuda.outputs.cache-hit != 'true' | |
run: | | |
curl -s -o cuda_installer.exe -L https://developer.download.nvidia.com/compute/cuda/12.2.2/network_installers/cuda_12.2.2_windows_network.exe | |
cuda_installer.exe -s nvcc_12.2 cudart_12.2 nvprof_12.2 cuda_profiler_api_12.2 thrust_12.2 cublas_dev_12.2 | |
- name: Checkout tensorrt | |
uses: actions/checkout@v3 | |
with: | |
repository: AmusementClub/cuda | |
token: ${{ secrets.REPO_TOKEN }} | |
ref: tensorrt-9.1.0 | |
path: tensorrt | |
- name: Download VapourSynth headers | |
run: | | |
curl -s -o vs.zip -L https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R54.zip | |
unzip -q vs.zip | |
mv vapoursynth-*/ vapoursynth/ | |
- name: Configure | |
run: cmake -S . -B build -G Ninja -LA | |
-D CMAKE_BUILD_TYPE=Release | |
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded | |
-D CUDAToolkit_ROOT="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2" | |
-D VAPOURSYNTH_INCLUDE_DIRECTORY="%cd%\vapoursynth\include" | |
-D TENSORRT_HOME="%cd%\..\tensorrt\tensorrt" | |
-D USE_NVINFER_PLUGIN=ON | |
- name: Build | |
run: cmake --build build --config Release --verbose | |
- name: Install | |
run: cmake --install build --prefix install | |
- name: Checkout TensorRT OSS | |
uses: actions/checkout@v3 | |
with: | |
repository: NVIDIA/TensorRT | |
ref: v9.1.0 | |
fetch-depth: 1 | |
path: tensorrt-oss | |
- name: Override trtexec CMake file | |
run: | | |
mv trtexec/CMakeLists.txt ../tensorrt-oss/samples/trtexec | |
mv trtexec/*.cpp ../tensorrt-oss/samples/trtexec | |
- name: Configure trtexec | |
run: cmake -S ../tensorrt-oss/samples/trtexec -B build_trtexec -G Ninja | |
-D CMAKE_BUILD_TYPE=Release | |
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded | |
-D CUDAToolkit_ROOT="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2" | |
-D TENSORRT_HOME="%cd%\..\tensorrt\tensorrt" | |
- name: Build trtexec | |
run: cmake --build build_trtexec --verbose | |
- name: Install trtexec | |
run: cmake --install build_trtexec --prefix trtexec | |
- name: Prepare for upload | |
run: | | |
mkdir artifact | |
copy install\bin\vstrt.dll artifact\ | |
mkdir artifact\vsmlrt-cuda | |
copy trtexec\bin\trtexec.exe artifact\vsmlrt-cuda | |
- name: Describe | |
run: git describe --tags --long | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: VSTRT-Windows-x64 | |
path: vstrt/artifact | |
- name: Compress artifact for release | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' | |
run: | | |
cd artifact | |
7z a -t7z -mx=7 ../../VSTRT-Windows-x64.${{ github.event.inputs.tag }}.7z . | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' | |
with: | |
tag_name: ${{ inputs.tag }} | |
files: VSTRT-Windows-x64.${{ github.event.inputs.tag }}.7z | |
fail_on_unmatched_files: true | |
generate_release_notes: false | |
prerelease: true |