Skip to content

Commit

Permalink
Add Windows + CUDA (#6)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Dec 5, 2023
2 parents a8ab716 + 403f840 commit 29bd539
Show file tree
Hide file tree
Showing 8 changed files with 272 additions and 7 deletions.
58 changes: 58 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
c_compiler:
- vs2019
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
- cuda-nvcc
cuda_compiler_version:
- '12.0'
cxx_compiler:
- vs2019
target_platform:
- win-64
zip_keys:
- - cuda_compiler
- cuda_compiler_version
17 changes: 17 additions & 0 deletions .ci_support/win_64_cuda_compilernvcccuda_compiler_version11.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
c_compiler:
- vs2019
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
- nvcc
cuda_compiler_version:
- '11.2'
cxx_compiler:
- vs2019
target_platform:
- win-64
zip_keys:
- - cuda_compiler
- cuda_compiler_version
17 changes: 17 additions & 0 deletions .ci_support/win_64_cuda_compilernvcccuda_compiler_version11.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
c_compiler:
- vs2019
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cuda_compiler:
- nvcc
cuda_compiler_version:
- '11.8'
cxx_compiler:
- vs2019
target_platform:
- win-64
zip_keys:
- - cuda_compiler
- cuda_compiler_version
125 changes: 125 additions & 0 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions azure-pipelines.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 16 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,34 @@ source:
- osx-64-pick-discrete.patch # [osx and x86_64]

build:
skip: True # [win]
skip: True # [linux and cuda_compiler_version == "None"]
number: 4
skip: True # [(linux or win) and cuda_compiler_version == "None"]
number: 5
string: cuda{{ cuda_compiler_version | replace('.', '') }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"]
string: cpu_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"]
string: mps_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [osx]

script:
- LLAMA_ARGS="-DLLAMA_BUILD_TESTS=OFF" # [unix]
- set LLAMA_ARGS=-DLLAMA_BUILD_TESTS=OFF # [win]
{% macro llama_args(value) -%}
- LLAMA_ARGS="${LLAMA_ARGS:-} -DLLAMA_{{ value }}"
- LLAMA_ARGS="${LLAMA_ARGS} -DLLAMA_{{ value }}" # [unix]
- set LLAMA_ARGS=%LLAMA_ARGS% -DLLAMA_{{ value }} # [win]
{%- endmacro %}
{{ llama_args("BUILD_TESTS=OFF") }}
{{ llama_args("NATIVE=OFF") }} # [osx and arm64]

{{ llama_args("NATIVE=OFF") }} # [(osx and arm64) or win]
{{ llama_args("AVX=OFF") }} # [osx and arm64]
{{ llama_args("AVX2=OFF") }} # [osx and arm64]
{{ llama_args("FMA=OFF") }} # [osx and arm64]
{{ llama_args("F16C=OFF") }} # [osx and arm64]
{{ llama_args("ACCELERATE=ON") }} # [osx]
{{ llama_args("METAL=ON") }} # [osx]
{{ llama_args("CUBLAS=ON") }} # [cuda_compiler_version != "None"]
- cmake -S . -B build -G Ninja ${LLAMA_ARGS}

- echo $LLAMA_ARGS # [unix]
- set LLAMA_ARGS # [win]

- cmake -S . -B build -G Ninja %LLAMA_ARGS% # [win]
- cmake -S . -B build -G Ninja ${LLAMA_ARGS} # [unix]
- cmake --build build --config Release
- cmake --install build --prefix={{ PREFIX }}

Expand All @@ -49,6 +56,8 @@ requirements:
- libcublas-dev # [(cuda_compiler_version or "").startswith("12")]
run:
- cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version != "None"]
- cuda-cudart {{ cuda_compiler_version }} # [(cuda_compiler_version or "").startswith("12")]
- cuda-cudart_{{ target_platform }} {{ cuda_compiler_version }} # [(cuda_compiler_version or "").startswith("12") and win]

test:
commands:
Expand Down

0 comments on commit 29bd539

Please sign in to comment.