Skip to content

Commit

Permalink
don't hardcode latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
AyodeAwe committed Aug 12, 2024
1 parent d168627 commit 052faa4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ci/compute-matrix.jq
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ def compute_ubuntu_version($x):
def compute_cuda_tag($x):
$x + {CUDA_TAG: $x.CUDA_VER | split(".") | [.[0], .[1]] | join(".") };

def compute_build_raft_ann_bench_cpu_image($x):
$x + {BUILD_RAFT_ANN_BENCH_CPU_IMAGE: ($x.CUDA_VER == "12.5.1")}; # we don't need to build CPU packages for different CUDA versions.
def latest_cuda_version($cuda_versions):
$cuda_versions | max_by(. | split(".") | map(tonumber));

def compute_build_raft_ann_bench_cpu_image($x; $latest_cuda_version):
$x + {BUILD_RAFT_ANN_BENCH_CPU_IMAGE: ($x.CUDA_VER == $latest_cuda_version)}; # we don't need to build CPU packages for different CUDA versions

# Checks the current entry to see if it matches the given exclude
def matches($entry; $exclude):
Expand All @@ -35,12 +38,13 @@ def compute_matrix($input):
keys_unsorted as $matrix_keys |
to_entries |
map(.value) |
latest_cuda_version($input.CUDA_VER) as $latest_cuda_version |
[
combinations |
lists2dict($matrix_keys; .) |
compute_ubuntu_version(.) |
compute_cuda_tag(.) |
compute_build_raft_ann_bench_cpu_image(.) |
compute_build_raft_ann_bench_cpu_image(.; $latest_cuda_version) |
filter_excludes(.; $excludes) |
compute_arch(.)
] |
Expand Down

0 comments on commit 052faa4

Please sign in to comment.