sycl_source/source.cpp: fix sycl error handling #73
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) | |
on: | |
push: | |
paths: | |
- 'CMakeLists.txt' | |
- 'source/*' | |
- 'rtc_source/*' | |
- 'sycl_source/*' | |
- '.github/workflows/windows.yml' | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'which tag to upload to' | |
default: '' | |
jobs: | |
build-windows: | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: cmd | |
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 }}-cuda-11.8.0 | |
- 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/11.8.0/network_installers/cuda_11.8.0_windows_network.exe | |
cuda_installer.exe -s nvcc_11.8 cudart_11.8 nvrtc_dev_11.8 | |
- name: Download VapourSynth headers | |
run: | | |
curl -s -o vs.zip -L https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R57.zip | |
unzip -q vs.zip | |
mv vapoursynth-*/ vapoursynth/ | |
- name: Configure (CUDA) | |
run: cmake -S . -B build -G Ninja -LA | |
-D CMAKE_BUILD_TYPE=Release | |
-D USE_NVRTC_STATIC=ON | |
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded | |
-D VAPOURSYNTH_INCLUDE_DIRECTORY="%cd%\vapoursynth\include" | |
-D CMAKE_CXX_FLAGS="/fp:fast /arch:AVX" | |
-D CMAKE_CUDA_FLAGS="--threads 0 --use_fast_math --resource-usage -Wno-deprecated-gpu-targets" | |
-D CMAKE_CUDA_ARCHITECTURES="50;61-real;75-real;86-real;89-real" | |
env: | |
CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 | |
- name: Build (CUDA) | |
run: cmake --build build --verbose | |
- name: Install (CUDA) | |
run: cmake --install build --prefix install | |
- name: Cache SYCL | |
id: cache-sycl | |
uses: actions/cache@v3 | |
with: | |
path: C:\Program Files (x86)\Intel\oneAPI | |
key: ${{ runner.os }}-dpcpp-2023.2.2 | |
- name: Setup SYCL | |
if: steps.cache-sycl.outputs.cache-hit != 'true' | |
run: | | |
curl -J -o dpcpp_installer.exe https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c08746d2-5669-4ef8-9fc8-1ec330b3ac3b/w_dpcpp-cpp-compiler_p_2023.2.2.49534_offline.exe | |
dpcpp_installer -s -a -s --eula accept | |
- name: Configure (SYCL) | |
run: | | |
call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" | |
cmake -S . -B build_sycl -G Ninja -LA ^ | |
-D CMAKE_BUILD_TYPE=Release ^ | |
-D ENABLE_CUDA=OFF ^ | |
-D ENABLE_CUDA_RTC=OFF ^ | |
-D ENABLE_SYCL=ON ^ | |
-D VAPOURSYNTH_INCLUDE_DIRECTORY="%cd%\vapoursynth\include" ^ | |
-D CMAKE_CXX_COMPILER=icx ^ | |
-D CMAKE_CXX_FLAGS="-ffast-math -mavx2" | |
- name: Build (SYCL) | |
run: | | |
call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" | |
cmake --build build_sycl --verbose | |
- name: Install (SYCL) | |
run: cmake --install build_sycl --prefix install | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: BilateralGPU-Windows | |
path: install/bin/*.dll | |
- name: Compress artifact for release | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' | |
run: | | |
cd install | |
mkdir VapourSynth-BilateralGPU-${{ github.event.inputs.tag }} | |
echo f | xcopy bin\bilateralgpu.dll VapourSynth-BilateralGPU-${{ github.event.inputs.tag }}\BilateralGPU.dll /f | |
7z a -t7z -mx=9 ../VapourSynth-BilateralGPU-${{ github.event.inputs.tag }}.7z VapourSynth-BilateralGPU-${{ github.event.inputs.tag }} | |
mkdir VapourSynth-BilateralGPU_RTC-${{ github.event.inputs.tag }} | |
echo f | xcopy bin\bilateralgpu_rtc.dll VapourSynth-BilateralGPU_RTC-${{ github.event.inputs.tag }}\BilateralGPU_RTC.dll /f | |
7z a -t7z -mx=9 ../VapourSynth-BilateralGPU_RTC-${{ github.event.inputs.tag }}.7z VapourSynth-BilateralGPU_RTC-${{ github.event.inputs.tag }} | |
mkdir VapourSynth-BilateralSYCL-${{ github.event.inputs.tag }} | |
echo f | xcopy bin\bilateralsycl.dll VapourSynth-BilateralSYCL-${{ github.event.inputs.tag }}\BilateralSYCL.dll /f | |
7z a -t7z -mx=9 ../VapourSynth-BilateralSYCL-${{ github.event.inputs.tag }}.7z VapourSynth-BilateralSYCL-${{ github.event.inputs.tag }} | |
mkdir SYCL-Runtime-${{ github.event.inputs.tag }} | |
echo f | xcopy "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin\sycl6.dll" SYCL-Runtime-${{ github.event.inputs.tag }} /f | |
echo f | xcopy "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin\pi_*.dll" SYCL-Runtime-${{ github.event.inputs.tag }} /f /i | |
echo f | xcopy "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\intel64_win\compiler\libmmd.dll" SYCL-Runtime-${{ github.event.inputs.tag }} /f | |
7z a -t7z -mx=9 ../SYCL-Runtime-${{ github.event.inputs.tag }}.7z SYCL-Runtime-${{ github.event.inputs.tag }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' | |
with: | |
tag_name: ${{ github.event.inputs.tag }} | |
files: | | |
VapourSynth-BilateralGPU-${{ github.event.inputs.tag }}.7z | |
VapourSynth-BilateralGPU_RTC-${{ github.event.inputs.tag }}.7z | |
VapourSynth-BilateralSYCL-${{ github.event.inputs.tag }}.7z | |
SYCL-Runtime-${{ github.event.inputs.tag }}.7z | |
fail_on_unmatched_files: true | |
generate_release_notes: false | |
prerelease: true |