File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1734,6 +1734,22 @@ func (v *VGPUDevices) validate() error {
17341734}
17351735
17361736func (v * VGPUDevices ) runValidation () error {
1737+ nvpci := nvpci .New ()
1738+ GPUDevices , err := nvpci .GetGPUs ()
1739+ if err != nil {
1740+ return fmt .Errorf ("error checking for GPU devices on the host: %w" , err )
1741+ }
1742+ for _ , device := range GPUDevices {
1743+ if device .SriovInfo .PhysicalFunction == nil {
1744+ continue
1745+ }
1746+ totalVF := int (device .SriovInfo .PhysicalFunction .TotalVFs )
1747+ if totalVF > 0 {
1748+ log .Infof ("Found GPU device with SR-IOV VFs: %s (TotalVFs: %d)" , device .Address , totalVF )
1749+ return nil
1750+ }
1751+ }
1752+
17371753 nvmdev := nvmdev .New ()
17381754 vGPUDevices , err := nvmdev .GetAllDevices ()
17391755 if err != nil {
@@ -1746,14 +1762,14 @@ func (v *VGPUDevices) runValidation() error {
17461762 return fmt .Errorf ("no vGPU devices found" )
17471763 }
17481764
1749- log .Infof ("Found %d vGPU devices" , numDevices )
1765+ log .Infof ("Found %d MDEV vGPU devices" , numDevices )
17501766 return nil
17511767 }
17521768
17531769 for {
17541770 numDevices := len (vGPUDevices )
17551771 if numDevices > 0 {
1756- log .Infof ("Found %d vGPU devices" , numDevices )
1772+ log .Infof ("Found %d MDEV vGPU devices" , numDevices )
17571773 return nil
17581774 }
17591775 log .Infof ("No vGPU devices found, retrying after %d seconds" , sleepIntervalSecondsFlag )
You can’t perform that action at this time.
0 commit comments