Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 129 for getRank (0.17 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h

            tf_op.emitError("The input should have known rank for per-channel op.");
            return failure();
          }
          // This is a special case that the quant_dim is the last dimensions.
          quant_dim = input_type.getRank() - 1;
        }
        // Use the min/max from the operands and the num_bits and narrow_range
        // attribute to create the quantization parameter for the new quantize op.
        rewriter.setInsertionPointAfter(tf_op.getOperation());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

        if (PerAxis) {
          // This is a special case that the quant_dim is the last dimensions
          // according to the tf.FakeQuantWithMinMaxPerChannel.
          quant_dim = mlir::cast<ShapedType>(res.getType()).getRank() - 1;
        }
        // Use the min/max from the operands and the num_bits and narrow_range
        // attribute to create the quantization parameter for the new quantize op.
        rewriter.setInsertionPointAfter(tf_op.getOperation());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

              func, arg_number, symbol_table);
          if (!global_tensor) continue;
    
          auto arg_type = mlir::cast<RankedTensorType>(arg.getType());
          assert(arg_type.getRank() == 0);
          llvm::ArrayRef<TensorType> underlying_type =
              mlir::cast<TF::ResourceType>(arg_type.getElementType()).getSubtypes();
    
          // If the arg type already matches the global_tensor type, we don't need
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc

        if (std::isalpha(label)) {
          new_lhs.push_back(label);
        } else {
          // Encounter ellipsis: generate unnamed labels then insert to the new
          // labels.
          new_labels = GenerateLabels(lhs_ty.getRank() - lhs_named_label_count,
                                      available_labels);
          new_lhs.append(new_labels);
          i += 2;
        }
      }
    
      std::string new_rhs, new_rhs_labels;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.td

    // Checks if the value has rank of `n`.
    class HasRankOf<int n> : Constraint<
      CPred<"$0.getType().cast<ShapedType>().hasRank() && "
            "$0.getType().cast<ShapedType>().getRank() == " # n>,
      "Checks if the value has rank of 'n'.">;
    
    // Checks if the value has static shape.
    def HasStaticShapeConstraint : Constraint<CPred<"HasStaticShape($0)">>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 04:55:44 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc

                      .getBroadcastDimensions()
                : nullptr;
        if (broadcast_dims == nullptr) {
          const auto filter_rank = filter_value.getShapedType().getRank();
          auto dimsType = RankedTensorType::get({1}, rewriter.getIntegerType(64));
          broadcast_dims = DenseIntElementsAttr::get(dimsType, {filter_rank - 1});
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 22:21:19 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/utils/nms_utils.cc

      auto boxes_type =
          mlir::dyn_cast<RankedTensorType>(func_.getFunctionType().getInput(0));
      if (boxes_type == nullptr || !boxes_type.hasRank() ||
          boxes_type.getRank() != 2) {
        return func_.emitWarning() << "TFLite does not support batched input for "
                                      "non_max_suppression_padded";
      }
      return success();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/ir/tfl_ops.td

          ").getType().cast<ShapedType>().getRank() >= " # m>]>>;
    
    class TFL_OperandHasRankRange<int n, int x, int y> :
      PredOpTrait<"operand " # n # " has rank range [" # x # ", " # y # "]",
        Or<[TFL_OperandIsUnrankedPred<n>,
          CPred<"$_op.getOperand(" # n # ").getType().cast<ShapedType>().getRank() "
          ">= " # x # " && $_op.getOperand(" # n # ").getType().cast<ShapedType>()."
          "getRank() <= " # y>]>>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 186K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc

    // Converts the condition for an IfOp/WhileOp to a boolean value.
    Value ConvertConditionToBoolean(Operation* op, Value cond) {
      if (auto ranked_type = mlir::dyn_cast<RankedTensorType>(cond.getType()))
        if (ranked_type.getRank() == 0 &&
            ranked_type.getElementType().isSignlessInteger(1))
          return cond;
    
      OpBuilder builder(op);
      Value to_bool = builder.create<TF::ToBoolOp>(op->getLoc(), cond);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_patterns.td

      "GetHLOAxisFromTFAxis("
      "$0, $1.getType().cast<RankedTensorType>().getRank(), &$_builder)">;
    
    // Same as the above but with $1 of type operand_range from variadic TensorFlow
    // input.
    def GetHLOAxisFromTFAxisVariadic : NativeCodeCall<
      "GetHLOAxisFromTFAxis("
      "$0, (*$1.begin()).getType().cast<RankedTensorType>().getRank(), "
      "&$_builder)">;
    
    def CastElementsToI64Elements : NativeCodeCall<
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 06 18:46:23 UTC 2024
    - 34.8K bytes
    - Viewed (0)
Back to top