MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / runValidation

Method runValidation

cmd/nvidia-validator/main.go:1750–1766  ·  view source on GitHub ↗
(silent bool)

Source from the content-addressed store, hash-verified

1748}
1749
1750func (v *VGPUManager) runValidation(silent bool) (hostDriver bool, err error) {
1751 // invoke validation command
1752 command := "chroot"
1753 args := []string{"/run/nvidia/driver", "nvidia-smi"}
1754
1755 // check if driver is pre-installed on the host and use host path for validation
1756 if _, err := os.Lstat("/host/usr/bin/nvidia-smi"); err == nil {
1757 args = []string{"/host", "nvidia-smi"}
1758 hostDriver = true
1759 }
1760
1761 if withWaitFlag {
1762 return hostDriver, runCommandWithWait(command, args, sleepIntervalSecondsFlag, silent)
1763 }
1764
1765 return hostDriver, runCommand(command, args, silent)
1766}
1767
1768// waitForVFs waits for Virtual Functions to be created on all NVIDIA GPUs.
1769// It polls sriov_numvfs until all GPUs have their full VF count enabled.

Callers 1

validateMethod · 0.95

Calls 2

runCommandWithWaitFunction · 0.85
runCommandFunction · 0.85

Tested by

no test coverage detected