From 418e4014e6f550cef82bddf993b51b72268e695a Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 10 May 2023 14:28:09 +0200 Subject: [PATCH] Resolve to csv for CDI generation on tegra systems Signed-off-by: Evan Lezar --- pkg/nvcdi/lib.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/nvcdi/lib.go b/pkg/nvcdi/lib.go index 87f0299e..37ca46e7 100644 --- a/pkg/nvcdi/lib.go +++ b/pkg/nvcdi/lib.go @@ -167,6 +167,16 @@ func (l *nvcdilib) resolveMode() (rmode string) { return ModeWsl } + isNvml, reason := l.infolib.HasNvml() + l.logger.Debugf("Is NVML-based system? %v: %v", isNvml, reason) + + isTegra, reason := l.infolib.IsTegraSystem() + l.logger.Debugf("Is Tegra-based system? %v: %v", isTegra, reason) + + if isTegra && !isNvml { + return ModeCSV + } + return ModeNvml }