Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for RuntimeDevices (0.33 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_device_helper.h

    namespace mlir {
    
    class Operation;
    
    namespace TF {
    
    class RuntimeDevices;
    
    // Returns true if at least one GPU device is available at runtime.
    bool CanUseGpuDevice(const RuntimeDevices &devices);
    
    // Returns true if all of the GPUs available at runtime support TensorCores
    // (NVIDIA compute capability >= 7.0).
    bool CanUseTensorCores(const RuntimeDevices &devices);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Nov 12 21:57:12 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/device_util_test.cc

    TEST(DeviceUtilTest, GetDevicesFromOpNoDevicesAttribute) {
      mlir::MLIRContext context;
      mlir::OwningOpRef<mlir::ModuleOp> module_ref =
          mlir::ModuleOp::create(mlir::UnknownLoc::get(&context));
    
      mlir::TF::RuntimeDevices devices;
      EXPECT_TRUE(mlir::succeeded(GetDevicesFromOp(*module_ref, &devices)));
    }
    
    TEST(DeviceUtilTest, GetDevicesFromOpBadDevicesAttributeType) {
      mlir::MLIRContext context;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_structs.cc

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_structs.h"
    
    #include <optional>
    
    namespace mlir {
    namespace TF {
    
    void RuntimeDevices::AddDevice(const ParsedName& device) {
      device_names_.push_back(device);
    }
    
    void RuntimeDevices::AddGpuDevice(const ParsedName& device,
                                      const GpuDeviceMetadata& metadata) {
      device_names_.push_back(device);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_device_helper.cc

    // Returns true if at least one GPU device is available at runtime.
    bool CanUseGpuDevice(const RuntimeDevices &devices) {
      return llvm::any_of(devices.device_names(), IsGpuDevice);
    }
    
    // Returns true if all of the GPUs available at runtime support TensorCores
    // (NVIDIA compute capability >= 7.0).
    bool CanUseTensorCores(const RuntimeDevices &devices) {
      auto has_tensor_cores = [&](const DeviceNameUtils::ParsedName &device) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 21 08:41:18 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/device_util.cc

    // `tf.devices` and remove this function.
    mlir::LogicalResult GetDevicesFromOp(mlir::Operation* op,
                                         mlir::ArrayAttr array_attr,
                                         mlir::TF::RuntimeDevices* devices) {
      DeviceNameUtils::ParsedName device;
    
      for (const auto& kv : llvm::enumerate(array_attr)) {
        const int idx = kv.index();
    
        auto string_attr = mlir::dyn_cast<mlir::StringAttr>(kv.value());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util_test.cc

      auto cluster = builder.create<mlir::tf_device::ClusterOp>(
          mlir::UnknownLoc::get(&context), result_types);
      cluster->setAttr(kDeviceAssignmentAttr, builder.getArrayAttr({}));
    
      mlir::TF::RuntimeDevices devices;
      std::string host_device;
      EXPECT_TRUE(mlir::failed(
          GetHostDeviceOutsideComputation(devices, cluster, &host_device)));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/device_util.h

    // failure if can't parse device metadata from the attribute.
    mlir::LogicalResult GetDevicesFromOp(mlir::Operation* op,
                                         mlir::TF::RuntimeDevices* devices);
    
    // Parses a device string and returns its ordinal (id). This will return an
    // error if the device string is invalid or has no id.
    mlir::LogicalResult GetDeviceOrdinalFromDeviceString(mlir::Location loc,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 05 20:02:33 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util.cc

    }
    
    bool HasTPUDevice(const mlir::TF::RuntimeDevices& devices) {
      for (const auto& device : devices.device_names()) {
        if (device.has_type && device.type == "TPU") return true;
      }
      return false;
    }
    
    mlir::LogicalResult GetHostDeviceOutsideCompilationInGenericPipeline(
        mlir::TF::RuntimeDevices devices, std::string* host_device) {
      for (const auto& device : devices.device_names()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 10 20:10:40 UTC 2024
    - 32.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util.h

    // Returns true if the devices list contain any TPU devices
    bool HasTPUDevice(const mlir::TF::RuntimeDevices& devices);
    
    // Returns the host device used for outside compilation in generic pipeline.
    mlir::LogicalResult GetHostDeviceOutsideCompilationInGenericPipeline(
        mlir::TF::RuntimeDevices devices, std::string* host_device);
    
    // Parses XLA compilation and execution devices from a tf_device.cluster and
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_structs.h

    // Tensorflow devices available at runtime with corresponding metadata if it is
    // available. It's completely valid to have a device without any metadata
    // attached to it.
    class RuntimeDevices {
      using DeviceNameUtils = ::tensorflow::DeviceNameUtils;
      using ParsedName = ::tensorflow::DeviceNameUtils::ParsedName;
    
     public:
      // Adds a device with and empty metadata. Device can be of any type.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 2.6K bytes
    - Viewed (0)
Back to top