Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 40 for TypeAttr (0.19 sec)

  1. tensorflow/compiler/mlir/lite/transforms/quantize_variables.cc

              builder.setInsertionPoint(assign_variable_op);
              auto new_q_op = builder.create<QuantizeOp>(
                  assign_variable_op.getLoc(), ref_qtype, dq_op.getInput(),
                  TypeAttr::get(ref_qtype));
              auto new_assign_variable_op = builder.create<AssignVariableOp>(
                  assign_variable_op.getLoc(), assign_variable_op.getResourceId(),
                  new_q_op.getResult());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

        if (input_types.size() <= 1) return;
    
        Type target_input_type = mlir::cast<TypeAttr>(input_types[0]).getValue();
        auto result_type = UnrankedTensorType::get(target_input_type);
        for (auto i = 1; i < input_types.size(); ++i) {
          Type current_input_type = mlir::cast<TypeAttr>(input_types[i]).getValue();
          if (current_input_type != target_input_type) {
            input_values[i] =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/modify_io_nodes.cc

            returned_type = quant::ConvertSignedQuantizedToUnsigned(
                dequantize_input.getType(), dequantize_op.getLoc());
            // replace the dequantize op by a quantize op
            TypeAttr type_attr = TypeAttr::get(returned_type);
            auto quantize_op = builder.create<QuantizeOp>(
                dequantize_op.getLoc(), returned_type, dequantize_input, type_attr);
            returned_value = quantize_op.getOutput();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/utils/convert_type.cc

      }
    }
    
    mlir::Type GetShapeStrippedType(mlir::TypeAttr type_attr) {
      auto type = type_attr.getValue();
      auto shaped_type = mlir::dyn_cast<mlir::ShapedType>(type);
      if (shaped_type) {
        return shaped_type.getElementType();
      } else {
        return type;
      }
    }
    
    bool NotFromQuantOpOrSameQuantType(mlir::Value val, mlir::TypeAttr qtype_attr) {
      auto val_defn_op = val.getDefiningOp();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

                           legacy_float_scale, use_fake_quant_num_bits);
      if (!final_type) return {};
      return TypeAttr::get(final_type);
    }
    
    TypeAttr CastQuantizedTypeAttrFromExpressedType(const Builder builder,
                                                    const TypeAttr source,
                                                    const Type target,
                                                    const int axis) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/default_quant_params.cc

      Operation *op = value.getDefiningOp();
      if (op) {
        builder.setInsertionPoint(&block, ++Block::iterator(op));
      } else {
        builder.setInsertionPointToStart(&block);
      }
      TypeAttr type_attr = TypeAttr::get(new_type);
      auto quantize = builder.create<TFL::QuantizeOp>(value.getLoc(), new_type,
                                                      value, type_attr);
      auto dequantize = builder.create<TFL::DequantizeOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/quantization/lite/tfl_to_std.cc

        } else if (auto q = llvm::dyn_cast<quantfork::QuantizeCastOp>(op)) {
          auto out_type = q.getResult().getType();
          auto qcast = b.create<QuantizeOp>(q.getLoc(), out_type, q.getArg(),
                                            TypeAttr::get(out_type));
          q.getResult().replaceAllUsesWith(qcast);
          if (auto extra_attr = op->getAttr(mlir::quant::kVolatileOpAttrName)) {
            qcast->setAttr(mlir::quant::kVolatileOpAttrName, extra_attr);
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 02:50:01 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

      auto new_filter_constant_value_attr =
          DenseIntElementsAttr::get(new_filter_value_attr_type, new_filter_values);
      return rewriter.create<TFL::QConstOp>(
          filter_constant_op.getLoc(),
          /*output=*/TypeAttr::get(new_filter_result_type),
          /*value=*/new_filter_constant_value_attr);
    }
    
    // Creates the `tfl.qconst` for filter. If `rhs_op` is a `stablehlo.constant`,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

      if (tensorflow::IsRefType(dtype)) dtype = tensorflow::RemoveRefType(dtype);
      value->set_type(dtype);
      return absl::OkStatus();
    }
    
    Status ConvertAttribute(const mlir::TypeAttr& type, bool remove_ref_type,
                            AttrValue* value) {
      return ConvertAttribute(type.getValue(), remove_ref_type, value);
    }
    
    Status ConvertAttribute(const mlir::UnitAttr& attr, AttrValue* value) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfr/ir/tfr_ops.td

    def TFR_allowedArgType : Type<Or<[
        TFR_AllTensorTypes.predicate,
        TFR_AllAttrTypes.predicate]>, "allowed tfr.call operand types">;
    
    def TFR_allowedConstValues : Attr<Or<[
        FlatSymbolRefAttr.predicate,
        TypeAttr.predicate,
        StrAttr.predicate,
        ArrayAttr.predicate]>, "allowed tfr.constant value"> {
      let storageType = "Attribute";
      let returnType = "Attribute";
      let convertFromStorage = "$_self";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 10:54:29 UTC 2024
    - 17.4K bytes
    - Viewed (0)
Back to top