Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 190 for StringAttr (0.37 sec)

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

      void runOnOperation() override;
    
     private:
      bool ShouldPreserveOp(Operation* op);
      bool ShouldPreserveIsland(IslandOp island);
      void PruneGraph(GraphOp graph);
    
      llvm::SmallDenseSet<mlir::StringAttr, 4> ops_to_preserve_ids_;
    };
    
    // Checks if a tf_executor.Graph can be pruned.
    // For TensorFlow V1.0 compatibility: when importing a graph without providing
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 7.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/replicate_invariant_op_hoisting.cc

    };
    
    // Check if op directly uses a key in `virtual_devices`.
    bool DirectUseOfVirtualDevice(const DictionaryAttr& virtual_devices,
                                  Operation* op) {
      StringAttr op_device = op->getAttrOfType<StringAttr>(kDeviceAttr);
      if (!op_device) return false;
      if (virtual_devices.get(op_device.getValue())) return true;
      return false;
    }
    
    // Check if op or its ancestor uses a key in `virtual_devices`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/constant_fold_utils.cc

        return failure();
      }
    
      // Builds TF operation and sets all the attributes.
      std::string node_name = "unnamed";
      if (const StringAttr attr = inst->getAttrOfType<StringAttr>("name")) {
        node_name = std::string(attr.getValue());
      }
      absl::StatusOr<std::unique_ptr<tensorflow::NodeDef>> node_def =
          tensorflow::ConvertTFDialectOpToNodeDef(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

        if (!matchPattern(input, m_Constant(&arg_value))) {
          return failure();
        }
        auto attr_name = signature.getArgAttrOfType<StringAttr>(
            operand.index(), kAttrArgumentNameAttr);
        auto attr_type = signature.getArgAttrOfType<StringAttr>(
            operand.index(), kAttrArgumentTypeAttr);
        auto value = ProcessAttributeValue(arg_value, attr_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

      // propagated to the reduce function call.
      reduce_call->setAttr(kDeviceAttr,
                           reduce_dataset->getAttrOfType<StringAttr>(kDeviceAttr));
      reduce_call->setAttr(
          TF::kCompileDeviceTypeAttr,
          reduce_dataset->getAttrOfType<StringAttr>(TF::kCompileDeviceTypeAttr));
    
      SmallVector<Value, 4> if_returns;
    
      builder.create<TF::YieldOp>(loc,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool.h

    // attribute to be passed to the a tfl.average_pool_2d that can fully replace
    // this composite (here, padding is done directly by the tfl.average_pool_2d as
    // opposed to being extracted into a separate tfl.pad).
    StringAttr GetAvgPoolOpPadAttr(Builder& builder, mhlo::CompositeOp op);
    
    // Get dense attr for a matrix that corrects the over counting of divisors when
    // casting an average pool with ceil mode on in terms of average pool with it
    // off.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_cluster_cleanup_attributes.cc

          // on a single device cluster, this private attribute is no longer
          // needed.
          op->removeAttr(kClassAttr);
          if (auto attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) {
            // Preserve device attribute if the op is placed on a replicated core
            // device. Device attribute is used to infer the appropriate sharding
            // within TPUs for this op.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/utils/cluster_util_test.cc

        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) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      return !device_attr || device_attr.getValue().empty();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

      mlir::Builder builder(context);
      StringAttr resource_name_id = builder.getStringAttr(kResourceNameArgAttr);
    
      SmallSet<StringRef, 4> resource_names;
    
      for (func::FuncOp func : module.getOps<func::FuncOp>()) {
        for (int i = 0, e = func.getNumArguments(); i < e; ++i) {
          auto resource_arg =
              func.getArgAttrOfType<StringAttr>(i, kResourceNameArgAttr);
          if (!resource_arg) continue;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/utils/side_effect_analysis_util.cc

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_types.h"
    
    namespace mlir {
    namespace TF {
    
    std::string GetDeviceAttrAsResourceInstanceStr(mlir::Operation* op) {
      auto device_attr = op->getAttrOfType<StringAttr>("device");
      // Treat missing device attribute like unspecified (= empty string) attribute.
      // Note that different op instances with the same string (including empty
      // string) are seen as dependent (same resource instance).
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 16 00:33:17 UTC 2023
    - 2.4K bytes
    - Viewed (0)
Back to top