Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for IntegerAttr (0.17 sec)

  1. 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)
  2. 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)
  3. tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.cc

    using namespace mlir;
    using namespace mlir::quantfork;
    
    /// Converts a possible primitive, real expressed value attribute to a
    /// corresponding storage attribute (typically FloatAttr -> IntegerAttr).
    /// quantizedElementType is the QuantizedType that describes the expressed
    /// origValue.
    /// Returns a converter Attribute or nullptr if conversion is not possible.
    static Attribute convertPrimitiveValueAttr(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc

      int64_t prev_index = -1;
      for (auto arg_index_attr : getVariableArgIndicesAttr()) {
        if (!mlir::isa_and_nonnull<mlir::IntegerAttr>(arg_index_attr)) {
          return emitOpError() << "variable_arg_indices must be an integer";
        }
    
        int64_t index = mlir::dyn_cast<mlir::IntegerAttr>(arg_index_attr)
                            .getValue()
                            .getSExtValue();
        if (index < 0) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/utils/nms_utils.cc

    }
    
    LogicalResult ConvertSSDPostProcessFunc::AddIntAttr(
        func::FuncOp func, DictionaryAttr attrs, const std::string& attribute,
        flexbuffers::Builder* builder) {
      auto int_attr = mlir::dyn_cast_or_null<IntegerAttr>(attrs.get(attribute));
      if (!int_attr) {
        return func.emitError()
               << attribute.c_str() << " attribute is not set or not an integer";
      }
      builder->Int(attribute.c_str(), int_attr.getInt());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/python/mlir_wrapper/mlir_wrapper.pyi

    class FunctionType(Type):
        def __init__(self, *args, **kwargs) -> None: ...
        def getResults(self) -> list[Type]: ...
    
    class IntegerAttr(Attribute):
        def __init__(self, *args, **kwargs) -> None: ...
        def get(self, arg0: int) -> IntegerAttr: ...
    
    class IntegerType(Type):
        def __init__(self, *args, **kwargs) -> None: ...
        def get(self, arg0: int) -> IntegerType: ...
    
    class Location:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 09 17:10:09 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.h

      if (auto ty = mlir::dyn_cast<FloatType>(element_ty)) {
        identity_attr = FloatAttr::get(ty, static_cast<double>(identity));
      } else if (auto ty = mlir::dyn_cast<IntegerType>(element_ty)) {
        identity_attr = IntegerAttr::get(ty, static_cast<int64_t>(identity));
      } else {
        return {};
      }
    
      // Fold: Op(Operand, Identity) -> Operand.
      if (rhs_attr && is_valid_broadcasting(lhs_type, rhs_type, result_type)) {
    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/tensorflow/transforms/annotate_parameter_replication.cc

        if (mirrored_variable_indices_attr) {
          for (const auto& mirrored_index : mirrored_variable_indices_attr) {
            mirrored_replicate_args.insert(
                mlir::cast<IntegerAttr>(mirrored_index).getInt());
          }
        }
        auto func =
            llvm::cast<func::FuncOp>(m.lookupSymbol(cluster_func.getFunc()));
        for (auto entry : llvm::enumerate(cluster_func.getOperands())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc

            RankedTensorType::get({2}, rewriter.getF32Type()),
            {static_cast<float>(min.getValueAsDouble()),
             static_cast<float>(max.getValueAsDouble())});
        ElementsAttr axis_stats;
        IntegerAttr axis;
    
        quantfork::StatisticsOp stats_op = rewriter.create<quantfork::StatisticsOp>(
            op->getLoc(), op.getInput(), layer_stats, axis_stats, axis);
        op.getOutput().replaceAllUsesWith(stats_op.getResult());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/utils.td

    def GetOffSet : NativeCodeCall<"TFL::GetOffSet($0, $1)">;
    
    // Attribute Constraint that checks if the attribute value is zero.
    def ZeroIntAttr
      : AttrConstraint<CPred<"$_self.cast<::mlir::IntegerAttr>().getInt() == 0">>;
    
    // Checks if the value has rank at most 'n'.
    class HasRankAtLeast<int n> : Constraint<
        CPred<"$0.getType().cast<ShapedType>().hasRank() && "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 4.8K bytes
    - Viewed (0)
Back to top