Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.
bduff-sjm edited this page Jul 19, 2016 · 1 revision

Welcome to the go-nvml wiki!

Example program that works:

package main

import "fmt"
import nvml "github.com/davidr/go-nvml"

func main() {
    nvml.NVMLInit()
    devices, _ := nvml.GetAllGPUs()
    fmt.Println("Device count: ", len(devices))
    for _, device := range devices {
        fmt.Println("Device: ",device)
            temp, _ := device.Temp()
            fmt.Println("Temp: ",temp,"C")
        }
    }
Clone this wiki locally