Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for identity_op (0.43 sec)

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

      if (!classes_attr) {
        // Attempt to parse "_class" from the IdentityOp that follows VariableV2.
        // For read-only reference variables, IdentityOp should be the only user of
        // VariableV2.
        auto identity_op = op->getUsers().begin();
        classes_attr = identity_op->getAttrOfType<ArrayAttr>(kClassAttr);
        if (!classes_attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc

    struct TensorDeviceCopyConversionPass
        : public impl::TensorDeviceCopyConversionPassBase<
              TensorDeviceCopyConversionPass> {
      void runOnOperation() override;
    };
    
    // Folds tf.IdentityOp and tf.IdentityNOp if op device and the argument devices
    // from the defining ops match.
    void TensorDeviceCopyConversionPass::runOnOperation() {
      func::FuncOp func_op = getOperation();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.h

    class IdentityOp;
    class IdentityNOp;
    
    // Returns if a value corresponds to a constant, returns the matched constant
    // as an attribute.
    template <typename AttrT>
    bool GetValueAsConstant(Value val, AttrT &attr) {
      while (auto result = mlir::dyn_cast<OpResult>(val)) {
        Operation *op = result.getOwner();
        if (!isa<IdentityOp>(op) && !isa<IdentityNOp>(op)) break;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.cc

              // clang-format off
              // go/keep-sorted start
              TF::AvgPoolOp,
              TF::ConcatOp,
              TF::ConcatV2Op,
              TF::ExpandDimsOp,
              TF::IdentityNOp,
              TF::IdentityOp,
              TF::MaxPoolOp,
              TF::PadV2Op,
              TF::RankOp,
              TF::ReshapeOp,
              TF::SelectOp,
              TF::SelectV2Op,
              TF::ShapeNOp,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/tests/legalize-tf-while.mlir

    func.func @while_main(%arg0: tensor<?x256x256xf32>) -> (tensor<i32>, tensor<256x256xf32>, tensor<?x256x256xf32>) attributes {tf.entry_function = {inputs = "input", outputs = "Identity,Identity_1,Identity_2"}} {
      %cst = arith.constant dense<1.000000e+00> : tensor<256x256xf32>
      %cst_0 = arith.constant dense<0> : tensor<i32>
      %cst_1 = arith.constant dense<-1> : tensor<i32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc

    #include "mlir/IR/Matchers.h"  // from @llvm-project
    #include "mlir/IR/TypeUtilities.h"  // from @llvm-project
    #include "mlir/Support/LLVM.h"  // from @llvm-project
    
    namespace mlir {
    namespace TF {
    
    class IdentityOp;
    class IdentityNOp;
    
    // Returns the RankedTensorType for the given operand. TensorFlow constant ops
    // may have non-static shape because the shape is not propagated during constant
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.h

      auto is_valid_broadcasting = [](ShapedType operand_ty, ShapedType identity_ty,
                                      ShapedType result_ty) -> bool {
        // Scalar identity is broadcastable to any operand shape, we only need to
        // check that operand has the same shape as a result.
        bool scalar_identity = identity_ty.hasRank() && identity_ty.getRank() == 0;
        if (scalar_identity) return operand_ty == result_ty;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfrt/tests/ifrt/tf_identity_propagation.mlir

      %0 = "tf.Identity"(%arg0) {_XlaSharding = ""} : (tensor<i32>) -> tensor<i32>
      // CHECK: return %[[OUTPUT]]
      func.return %0 : tensor<i32>
    }
    
    // CHECK-LABEL: func @identity_n
    // CHECK-SAME:    (%[[ARG0:.*]]: tensor<i32>, %[[ARG1:.*]]: tensor<f32>)
    func.func @identity_n(%arg0: tensor<i32>, %arg1: tensor<f32>) -> (tensor<i32>, tensor<f32>) {
      // CHECK-NOT: "tf.IdentityN"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Mar 23 23:34:42 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/annotate_parameter_replication.cc

      void runOnOperation() override;
    };
    
    // Returns the first value in the chain of operands, which is not defined by a
    // tf.IdentityOp or a tf.ReadVariableOp.
    Value SkipIdentityAndReadVariable(Value v) {
      while (auto op = v.getDefiningOp()) {
        if (!isa<TF::IdentityOp, TF::ReadVariableOp>(op)) break;
        v = op->getOperand(0);
      }
      return v;
    }
    
    void AnnotateParameterReplicationPass::runOnOperation() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

        DenseFPElementsAttr min_value, max_value;
        if (auto id1 = dyn_cast_or_null<TF::IdentityOp>(min.getDefiningOp())) {
          id1.replaceAllUsesWith(id1.getInput());
          min = tf_op.getMin();
          rewriter.eraseOp(id1);
        }
        if (auto id2 = dyn_cast_or_null<TF::IdentityOp>(max.getDefiningOp())) {
          id2.replaceAllUsesWith(id2.getInput());
          max = tf_op.getMax();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top