Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
23b445a
Add Windows support
mfranzrebsal May 7, 2026
787e435
Windows support: revert CI specific changes
mfranzrebsal May 13, 2026
78b674b
Re- Enable NVBench Windows build job
oleksandr-pavlyk May 15, 2026
460e14f
Install CUDA Profiler API into toolkit
oleksandr-pavlyk May 16, 2026
c6cd097
Add intall_cuda_profiler_api.ps1
oleksandr-pavlyk May 16, 2026
f8c0554
Inform MSVC that static library export main
oleksandr-pavlyk May 16, 2026
f402b57
Review feedback to PowerShell script
oleksandr-pavlyk May 17, 2026
71eacdc
Fix how CMAKE_CUDA_HOST_COMPILER is set in call to cmake
oleksandr-pavlyk May 17, 2026
cc209bb
Filter out empty directories LD_LIBRARY_PATH/PATH
oleksandr-pavlyk May 17, 2026
d980c2a
Check that cudaVersion and :CUDA_PATH are consistent
oleksandr-pavlyk May 17, 2026
6c44ec6
Do not overwrite ENVIRONMENT property with empty values
oleksandr-pavlyk May 17, 2026
7f2a6dc
Implement retry logic in downloading of CUDA Profiler API
oleksandr-pavlyk May 17, 2026
287d041
Strengthen publisher verification of downloaded artifact
oleksandr-pavlyk May 17, 2026
9f8bf81
Prepend new folders to LD_LIBRARY_PATH, do not overwrite
oleksandr-pavlyk May 17, 2026
adabe4a
Implement timeout, fail on 40x HTTP response code
oleksandr-pavlyk May 17, 2026
a5b3e97
USE ENVIRONMENT_MODIFICATION property, not ENVIRONMENT
oleksandr-pavlyk May 17, 2026
c6347b5
escape environment modification values
oleksandr-pavlyk May 17, 2026
919468f
Fix cmake script error breaking the build
oleksandr-pavlyk May 17, 2026
177c7b0
Added recommented timeout to Invoke-WebRequest
oleksandr-pavlyk May 17, 2026
f83429a
Set cmake_minimum_required version to 3.30.4, consistent with main pr…
oleksandr-pavlyk May 17, 2026
ccfa1b5
Pass NVBENCH environment variables through docker for Windows build
oleksandr-pavlyk May 17, 2026
cb00417
Export IMPORTLIB_LOCATION for CUPTI on Windows and use in testing pro…
oleksandr-pavlyk May 18, 2026
28376eb
Add Zc:preprocessor to host compiler on Windows. Configure runtime en…
oleksandr-pavlyk May 18, 2026
03b8f02
Better fix to add /Zc:preprocessor that also propagates to header tes…
oleksandr-pavlyk May 18, 2026
5ddc847
Address code rabbit concern
oleksandr-pavlyk May 18, 2026
76626e4
Validate before casting in PowerShell script
oleksandr-pavlyk May 18, 2026
3944851
decouple nvbench runtime path setup from cupti target detection
oleksandr-pavlyk May 18, 2026
0c29705
Normalize multiple ARCH args
oleksandr-pavlyk May 18, 2026
806f163
Better validation of gpu_args parameter
oleksandr-pavlyk May 18, 2026
90c2386
use get_imported_location to get CUPTI library to improve multi-confi…
oleksandr-pavlyk May 18, 2026
737bb58
Validation of combinations of gpu, run_tests and device_testing
oleksandr-pavlyk May 18, 2026
fcfb9b6
Resolve code-rabbit concern in handling multiple imported configurati…
oleksandr-pavlyk May 18, 2026
35a0d59
Reject GPU requests for forks
oleksandr-pavlyk May 18, 2026
5a08b81
Prevents installing cuda_profiler_api.h into one toolkit while CMake …
oleksandr-pavlyk May 18, 2026
0be5c9c
Fail fast for deterministic client errors returned by download request
oleksandr-pavlyk May 18, 2026
2dba74d
more robust imported_location computation
oleksandr-pavlyk May 18, 2026
fedba46
Make Linux also use ENVIRONMENT_MODIFICATION to simplify code
oleksandr-pavlyk May 18, 2026
02a4a7e
run_tests=false is not allows when device_testing=true
oleksandr-pavlyk May 18, 2026
2a904bb
Specify Windows CUDA toolkit version major.minor.patch, derive devcon…
oleksandr-pavlyk May 18, 2026
48a77bb
Handle edge case when multiple CUPTI dlls exist, pick up, warn, do no…
oleksandr-pavlyk May 18, 2026
639e9ae
Always specify -DNVBench_ENABLE_DEVICE_TESTING=VAL per value of
oleksandr-pavlyk May 18, 2026
ccde292
Back to cuda major.minor being input
oleksandr-pavlyk May 18, 2026
0ab9320
Remove parameters intended to enable testing builds on Windows. Defer…
oleksandr-pavlyk May 18, 2026
c55f7f2
Handle import nvbench::nvbench the same as nvbench target in NVBenchC…
oleksandr-pavlyk May 18, 2026
dd0a9b0
Forward cmake variables only if set
oleksandr-pavlyk May 18, 2026
d1a50a5
Use UTF-8 encoding when appending to GITHUB_OUTPUT
oleksandr-pavlyk May 18, 2026
697f387
Avoid power-shell footgun where local variable shadows builtin variab…
oleksandr-pavlyk May 18, 2026
307ecf5
enable device testing parameter in build_nvbench, passed as True by w…
oleksandr-pavlyk May 18, 2026
9cd2c0f
Lower CMake version required as much as possible
oleksandr-pavlyk May 18, 2026
9bfe117
LINKER:/INCLUDE:main for proper CUDA link driver routing
oleksandr-pavlyk May 18, 2026
2d004ec
Add conda-specific hints for find_library call to find CUPTI
oleksandr-pavlyk May 18, 2026
25ab217
test_export must require 3.22 version
oleksandr-pavlyk May 18, 2026
4ece868
Delete unused function Test-Preset
oleksandr-pavlyk May 18, 2026
3cd661a
Guard the CUPTI runtime path extraction
oleksandr-pavlyk May 18, 2026
1cc8d01
use the config-aware generator expression for all runtime targets
oleksandr-pavlyk May 18, 2026
9486121
Deduplicate WINDOWS_CI_IMAGE construction
oleksandr-pavlyk May 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 47 additions & 4 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ on:
workflow_dispatch:
inputs:
cuda:
description: "CUDA Toolkit version"
description: "CUDA Toolkit major.minor version"
type: string
required: false
default: "13.0"
Expand Down Expand Up @@ -113,14 +113,50 @@ jobs:
aws-region: us-east-2
role-duration-seconds: 43200

