Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 87 for IntegerAttr (0.22 sec)

  1. tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.h

    /// converted type in outConvertedType.
    ///
    /// Examples:
    /// 1. realValue is a primitive value attribute:
    /// (realValue: FloatAttr, quantizedElementType: UniformQuantizedType[i8:f32])
    ///   -> (IntegerAttr, outConvertedType: i8)
    /// 2. realValue is an elements attribute:
    /// (realValue: DenseElementsAttr[tensor<2x2xf32>],
    ///  quantizedElementType: UniformQuantizedType[i8:f32])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jul 29 18:55:28 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/tftext_utils.cc

      for (int i = 0; i < hash_seed.size(); i++) {
        fbb.Add(static_cast<int32_t>(
            mlir::dyn_cast<IntegerAttr>(*(hash_seed.getValue().data() + i))
                .getInt()));
      }
      fbb.EndVector(vector_start, /*typed=*/true, /*fixed=*/false);
    
      auto buckets = mlir::dyn_cast_or_null<IntegerAttr>(attrs.get("buckets"));
      fbb.Int("buckets", buckets.getInt());
    
      fbb.EndMap(start_map);
      fbb.Finish();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h

        FloatAttr attr = FloatAttr::get(float_ty, raw_value);
        return DenseElementsAttr::get(scalar_ty, attr);
      } else if (auto int_ty = mlir::dyn_cast<IntegerType>(ty)) {
        IntegerAttr attr = IntegerAttr::get(int_ty, raw_value);
        return DenseElementsAttr::get(scalar_ty, attr);
      } else if (auto complex_ty = mlir::dyn_cast<ComplexType>(ty)) {
        Type complex_element_ty = complex_ty.getElementType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/utils/perception_ops_utils.cc

               << "'" << attr_name << "' attribute for " << kMaxUnpooling
               << " must be set and has size of " << N;
      }
      for (Attribute integer_attr : array_attr.getValue()) {
        IntegerAttr value = mlir::dyn_cast<IntegerAttr>(integer_attr);
        if (!value) {
          return func->emitWarning()
                 << "'" << attr_name << "' attribute for " << kMaxUnpooling
                 << " does not contain integer values";
        }
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_common.cc

                                           mlir::Type tensor_type,
                                           const ParseExecuteOpOptions &options) {
      auto chain_type = builder.getType<compiler::ChainType>();
    
      mlir::IntegerAttr op_key;
      mlir::IntegerAttr cost;
      mlir::StringAttr device;
      mlir::StringAttr op_name;
      mlir::SymbolRefAttr f;
      llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand, 4> in_chains;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfrt/tests/analysis/update_op_cost_in_tfrt_mlir_test.cc

      absl::flat_hash_map<int64_t, uint64_t> op_cost_map;
      op.walk([&](mlir::Operation* op) {
        const auto cost_attr = op->getAttrOfType<mlir::IntegerAttr>(kCostAttrName);
        if (!cost_attr) return;
        const auto op_key_attr =
            op->getAttrOfType<mlir::IntegerAttr>(kOpKeyAttrName);
        if (!op_key_attr) return;
        op_cost_map[op_key_attr.getInt()] = cost_attr.getInt();
      });
      return op_cost_map;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jul 21 22:52:12 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_partitioned_op_conversion.cc

        : public impl::TPUPartitionedOpConversionPassBase<
              TPUPartitionedOpConversionPass> {
      void runOnOperation() override;
    };
    
    template <typename T>
    LogicalResult ReplacePartitionedOp(IntegerAttr num_cores_per_replica, T op) {
      constexpr bool is_input =
          std::is_same_v<std::decay_t<T>, TF::TPUPartitionedInputOp>;
      static_assert(
          is_input || std::is_same_v<std::decay_t<T>, TF::TPUPartitionedOutputOp>,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td

    // Extract the ith int element from an ArrayAttr $0 as an 32-bit IntegerAttr
    // with builder.
    class ExtractI32At<int i> : NativeCodeCall<
        "$_builder.getI32IntegerAttr($_self.cast<ArrayAttr>().getValue()[" # i #
        "].cast<IntegerAttr>().getInt())">;
    
    // Use the tensor type information from $0 and convert min $1, max $2 and
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 04 13:30:42 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/quantization/import_quant_stats_pass.cc

                            const QuantParamsEntry &info);
    
      void InsertStatsOpAtResult(OpBuilder b, Value res, ElementsAttr layer_stats,
                                 ElementsAttr axis_stats, IntegerAttr axis);
    
      // If the index is out of range, this method returns false. Otherwise it
      // returns true if the value is a float tensor.
      bool IsQuantizableResult(Operation *op, int index) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 10:41:08 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

    DECL_CONVERT_OP(Conv3D);
    DECL_CONVERT_OP(Conv3DBackpropInputV2);
    
    #undef DECL_CONVERT_OP
    
    // Converts any IntegerAttr to an IntegerAttr of an i32 type.
    // The value won't change in the new attribute, but if the value is out of
    // the bound of i32, the function returns a failure.
    LogicalResult ConvertToI32Attr(IntegerAttr attr, IntegerAttr* attr_i32) {
      if (attr.getType().isInteger(/*width=*/32)) {
        *attr_i32 = attr;
        return success();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top