MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ListDevices

Method ListDevices

tensorflow/go/context.go:101–109  ·  view source on GitHub ↗

ListDevices returns the list of devices associated with a Context.

()

Source from the content-addressed store, hash-verified

99
100// ListDevices returns the list of devices associated with a Context.
101func (c *Context) ListDevices() ([]Device, error) {
102 status := newStatus()
103 devicesList := C.TFE_ContextListDevices(c.c, status.c)
104 if err := status.Err(); err != nil {
105 return nil, fmt.Errorf("SessionListDevices() failed: %v", err)
106 }
107 defer C.TF_DeleteDeviceList(devicesList)
108 return deviceSliceFromDeviceList(devicesList)
109}

Callers 1

Calls 3

newStatusFunction · 0.85
ErrMethod · 0.45

Tested by 1