- name: Validate Windows build inputs
id: validate_windows_build_inputs
env:
NVBENCH_WINDOWS_CUDA: ${{ inputs.cuda }}
NVBENCH_WINDOWS_STD: ${{ inputs.std }}
NVBENCH_WINDOWS_ARCH: ${{ inputs.arch }}
run: |
Comment thread
oleksandr-pavlyk marked this conversation as resolved.
$ErrorActionPreference = "Stop"

if ($env:NVBENCH_WINDOWS_CUDA -notmatch '^\d+\.\d+$') {
throw "Invalid CUDA version '$env:NVBENCH_WINDOWS_CUDA'. Expected '<major>.<minor>', for example '13.0'."
}

if (@("17", "20") -notcontains $env:NVBENCH_WINDOWS_STD) {
throw "Invalid C++ standard '$env:NVBENCH_WINDOWS_STD'. Expected '17' or '20'."
}

$arch = "$env:NVBENCH_WINDOWS_ARCH".Trim()
$normalizedArch = $arch
if ($arch) {
if (@("all", "all-major", "native") -notcontains $arch) {
$archItems = @($arch -split '[;,]' | ForEach-Object { $_.Trim() } | Where-Object { $_ })
if ($archItems.Length -eq 0) {
throw "Invalid CMAKE_CUDA_ARCHITECTURES value '$arch'. Expected empty, 'all', 'all-major', 'native', or a list like '80;90-real'."
}
foreach ($archItem in $archItems) {
if ($archItem -notmatch '^\d{2,3}(-real|-virtual)?$') {
throw "Invalid CMAKE_CUDA_ARCHITECTURES value '$arch'. Expected empty, 'all', 'all-major', 'native', or a list like '80;90-real'."
}
}
Comment thread
oleksandr-pavlyk marked this conversation as resolved.
$normalizedArch = $archItems -join ';'
}
}
"arch=$normalizedArch" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append

- name: Fetch Windows devcontainer image
run: |
docker pull "$env:WINDOWS_CI_IMAGE"

- name: Build NVBench
env:
NVBENCH_WINDOWS_CUDA: ${{ inputs.cuda }}
NVBENCH_WINDOWS_STD: ${{ inputs.std }}
NVBENCH_WINDOWS_ARCH: ${{ inputs.arch }}
NVBENCH_WINDOWS_ARCH: ${{ steps.validate_windows_build_inputs.outputs.arch }}
run: |
$ErrorActionPreference = "Stop"

