From 89a96c0fcef4a8534c21db78b9a4e7b6c12378f4 Mon Sep 17 00:00:00 2001 From: Paul Taylor <178183+trxcllnt@users.noreply.github.com> Date: Fri, 3 May 2024 13:39:03 -0700 Subject: [PATCH] infer --max-archs from --archs if --max-archs is omitted (#284) * infer --max-archs from --archs if --max-archs is omitted * bump feature version --- features/src/rapids-build-utils/devcontainer-feature.json | 2 +- .../rapids-build-utils/bin/get-num-archs-jobs-and-load.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/src/rapids-build-utils/devcontainer-feature.json b/features/src/rapids-build-utils/devcontainer-feature.json index 9a2aca24..bebb052c 100644 --- a/features/src/rapids-build-utils/devcontainer-feature.json +++ b/features/src/rapids-build-utils/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "NVIDIA RAPIDS devcontainer build utilities", "id": "rapids-build-utils", - "version": "24.6.11", + "version": "24.6.12", "description": "A feature to install the RAPIDS devcontainer build utilities", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" diff --git a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/get-num-archs-jobs-and-load.sh b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/get-num-archs-jobs-and-load.sh index 5163af7d..4a8c3adc 100755 --- a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/get-num-archs-jobs-and-load.sh +++ b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/get-num-archs-jobs-and-load.sh @@ -51,10 +51,10 @@ get_num_archs_jobs_and_load() { fi parallel="${j:-${JOBS:-${PARALLEL_LEVEL:-1}}}"; - max_archs="${max_archs:-${MAX_DEVICE_OBJ_TO_COMPILE_IN_PARALLEL:-3}}"; + max_archs="${max_archs:-${MAX_DEVICE_OBJ_TO_COMPILE_IN_PARALLEL:-${archs:-3}}}"; max_device_obj_memory_usage="${max_device_obj_memory_usage:-${MAX_DEVICE_OBJ_MEMORY_USAGE:-1}}"; - local n_arch=${archs:-0}; + local n_arch="${archs:-0}"; if test -z "${archs:-}" \ && test -n "${INFER_NUM_DEVICE_ARCHITECTURES:-}"; then @@ -85,7 +85,7 @@ get_num_archs_jobs_and_load() { local mem_for_device_objs=1; - if test ${n_arch} -le 0; then + if test "${n_arch}" -le 0; then n_arch=1; else # Clamp to `min(n_arch, max_archs)` threads per job