Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 57 of 57 for m_Constant (0.21 sec)

  1. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

            // The input of this QuantizeOp has already been quantized, i.e.
            // rescale.
            return failure();
          }
          DenseFPElementsAttr attr;
          if (matchPattern(quantize_operand, m_Constant(&attr))) {
            // Const-> QuantizeOp pattern will be handled separately.
            return failure();
          }
          if (Operation* quantizing_op = quantize_operand.getDefiningOp()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

                                           xla::TypeToShape(operand.getType()),
                                           std::to_string(operand_index));
    
      if (defining_op && matchPattern(defining_op, m_Constant(&const_attr))) {
        tensorflow::Tensor tensor;
        auto status = tensorflow::ConvertToTensor(const_attr, &tensor);
        if (!status.ok()) {
          op->emitRemark() << "skipping legalization due to failed const conversion"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

        Attribute arg_value;
        // A failure indicates the argument isn't a constant value, so we should
        // not use it as an attribute.
        if (!matchPattern(input, m_Constant(&arg_value))) {
          return failure();
        }
        auto attr_name = signature.getArgAttrOfType<StringAttr>(
            operand.index(), kAttrArgumentNameAttr);
        auto attr_type = signature.getArgAttrOfType<StringAttr>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

        getUsedValuesDefinedAbove(*region, region_extern_values);
    
        // Sink down constants into the functions.
        for (auto extern_value : region_extern_values) {
          if (!matchPattern(extern_value, m_Constant())) {
            extern_values.insert(extern_value);
            continue;
          }
          // Add constant at start of region.
          auto const_builder = OpBuilder::atBlockBegin(&region->front());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc

      }
      return true;
    }
    
    bool QuantizationDriver::SetConstantResultParams(Operation* op) {
      DenseFPElementsAttr attr;
      const Value result = op->getResult(0);
      if (!matchPattern(result, m_Constant(&attr))) {
        return false;
      }
      // TODO: b/323478683 - Make storage_type_width and narrow_range configurable.
      Type final_type;
      const auto it = optimized_weights_.find(op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 38.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

     private:
      LogicalResult matchAndRewrite(quantfork::QuantizeCastOp q_op,
                                    PatternRewriter& rewriter) const override {
        DenseFPElementsAttr attr;
        if (!matchPattern(q_op.getArg(), m_Constant(&attr))) {
          return failure();
        }
    
        ShapedType tensor_qtype =
            mlir::cast<ShapedType>(q_op.getResult().getType());
        Attribute tensor_proto_attr = Quantize(attr, tensor_qtype);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

      }
      if (op_name == "tfl.reshape") {
        // Flattens reshape ops when more than one dimension shape operand is given.
        mlir::DenseIntElementsAttr shape_attr;
        if (matchPattern(op_state.operands[1], m_Constant(&shape_attr))) {
          auto shape_ty =
              op_state.operands[1].getType().dyn_cast<RankedTensorType>();
          if (shape_ty != nullptr && shape_ty.hasRank() && shape_ty.getRank() > 1) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
Back to top