Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 138 for getDevice (0.14 sec)

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

            propagateIfChanged(operand, operand->SetDevice(device));
        } else {
          // Propagate device through other ops. These ops might have their
          // own device annotation, but that's fine. We only care about
          // where the TPUExecute ops live.
          StringAttr device;
          for (const Device *d : results) {
            if (d->hasDevice()) {
              device = d->getDevice();
              break;
            }
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 23 00:30:27 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/xla_platform_info_test.cc

    };
    
    #if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
    TEST_F(XlaPlatformInfoTest, BuildXlaDeviceCompilerXlaDeviceMetadata) {
      device_setup_.AddDevicesAndSetUp({DEVICE_XLA_GPU});
    
      Device* device = device_setup_.GetDevice(DEVICE_XLA_GPU);
      const XlaDevice::Metadata* metadata = nullptr;
      TF_CHECK_OK(XlaDevice::GetMetadataFromDevice(device, &metadata));
      XlaPlatformInfo platform_info = XlaPlatformInfoFromDevice(device);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Jan 14 15:17:12 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/jit/xla_compiler_options_util_test.cc

      }
    
      DeviceSetup device_setup_;
    };
    
    TEST_F(XlaCompilerOptionsTest, PjRtOptionsXlaDevice) {
      device_setup_.AddDevicesAndSetUp({DEVICE_XLA_GPU});
      Device* device = device_setup_.GetDevice(DEVICE_XLA_GPU);
      DeviceType compilation_device_type = DeviceType(DEVICE_GPU_XLA_JIT);
    
      se::Platform::Id platform_id = nullptr;
      auto xla_device_metadata = CreateXlaDeviceMetadata(compilation_device_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Dec 29 01:41:20 UTC 2023
    - 14.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/jit/pjrt_compile_util_test.cc

    TEST(PjrtCompileUtilTest, CompileToPjRtLoadedExecutable) {
      DeviceSetup device_setup;
      TF_ASSERT_OK_AND_ASSIGN(auto fdef, SampleFuntionAddXY("foo"));
      device_setup.AddDevicesAndSetUp({DEVICE_GPU}, fdef);
    
      Device* device = device_setup.GetDevice(DEVICE_GPU);
      const XlaPlatformInfo platform_info = XlaPlatformInfoFromDevice(device);
    
      NameAttrList function;
      function.set_name("foo");
    
      ResourceMgr resource_mgr("");
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Aug 21 23:21:57 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc

            return WalkResult::advance();
          } else if (device_str_attr.getValue() != launch.getDevice()) {
            return launch.emitOpError()
                   << "inner op has conflicting 'device' attribute, "
                      "got '"
                   << device_str_attr.getValue() << "' but expected '"
                   << launch.getDevice() << "'";
          }
        } else {
          return launch.emitOpError()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/cluster_formation.cc

      // Ensure that users of the launch op's results appear after the launch op
      // in order to preserve the dominance property.
      TF::ReorderOpResultUses(launch_op);
    }
    
    std::string GetDevice(Operation* op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      return device_attr ? device_attr.getValue().str() : "";
    }
    
    bool CanBeIgnoredInCluster(Operation* op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Oct 05 13:30:21 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/cluster_util_test.cc

      OwningOpRef<ModuleOp> mlir_module;
      auto status =
          tensorflow::DeserializeMlirModule(string, context, &mlir_module);
      if (!status.ok()) {
        return status;
      }
      return mlir_module;
    }
    
    std::string GetDevice(Operation* op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      return device_attr ? device_attr.getValue().str() : "";
    }
    
    bool CanBeIgnoredInCluster(Operation* op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/pjrt_tensor_buffer_util_test.cc

    namespace tensorflow {
    namespace {
    
    TEST(PjRtTensorBufferUtilTest, MakeTensorFromPjRtBuffer) {
      DeviceSetup device_setup;
      device_setup.AddDevicesAndSetUp({DEVICE_GPU});
      Device* device = device_setup.GetDevice(DEVICE_GPU);
      std::vector<int64_t> dimensions = {2, 3};
      Tensor dest_cpu_tensor(cpu_allocator(), tensorflow::DT_INT32,
                             tensorflow::TensorShape(dimensions));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 14 18:14:47 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/test_util.h

    // Helps set up devices for unit tests.
    class DeviceSetup {
     public:
      void AddDevicesAndSetUp(
          const std::vector<std::string>& device_names,
          const std::optional<FunctionDef>& fdef = std::nullopt);
      Device* GetDevice(const string& device_name);
      FunctionLibraryRuntime* flr() { return flr_; }
    
     private:
      FunctionLibraryRuntime* flr_;
      std::unique_ptr<DeviceMgr> device_mgr_;
      std::unique_ptr<FunctionLibraryDefinition> lib_def_;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 16 18:03:15 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/test_util.cc

          TF_GRAPH_DEF_VERSION, lib_def_.get(), opts,
          /*default_thread_pool=*/nullptr, /*cluster_flr=*/nullptr);
      flr_ = pflr_->GetFLR("/job:localhost/replica:0/task:0/cpu:0");
    }
    
    Device* DeviceSetup::GetDevice(const string& device_name) {
      if (device_mgr_ == nullptr) {
        return nullptr;
      }
    
      string full_device_name = absl::StrCat(
          "/job:localhost/replica:0/task:0/device:", device_name, ":0");
      Device* device;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 09 11:36:41 UTC 2024
    - 3.7K bytes
    - Viewed (0)
Back to top