Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for device_num (0.3 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/replica_id_to_device_ordinal.cc

      // Get the number of devices per host.
      int device_num = 0;
      mlir::TF::RuntimeDevices devices;
      if (failed(tensorflow::GetDevicesFromOp(
              getOperation()->getParentOfType<ModuleOp>(), &devices)))
        return signalPassFailure();
      for (const auto& device_name : devices.device_names()) {
        if (device_name.has_type && device_name.type == "TPU") ++device_num;
      }
    
      if (device_num == 0) return;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/device_util.h

    // `tf.devices` dictionary attribute with a full device name as a key, and
    // device metadata as a value.
    //
    // Device names added in full parsed device form:
    //   /job:<name>/replica:<replica>/task:<task>/device:<type>:<device_num>
    //
    // Supported device metadata types:
    // (1) GpuDeviceMetadata: GPU device compute capability.
    void AddDevicesToOp(mlir::Operation* op, const DeviceSet* device_set);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 05 20:02:33 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  3. tensorflow/c/eager/c_api_experimental.h

                                                        void* device_info,
                                                        TF_Status* status);
    
    // Returns whether `device_name` maps to a registered custom device.
    TF_CAPI_EXPORT extern bool TFE_IsCustomDevice(TFE_Context* ctx,
                                                  const char* device_name);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 22:37:46 UTC 2024
    - 39.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/pjrt_base_device.cc

                                                   const string& device_name,
                                                   int device_ordinal) {
      return Device::BuildDeviceAttributes(
          absl::StrCat(name_prefix, "/device:", device_name, ":", device_ordinal),
          DeviceType(device_name), Bytes(16ULL << 30), DeviceLocality(),
          absl::StrCat("device: ", device_name, " device"));
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 12:19:41 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. tensorflow/c/eager/parallel_device/parallel_device_test.cc

          cpu_value.get(), context.get(), device_name, status.get()));
      EXPECT_EQ(TF_GetCode(status.get()), TF_UNIMPLEMENTED);
    
      std::array<TFE_TensorHandle*, 2> components{cpu_value.get(), cpu_value.get()};
      TensorHandlePtr device_value = CreatePerDeviceValues(
          context.get(), components, device_name, status.get());
      ASSERT_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jul 08 23:47:35 UTC 2021
    - 29.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/test_util.cc

        const std::optional<FunctionDef>& fdef) {
      SessionOptions options;
      auto* device_count = options.config.mutable_device_count();
      for (const auto& device_name : device_names) {
        device_count->insert({device_name, 1});
      }
    
      std::vector<std::unique_ptr<Device>> devices;
      TF_CHECK_OK(DeviceFactory::AddDevices(
          options, "/job:localhost/replica:0/task:0", &devices));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 11:36:41 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/experimental/tac/execution_metadata_exporter.cc

      for (auto& func : *funcs) {
        func.walk([&hardware_names, &index](mlir::Operation* op) {
          auto device_name = GetDeviceName(op);
          if (!device_name.has_value()) return;
    
          auto iter = hardware_names->find(*device_name);
          if (iter == hardware_names->end()) {
            hardware_names->insert({*device_name, index++});
          }
        });
      }
    
      // Build the flatbuffer.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 06:11:34 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. tensorflow/c/eager/parallel_device/parallel_device.h

    namespace tensorflow {
    namespace parallel_device {
    
    // Allocate a parallel device named `device_name` which forwards operations to
    // `underlying_devices`, maintaining "parallel tensors" with components placed
    // on each underlying device.
    //
    // For example if `device_name` is
    //   "/job:localhost/replica:0/task:0/device:CUSTOM:0"
    // and `underlying_devices` is
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 04 21:49:16 UTC 2020
    - 2.9K bytes
    - Viewed (0)
  9. tensorflow/c/eager/c_api_test_util.cc

      TFE_OpSetAttrShape(op, "shape", {}, 0, status);
      TFE_OpSetAttrString(op, "container", "localhost", 0);
      TFE_OpSetAttrString(op, "shared_name", "", 0);
      if (!device_name.empty()) {
        TFE_OpSetDevice(op, device_name.c_str(), status);
      }
      if (TF_GetCode(status) != TF_OK) return nullptr;
      TFE_TensorHandle* var_handle = nullptr;
      int num_retvals = 1;
      TFE_Execute(op, &var_handle, &num_retvals, status);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 22:37:46 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  10. tensorflow/c/eager/custom_device_testutil.cc

    #include "tensorflow/c/tf_status.h"
    #include "tensorflow/core/lib/gtl/cleanup.h"
    #include "tensorflow/core/platform/test.h"
    
    namespace {
    
    struct LoggingDevice {
      tensorflow::string device_name;
      tensorflow::string underlying_device;
      // Set to true whenever a TensorHandle is copied onto the device
      bool* arrived_flag;
      // Set to true whenever an operation is executed
      bool* executed_flag;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 03 20:47:31 UTC 2021
    - 8.3K bytes
    - Viewed (0)
Back to top