Skip to content

Commit 8b1f884

Browse files
authored
Merge branch 'main' into aybchan/load-balance
2 parents f984536 + b462a3b commit 8b1f884

54 files changed

Lines changed: 3375 additions & 445 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/container/Dockerfile.base

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1-labs
2-
ARG BASE_IMAGE=nvcr.io/nvidia/cuda-dl-base:26.05-cuda13.2-devel-ubuntu24.04
2+
ARG BASE_IMAGE=nvcr.io/nvidia/cuda-dl-base:26.06-cuda13.3-devel-ubuntu24.04
33
ARG GIT_USER_NAME="JAX Toolbox"
44
ARG GIT_USER_EMAIL=jax@nvidia.com
55
ARG JAX_TOOLBOX_REF=main
@@ -133,3 +133,7 @@ ENV MANIFEST_FILE="/opt/manifest.d/manifest.yaml"
133133
ADD manifest.yaml create-distribution.sh bump.sh /opt/manifest.d/
134134

135135
COPY patches/ /opt/manifest.d/patches/
136+
137+
# Temporary workaround for TransformerEngine, which added a >=1.25.0 requirement
138+
# when no public cuda-dl-base container had that CUDNN_FRONTEND_VERSION.
139+
ENV CUDNN_FRONTEND_VERSION=1.25.0

