Skip to content

Commit

Permalink
boolean type for cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
hadim committed Jan 23, 2025
1 parent 8b24336 commit 1171bc7
Showing 1 changed file with 54 additions and 54 deletions.
108 changes: 54 additions & 54 deletions recipe/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ schema_version: 1
context:
name: katago
version: 1.15.3
cuda: ${{ true if cuda_compiler_version != "None" else false }}
is_cuda: ${{ true if cuda_compiler_version != "None" else false }}
cuda_build_string: cuda_${{ cuda_compiler_version | version_to_buildstring }}
string_prefix: ${{ cuda_build_string if cuda else "cpu_" }}
string_prefix: ${{ cuda_build_string if is_cuda else "cpu_" }}

package:
name: ${{ name|lower }}
Expand All @@ -23,71 +23,71 @@ package:
build:
number: 1
skip:
# - cuda and win
- cuda and match(cuda_compiler_version, "<12")
# - is_cuda and win
- is_cuda and match(cuda_compiler_version, "<12")
string: ${{ string_prefix }}h${{ hash }}_${{ build_number }}
variant:
use_keys:
# use cuda from the variant config, e.g. to build multiple CUDA variants
- ${{ "cuda" if cuda }}
- ${{ "cuda" if is_cuda }}
# this will down-prioritize the cuda variant versus other variants of the package
down_prioritize_variant: ${{ 1 if cuda else 0 }}
down_prioritize_variant: ${{ 1 if is_cuda else 0 }}

# requirements:
# build:
# - if: cuda == "true"
# then:
# - ${{ compiler('cuda') }}
requirements:
build:
- if: is_cuda
then:
- ${{ compiler('cuda') }}

# - ${{ compiler('c') }}
# - ${{ compiler('cxx') }}
# - ${{ stdlib("c") }}
# - cmake
# - ninja
# - curl
# - git
# host:
# - if: cuda == "true"
# then:
# - cuda-version ==${{ cuda_compiler_version }}
# - libcublas-dev
# - cudnn
# - ${{ "nccl" if linux }}
- ${{ compiler('c') }}
- ${{ compiler('cxx') }}
- ${{ stdlib("c") }}
- cmake
- ninja
- curl
- git
host:
- if: is_cuda
then:
- cuda-version ==${{ cuda_compiler_version }}
- libcublas-dev
- cudnn
- ${{ "nccl" if linux }}

# # libraries
# - zlib
# - libzip
# - eigen
# # necessary for BUILD_DISTRIBUTED
# - openssl
# libraries
- zlib
- libzip
- eigen
# necessary for BUILD_DISTRIBUTED
- openssl

# tests:
# - files:
# source:
# - cpp/tests/
# script:
# - katago
# - katago version
tests:
- files:
source:
- cpp/tests/
script:
- katago
- katago version

# # fails some accuracy tests on osx
# - ${{ "katago runtests" if not osx }}
# - ${{ "katago runnnlayertests" if cuda != "true" }}
# fails some accuracy tests on osx
- ${{ "katago runtests" if not osx }}
- ${{ "katago runnnlayertests" if not cuda }}

# # run some tests that hopefully exercise the distributed code a bit as well
# # (based on searching "distributed" under cpp/tests and running the right portion)
# run some tests that hopefully exercise the distributed code a bit as well
# (based on searching "distributed" under cpp/tests and running the right portion)

# - if: unix
# then:
# - cd cpp/
# - mkdir tests/scratch
# - katago runoutputtests
# - ${{ "katago runtinynntests tests/scratch 1.0" if cuda != "true" }}
- if: unix
then:
- cd cpp/
- mkdir tests/scratch
- katago runoutputtests
- ${{ "katago runtinynntests tests/scratch 1.0" if not cuda }}

# - if: win
# then:
# - cd cpp/
# - mkdir tests\scratch
# - ${{ "katago runtinynntests tests/scratch 1.0" if cuda != "true" }}
- if: win
then:
- cd cpp/
- mkdir tests\scratch
- ${{ "katago runtinynntests tests/scratch 1.0" if not cuda }}

about:
summary: GTP engine and self-play learning in Go
Expand Down

0 comments on commit 1171bc7

Please sign in to comment.