gorgonia.org/gorgonia@v0.9.17/device_test.go (about) 1 // +build !cuda 2 3 package gorgonia 4 5 import "testing" 6 7 func TestDeviceCPU(t *testing.T) { 8 if CPU.IsGPU() { 9 t.Fail() 10 } 11 a, err := CPU.Alloc(nil, 0) 12 if a != nil || err != nil { 13 t.Fail() 14 } 15 err = CPU.Free(nil, nil, 0) 16 if err != nil { 17 t.Fail() 18 } 19 }