.github/container/Dockerfile.jax

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ COPY --from=builder ${SRC_PATH_TRANSFORMER_ENGINE} ${SRC_PATH_TRANSFORMER_ENGINE
132132
RUN <<"EOF" bash -ex
133133
ls ${SRC_PATH_TRANSFORMER_ENGINE}/dist/*.whl
134134
echo "transformer-engine @ file://$(ls ${SRC_PATH_TRANSFORMER_ENGINE}/dist/*.whl)" > /opt/pip-tools.d/requirements-te.in
135+
echo "nvidia-cudnn-frontend==${CUDNN_FRONTEND_VERSION}" >> /opt/pip-tools.d/requirements-te.in
135136
EOF
136137

137138
## nvidia-cutlass-dsl[cu13]

.github/container/build-te.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,15 @@ pushd ${SRC_PATH_TE}
138138
# JAX, or the wheel-based installation of CUDA. Note that when we build TE as
139139
# part of building the JAX containers, JAX and XLA are not yet installed.
140140
python - << EOF
141-
import subprocess, sys, tomllib
141+
import os, subprocess, sys, tomllib
142142
with open("pyproject.toml", "rb") as ifile:
143143
data = tomllib.load(ifile)
144144
subprocess.run(
145145
[sys.executable, "-m", "pip", "install"]
146146
+ [r for r in data["build-system"]["requires"]
147-
if r.startswith("pybind11") or r.startswith("cmake") or r.startswith("ninja")])
147+
if r.startswith("pybind11") or r.startswith("cmake") or r.startswith("ninja")]
148+
+ [f"nvidia-cudnn-frontend=={os.environ['CUDNN_FRONTEND_VERSION']}"]
149+
)
148150
EOF
149151
if [[ "${CCACHE}" == "1" ]]; then
150152
# Install ccache if not present (needs >= 4.1 for Redis remote storage support)

.github/triage/jax_toolbox_triage/args.py

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ def parse_args(args=None) -> argparse.Namespace:
9898
`date` will be substituted, e.g. ghcr.io/nvidia/jax:{container}-{date} for
9999
the JAX-Toolbox public nightlies.""",
100100
)
101+
parser.add_argument("--metric-name", type=str, help="Example: tflops_per_sec")
102+
parser.add_argument(
103+
"--passing-metric",
104+
action="append",
105+
type=float,
106+
help="Good value for the metric",
107+
)
108+
parser.add_argument(
109+
"--failing-metric", action="append", type=float, help="Bad value for the metric"
110+
)
101111
parser.add_argument(
102112
"--output-prefix",
103113
default=None,
@@ -316,6 +326,14 @@ def parse_args(args=None) -> argparse.Namespace:
316326
default="main",
317327
help="The name of the main branch (e.g. main) to derive cherry-picks from",
318328
)
329+
parser.add_argument(
330+
"--container-registry",
331+
type=str,
332+
help="""
333+
Remote registry for use with the plugin backend. This can optionally
334+
include a tag prefix, i.e. gitlab.com/USER/containers and
335+
gitlab.com/USER/containers:PREFIX- are both valid.""",
336+
)
319337
args = parser.parse_args(args=args)
320338
if args.restart:
321339
if args.output_prefix is None:
@@ -331,12 +349,38 @@ def parse_args(args=None) -> argparse.Namespace:
331349
args.output_prefix = pathlib.Path(
332350
datetime.datetime.now().strftime("triage-%Y-%m-%d-%H-%M-%S")
333351
)
334-
352+
args.optional_software = optional_software.copy()
353+
if args.exclude_transformer_engine:
354+
args.optional_software.remove("transformer-engine")
335355
assert args.container_runtime in {
336356
"docker",
337357
"pyxis",
338358
"local",
359+
"plugin",
339360
}, args.container_runtime
361+
362+
# Metric-based triage checks
363+
container_search_options_passed = (
364+
args.container is not None
365+
or args.start_date is not None
366+
or args.end_date is not None
367+
)
368+
if args.metric_name is not None:
369+
if container_search_options_passed:
370+
raise Exception(
371+
"--metric-name is only supported in version-level search; use "
372+
"--{passing,failing}-{container,versions}."
373+
)
374+
if not args.passing_metric or not args.failing_metric:
375+
raise Exception(
376+
"You should pass seed metric values via --passing-metric and "
377+
"--failing-metric if --metric-name is passed."
378+
)
379+
if (args.passing_metric or args.failing_metric) and args.metric_name is None:
380+
raise Exception(
381+
"--metric-name must be passed if --passing-metric or --failing-metric is."
382+
)
383+
340384
args.workaround_buggy_container = set(args.workaround_buggy_container)
341385
# --{passing,failing}-commits are deprecated aliases for --{passing,failing}-versions.
342386
for prefix in ["passing", "failing"]:
@@ -393,9 +437,7 @@ def parse_args(args=None) -> argparse.Namespace:
393437
# If the container-level search is being skipped, because a valid combination
394438
# of --{passing,failing}-{versions,container} is passed, then no container-level
395439
# search options should be passed.
396-
assert (
397-
args.container is None and args.start_date is None and args.end_date is None
398-
), (
440+
assert not container_search_options_passed, (
399441
"No container-level search options should be passed if the passing/failing"
400442
" containers/versions have been passed explicitly."
401443
)
@@ -417,12 +459,7 @@ def parse_args(args=None) -> argparse.Namespace:
417459
else:
418460
# None of --{passing,failing}-{versions,container} were passed, make sure the
419461
# compulsory arguments for the container-level search were passed
420-
assert (
421-
args.container is not None
422-
), "--container must be passed for the container-level search"
423-
424-
args.optional_software = optional_software.copy()
425-
if args.exclude_transformer_engine:
426-
args.optional_software.remove("transformer-engine")
427-
462+
assert args.container is not None, (
463+
"--container must be passed for the container-level search"
464+
)
428465
return args
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# syntax=docker/dockerfile:1
2+
ARG BASE_IMAGE
3+
ARG BUILD_CMD
4+
ARG GIT_CMD
5+
FROM ${BASE_IMAGE}
6+
ARG BUILD_CMD
7+
ARG GIT_CMD
8+
RUN sh -c "${GIT_CMD}"
9+
RUN --mount=type=cache,target=/root/.cache sh -c "${BUILD_CMD}"

.github/triage/jax_toolbox_triage/docker.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@ def __init__(
2424

2525
def __enter__(self):
2626
self._logger.debug(f"Launching {self}")
27-
have_gpus = shutil.which("nvidia-smi") is not None
27+
have_gpus = (
28+
shutil.which("nvidia-smi") is not None
29+
and subprocess.run(["nvidia-smi"]).returncode == 0
30+
)
2831
if not have_gpus:
2932
self._logger.warning("No GPUs detected!")
30-
gpu_args = ["--gpus=all"] if have_gpus else []
33+
gpu_args = (
34+
["--gpus=all"] if have_gpus else ["-e", "NVIDIA_VISIBLE_DEVICES=void"]
35+
)
3136
result = run_and_log(
3237
[
3338
"docker",
@@ -93,6 +98,7 @@ def exists(self) -> bool:
9398
"""
9499
Check if the given container exists.
95100
"""
101+
# TODO: check without pulling; docker manifest inspect
96102
result = run_and_log(
97103
["docker", "pull", self._url],
98104
logger=self._logger,

0 commit comments

Comments
 (0)