From c90211e07042d3b277749a4057f9b0b8d4be9430 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 15 Dec 2023 15:30:03 +0100 Subject: [PATCH] Log explicitly requested runtime mode For users running the nvidia-container-runtime it would be useful to determine the runtime mode used from the logs directly instead of relying on other log messages as signals. This change ensures that an explicitly selected mode is also logged instead of only when mode=auto. Signed-off-by: Evan Lezar --- CHANGELOG.md | 1 + internal/info/auto.go | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac6f3c8d..0075620d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## v1.15.0-rc.2 * Extend the `runtime.nvidia.com/gpu` CDI kind to support full-GPUs and MIG devices specified by index or UUID. * Fix bug when specifying `--dev-root` for Tegra-based systems. +* Log explicitly requested runtime mode. ## v1.15.0-rc.1 * Skip update of ldcache in containers without ldconfig. The .so.SONAME symlinks are still created. diff --git a/internal/info/auto.go b/internal/info/auto.go index 4b2745d9..3ca7f15e 100644 --- a/internal/info/auto.go +++ b/internal/info/auto.go @@ -63,6 +63,7 @@ func ResolveAutoMode(logger logger.Interface, mode string, image image.CUDA) (rm // resolveMode determines the correct mode for the platform if set to "auto" func (r resolver) resolveMode(mode string, image image.CUDA) (rmode string) { if mode != "auto" { + r.logger.Infof("Using requested mode '%s'", mode) return mode } defer func() {