Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 608 for kDevice (0.11 sec)

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

          auto device = op->getAttrOfType<StringAttr>(kDevice);
          for (auto *operand : operands)
            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) {
    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/mlir/lite/experimental/tac/transforms/target_annotation.cc

      // TODO(b/177376459): Update if needed to make testing easy.
      if (!module_) {
        for (const auto& device : device_specs) {
          auto* hardware = this->GetTargetHardware(device);
          if (hardware == nullptr) continue;
          if (hardware->IsOpSupported(op)) {
            SetAnnotation(op, kDevice, device, builder);
            device_is_set = true;
            break;
          }
        }
      } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 19:32:06 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/experimental/tac/common/targets.h

      return name;
    }
    
    // Get the target annotation form the op.
    inline std::optional<std::string> GetTargetAnnotation(Operation* op) {
      auto device = op->getAttrOfType<StringAttr>(kDevice);
      if (device == nullptr || device.getValue().empty()) return std::nullopt;
    
      return GetCanonicalHardwareName(device.getValue().str());
    }
    
    // Get inference type attribute from the operation if available.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/experimental/tac/execution_metadata_exporter.cc

        return std::nullopt;
    
      if (!HasValidHardwareTarget(op)) return std::nullopt;
    
      auto device = op->getAttrOfType<mlir::StringAttr>(mlir::TFL::tac::kDevice);
      if (device == nullptr) return std::nullopt;
    
      llvm::StringRef device_name_str = device.getValue();
      return device_name_str.str();
    }
    
    std::optional<std::vector<float>> GetPerDeviceCosts(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 06:11:34 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/tests/graphdef2mlir/partial-device-name.pbtxt

      op: "Add"
      input: "input0"
      input: "input1"
      # If device type or id doesn't exist, assign a default one (device:CPU:0).
      device: "/job:localhost/replica:0/task:0"
      attr {
        key: "T"
        value {
          type: DT_INT32
        }
      }
    }
    node {
      name: "Mul"
      op: "Mul"
      input: "Add"
      input: "Add"
      # Empty device name should be kept untouched.
      device: ""
      attr {
        key: "T"
        value {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 26 20:48:36 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/experimental/tac/tests/e2e/device-transform-nnapi.mlir

    // RUN: tac-translate -input-mlir -output-mlir -device-specs=NNAPI %s -o - 2>&1 | FileCheck %s
    
    module {
      // CHECK-LABEL: main
      func.func @main(%arg0: tensor<4xf32>, %arg1: tensor<4xf32>) -> tensor<4xf32> {
        %0 = "tfl.squared_difference"(%arg0, %arg1) : (tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32>
        func.return %0 : tensor<4xf32>
        // CHECK:  [[VAL_0:%.*]] = tfl.sub %arg0, %arg1 {fused_activation_function = "NONE"} : tensor<4xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/tests/mlir2graphdef/device-arg-retval-attr.mlir

    // Verify arg/ret attributes are exported as device assignment for arg/retval
    // nodes.
    
    module attributes {tf.versions = {bad_consumers = [], min_consumer = 0 : i32, producer = 121 : i32}} {
      func.func @main(%arg0: tensor<*xf32> {tf.device = "/CPU:0"}, %arg1: tensor<2x4x6x8xi32>) -> (tensor<*xf32>, tensor<2x4x6x8xi32> {tf.device = "/CPU:1"})
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 25 12:28:56 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/tests/graphdef2mlir/device-arg-retval-attr.pbtxt

    # Verify arg and ret devices are added as arg and ret attributes.
    
    # CHECK-LABEL: func @main
    # CHECK-SAME:  (%[[ARG_0:[a-z0-9]+]]: tensor<*xf32> {tf.device = "/CPU:0"}, %[[ARG_1:[a-z0-9]+]]: tensor<2x4x6x8xi32>) -> (tensor<*xf32>, tensor<*xi32> {tf.device = "/CPU:1"})
    
    node {
      name: "args_0"
      op: "_Arg"
      device: "/CPU:0"
      attr {
        key: "T"
        value {
          type: DT_FLOAT
        }
      }
      attr {
        key: "index"
        value {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Dec 07 17:45:22 UTC 2020
    - 1.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/tests/device-transform-nnapi.mlir

    // RUN: tac-opt-all-backends -tfl-device-transform-nnapi %s -split-input-file -verify-diagnostics | FileCheck %s
    
    func.func @mean_4d_keepdim(%arg0: tensor<1x48x48x512xf32>) -> tensor<1x1x1x512xf32> {
      %cst = arith.constant dense<[1, 2]> : tensor<2xi32>
      %0 = "tfl.mean"(%arg0, %cst) {keep_dims = true} : (tensor<1x48x48x512xf32>, tensor<2xi32>) -> tensor<1x1x1x512xf32>
      func.return %0 : tensor<1x1x1x512xf32>
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/tests/graphdef2mlir/graph-device-retval.pbtxt

    A. Unique TensorFlower <******@****.***> 1605121757 -0800
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Nov 11 19:14:04 UTC 2020
    - 1.5K bytes
    - Viewed (0)
Back to top