- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for TF_DeviceListCount (0.22 sec)
-
tensorflow/c/eager/c_api_test_util.cc
TF_NewStatus(), TF_DeleteStatus); TF_DeviceList* devices = TFE_ContextListDevices(ctx, status.get()); CHECK_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get()); const int num_devices = TF_DeviceListCount(devices); for (int i = 0; i < num_devices; ++i) { const string dev_type(TF_DeviceListType(devices, i, status.get())); CHECK_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get());
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_test.cc
TFE_ContextListDevices(context.get(), status.get()), TF_DeleteDeviceList); ASSERT_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get()); bool has_tpu = false; for (int device_index = 0; device_index < TF_DeviceListCount(devices.get()); ++device_index) { std::string device_type = TF_DeviceListType(devices.get(), device_index, status.get()); ASSERT_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get());
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Tue Aug 06 23:56:17 UTC 2024 - 29.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_test.cc
float* m_float = static_cast<float*>(TF_TensorData(m_data)); TF_DeviceList* devices = TFE_ContextListDevices(ctx, status); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); int num_devices = TF_DeviceListCount(devices); for (int d = 0; d < num_devices; ++d) { const char* name = TF_DeviceListName(devices, d, status); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 03:14:26 UTC 2023 - 31.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api_test.cc
EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TFE_DeleteContext(ctx); EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); const int num_devices = TF_DeviceListCount(devices); EXPECT_GE(num_devices, 1) << "At least one CPU device should exist"; for (int i = 0; i < num_devices; ++i) { EXPECT_NE("", TF_DeviceListName(devices, i, status)) << i;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 20:50:20 UTC 2023 - 94.6K bytes - Viewed (0) -
tensorflow/c/c_api.h
// Deallocates the device list. TF_CAPI_EXPORT extern void TF_DeleteDeviceList(TF_DeviceList* list); // Counts the number of elements in the device list. TF_CAPI_EXPORT extern int TF_DeviceListCount(const TF_DeviceList* list); // Retrieves the full name of the device (e.g. /job:worker/replica:0/...) // The return value will be a pointer to a null terminated string. The caller
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Oct 26 21:08:15 UTC 2023 - 82.3K bytes - Viewed (0) -
tensorflow/c/c_api.cc
TF_DeviceList* response = new TF_DeviceList; if (session && session->session) status->status = session->session->ListDevices(&response->response); return response; } int TF_DeviceListCount(const TF_DeviceList* list) { return list->response.size(); } #define TF_DEVICELIST_METHOD(return_type, method_name, accessor, err_val) \
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 102.3K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
TF_SessionListDevices(session, s), TF_DeleteDeviceList); TF_DeviceList* device_list = list.get(); CHECK_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s); const int num_devices = TF_DeviceListCount(device_list); LOG(INFO) << "There are " << num_devices << " devices."; for (int i = 0; i < num_devices; ++i) { const char* device_name = TF_DeviceListName(device_list, i, s);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 97K bytes - Viewed (0)