From 46fe390242feb3f031aa19f5d8b85d5bd0d90bb4 Mon Sep 17 00:00:00 2001 From: Kevin Klues Date: Mon, 9 Nov 2020 14:40:08 +0000 Subject: [PATCH] Update go bindings to include up to 12 NVLINKs instead of 6 Signed-off-by: Kevin Klues --- bindings/go/nvml/nvml.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/bindings/go/nvml/nvml.go b/bindings/go/nvml/nvml.go index d3f1934..c7ab5a1 100644 --- a/bindings/go/nvml/nvml.go +++ b/bindings/go/nvml/nvml.go @@ -145,6 +145,12 @@ const ( FourNVLINKLinks FiveNVLINKLinks SixNVLINKLinks + SevenNVLINKLinks + EightNVLINKLinks + NineNVLINKLinks + TenNVLINKLinks + ElevenNVLINKLinks + TwelveNVLINKLinks ) type P2PLink struct { @@ -178,6 +184,18 @@ func (t P2PLinkType) String() string { return "Five NVLinks" case SixNVLINKLinks: return "Six NVLinks" + case SevenNVLINKLinks: + return "Seven NVLinks" + case EightNVLINKLinks: + return "Eight NVLinks" + case NineNVLINKLinks: + return "Nine NVLinks" + case TenNVLINKLinks: + return "Ten NVLinks" + case ElevenNVLINKLinks: + return "Eleven NVLinks" + case TwelveNVLINKLinks: + return "Twelve NVLinks" case P2PLinkUnknown: } return "N/A" @@ -618,6 +636,18 @@ func GetNVLink(dev1, dev2 *Device) (link P2PLinkType, err error) { nvlink = FiveNVLINKLinks case FiveNVLINKLinks: nvlink = SixNVLINKLinks + case SixNVLINKLinks: + nvlink = SevenNVLINKLinks + case SevenNVLINKLinks: + nvlink = EightNVLINKLinks + case EightNVLINKLinks: + nvlink = NineNVLINKLinks + case NineNVLINKLinks: + nvlink = TenNVLINKLinks + case TenNVLINKLinks: + nvlink = ElevenNVLINKLinks + case ElevenNVLINKLinks: + nvlink = TwelveNVLINKLinks } } }