Skip to content

Commit

Permalink
infer --max-archs from --archs if --max-archs is omitted (#284)
Browse files Browse the repository at this point in the history
* infer --max-archs from --archs if --max-archs is omitted

* bump feature version
  • Loading branch information
trxcllnt authored May 3, 2024
1 parent 5537344 commit 89a96c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion features/src/rapids-build-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 89a96c0

Please sign in to comment.