Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/lm/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (
"regexp"
"strings"

"k8s.io/klog/v2"

spec "github.com/NVIDIA/k8s-device-plugin/api/config/v1"
"github.com/NVIDIA/k8s-device-plugin/internal/resource"
)
Expand All @@ -46,7 +48,7 @@ func NewGPUResourceLabeler(config *spec.Config, device resource.Device, count in

totalMemoryMiB, err := device.GetTotalMemoryMiB()
if err != nil {
return nil, fmt.Errorf("failed to get memory info for device: %v", err)
klog.Warningf("Ignoring error getting memory info for device: %v", err)
}

resourceLabeler := newResourceLabeler(fullGPUResourceName, config)
Expand Down
3 changes: 2 additions & 1 deletion internal/rm/devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"strconv"
"strings"

"k8s.io/klog/v2"
pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1"
)

Expand Down Expand Up @@ -73,7 +74,7 @@ func BuildDevice(index string, d deviceInfo) (*Device, error) {

totalMemory, err := d.GetTotalMemory()
if err != nil {
return nil, fmt.Errorf("error getting device memory: %w", err)
klog.Warningf("Ignoring error getting device memory: %v", err)
}

computeCapability, err := d.GetComputeCapability()
Expand Down