Expand All @@ -131,7 +167,8 @@ jobs:
@"
`$ErrorActionPreference = 'Stop'
git config --global --add safe.directory '$containerRepo'
& '$containerRepo/ci/windows/build_nvbench.ps1' -std '$env:NVBENCH_WINDOWS_STD' -arch '$env:NVBENCH_WINDOWS_ARCH'
& '$containerRepo/ci/windows/install_cuda_profiler_api.ps1' -cudaVersion "`$env:NVBENCH_WINDOWS_CUDA"
& '$containerRepo/ci/windows/build_nvbench.ps1' -std "`$env:NVBENCH_WINDOWS_STD" -arch "`$env:NVBENCH_WINDOWS_ARCH" -device-testing `$true
exit `$LASTEXITCODE
"@ | Set-Content -Path $script -Encoding UTF8

Expand All @@ -152,13 +189,19 @@ jobs:
"--env", "GITHUB_REPOSITORY=$env:GITHUB_REPOSITORY",
"--env", "GITHUB_RUN_ID=$env:GITHUB_RUN_ID",
"--env", "GITHUB_SHA=$env:GITHUB_SHA",
"--env", "NVBENCH_WINDOWS_ARCH=$env:NVBENCH_WINDOWS_ARCH",
"--env", "NVBENCH_WINDOWS_CUDA=$env:NVBENCH_WINDOWS_CUDA",
"--env", "NVBENCH_WINDOWS_STD=$env:NVBENCH_WINDOWS_STD",
"--env", "SCCACHE_BUCKET=$env:SCCACHE_BUCKET",
"--env", "SCCACHE_IDLE_TIMEOUT=$env:SCCACHE_IDLE_TIMEOUT",
"--env", "SCCACHE_REGION=$env:SCCACHE_REGION",
"--env", "SCCACHE_S3_NO_CREDENTIALS=$env:SCCACHE_S3_NO_CREDENTIALS",
"--env", "SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX=$env:SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX",
"--env", "SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE=$env:SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE",
"--env", "SCCACHE_S3_USE_SSL=$env:SCCACHE_S3_USE_SSL",
"--env", "SCCACHE_S3_USE_SSL=$env:SCCACHE_S3_USE_SSL"
)

$dockerArgs += @(
"$env:WINDOWS_CI_IMAGE",
"powershell", "-NoLogo", "-NoProfile", "-ExecutionPolicy", "Bypass",
"-File", $containerScript
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ jobs:

nvbench-windows:
name: NVBench Windows CUDA${{ matrix.config.cuda }} ${{ matrix.config.host }} C++${{ matrix.config.std }}
# TODO: Re-enable after https://github.com/NVIDIA/nvbench/pull/354 fixes the Windows build.
if: false
permissions:
id-token: write
contents: read
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ if (${CUDAToolkit_VERSION} VERSION_LESS 11.3)
endif()

option(BUILD_SHARED_LIBS "Build NVBench as a shared library" ON)
if (WIN32 AND BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()

option(NVBench_ENABLE_NVML "Build with NVML support from the Cuda Toolkit." ON)
option(NVBench_ENABLE_CUPTI "Build NVBench with CUPTI." ${cupti_default})
Expand Down
10 changes: 8 additions & 2 deletions ci/windows/build_nvbench.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ Param(

[Parameter(Mandatory = $false)]
[Alias("cmake-options")]
[string]$CMAKE_OPTIONS = ""
[string]$CMAKE_OPTIONS = "",

[Parameter(Mandatory = $false)]
[Alias("device-testing")]
[bool]$DEVICE_TESTING = $false
)

$ErrorActionPreference = "Stop"
Expand All @@ -30,9 +34,11 @@ try {
Print-EnvironmentDetails

$preset = "nvbench-ci"
$deviceTestingOption = if ($DEVICE_TESTING) { "ON" } else { "OFF" }
$localOptions = @(
"-DCMAKE_CXX_STANDARD=$CXX_STANDARD",
"-DCMAKE_CUDA_STANDARD=$CXX_STANDARD"
"-DCMAKE_CUDA_STANDARD=$CXX_STANDARD",
"-DNVBench_ENABLE_DEVICE_TESTING=$deviceTestingOption"
)

Configure-And-Build-Preset "NVBench" $preset $localOptions
Expand Down
Loading