Skip to content

Commit c294c88

Browse files
committed
fix win cccl
1 parent ad48185 commit c294c88

4 files changed

Lines changed: 30 additions & 2 deletions

File tree

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.ps1 text eol=crlf

‎.github/workflows/build.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ jobs:
5656
path: ${{ env.CCACHE_DIR }}
5757
key: ccache-${{ runner.os }}-cu${{ matrix.cuda-version }}-${{ hashFiles('conda/recipe.yaml', 'conda/variants.yaml') }}
5858
restore-keys: ccache-${{ runner.os }}-cu${{ matrix.cuda-version }}-
59-
- if: matrix.os == 'windows' && matrix.cuda-version == 'None'
60-
uses: ilammy/msvc-dev-cmd@v1
6159
- name: config
6260
id: config
6361
run: |

‎conda/recipe.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ build:
3838
# TODO: use scikit-build-core & setuptools_scm instead
3939
- if: win
4040
then:
41+
# fix conda-forge::cuda-cccl win-64 cmake config headers
42+
- powershell -NoProfile -File "%RECIPE_DIR%\win-cccl-fix.ps1"
4143
- cmake -S . %CMAKE_ARGS% -DCMAKE_INSTALL_PREFIX=%SRC_DIR%\src\Python\ccpi\filters\ %CMAKE_EXTRA_ARGS%
4244
- cmake --build . --target install --config RelWithDebInfo
4345
- pip install -vv %SRC_DIR%\src\Python --prefix=%PREFIX%

‎conda/win-cccl-fix.ps1‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# work-around conda-forge::cuda-cccl win-64 packaging bug:
2+
# copy Library/include/targets/x64/{cccl,thrust,cub,cuda} into Library/include
3+
# so find_package({Thrust,CUB,libcudacxx}) work
4+
$ErrorActionPreference = "Stop"
5+
$inc = Join-Path $env:PREFIX "Library\include"
6+
$t = Join-Path $inc "targets\x64"
7+
Write-Host "cccl-fix: PREFIX='$env:PREFIX'; targets='$t' exists=$(Test-Path $t)"
8+
if (Test-Path $t) {
9+
foreach ($d in Get-ChildItem $t -Directory) {
10+
$dst = Join-Path $inc $d.Name
11+
if (Test-Path $dst) {
12+
Write-Host "cccl-fix: skip '$dst' (already exists)"
13+
} else {
14+
Copy-Item -Recurse $d.FullName $dst
15+
Write-Host "cccl-fix: copied '$($d.FullName)' -> '$dst'"
16+
}
17+
}
18+
# 12.x libcudacxx: headers under targets/x64/cuda/, searched at include/cuda/std
19+
if ((Test-Path (Join-Path $t "cuda\std")) -and -not (Test-Path (Join-Path $inc "cuda\std"))) {
20+
$cuda = Join-Path $inc "cuda"
21+
if (-not (Test-Path $cuda)) {
22+
New-Item -ItemType Directory -Path $cuda | Out-Null
23+
}
24+
Copy-Item -Recurse (Join-Path $t "cuda\std") (Join-Path $cuda "std")
25+
Write-Host "cccl-fix: copied 'cuda\std' -> '$(Join-Path $cuda "std")'"
26+
}
27+
}

0 commit comments

Comments
 (0)