From 9dd953ce410f049f0b641d3d11b9639aff5a33cc Mon Sep 17 00:00:00 2001 From: Henry Li Date: Tue, 30 Apr 2024 17:57:09 -0700 Subject: [PATCH] enable nvidia persistence mode --- microsoft/testsuites/gpu/gpusuite.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/microsoft/testsuites/gpu/gpusuite.py b/microsoft/testsuites/gpu/gpusuite.py index 7556114d68..9ab5cf48d3 100644 --- a/microsoft/testsuites/gpu/gpusuite.py +++ b/microsoft/testsuites/gpu/gpusuite.py @@ -415,6 +415,14 @@ def _install_driver(node: Node, log_path: Path, log: Logger) -> None: __install_driver_using_sdk(node, log, log_path) + # Enabling nvidia persistence mode which is recommended by NVIDIA + node.execute( + "nvidia-persistenced --persistence-mode", + sudo=True, + expected_exit_code=0, + expected_exit_code_failure_message="fail to enable nvidia persistence mode", + ) + def _gpu_provision_check(min_pci_count: int, node: Node, log: Logger) -> None: lspci = node.tools[Lspci]