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

Method ListDevices

tensorflow/go/session.go:116–124  ·  view source on GitHub ↗

ListDevices returns the list of devices associated with a Session.

()

Source from the content-addressed store, hash-verified

114
115// ListDevices returns the list of devices associated with a Session.
116func (s *Session) ListDevices() ([]Device, error) {
117 status := newStatus()
118 devicesList := C.TF_SessionListDevices(s.c, status.c)
119 if err := status.Err(); err != nil {
120 return nil, fmt.Errorf("SessionListDevices() failed: %v", err)
121 }
122 defer C.TF_DeleteDeviceList(devicesList)
123 return deviceSliceFromDeviceList(devicesList)
124}
125
126// Run the graph with the associated session starting with the supplied feeds
127// to compute the value of the requested fetches. Runs, but does not return

Callers 2

TestListDevicesFunction · 0.95
GetTFGPUDeviceNameFunction · 0.45

Calls 3

newStatusFunction · 0.85
ErrMethod · 0.45

Tested by 1

TestListDevicesFunction · 0.76