Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 89 for IntegerAttr (0.19 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

      SmallVector<int32_t> stride_values, rhs_dilation_values;
      for (int64_t i : llvm::seq<int64_t>(1, num_dims - 1)) {
        stride_values.push_back(mlir::cast<IntegerAttr>(strides[i]).getInt());
        rhs_dilation_values.push_back(
            mlir::cast<IntegerAttr>(dilations[i]).getInt());
      }
      window_strides = Create1DConstValue<int32_t>(builder, loc, stride_values);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          float_spl && sgn_cst_spl) {
        return IsSign(float_spl.getValue(), sgn_cst_spl.getValue());
      }
      if (auto int_spl = llvm::dyn_cast_if_present<IntegerAttr>(splat),
          sgn_cst_spl = llvm::dyn_cast_if_present<IntegerAttr>(sgn_splat);
          int_spl && sgn_cst_spl) {
        return IsSign(int_spl.getValue(), sgn_cst_spl.getValue());
      }
      if (mlir::isa<DenseFPElementsAttr>(float_or_int)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.cc

                               << "' attribute should be an ArrayAttr";
      }
      for (auto element : attr) {
        if (mlir::isa<StringAttr>(element)) {
          continue;
        }
        if (auto integer = mlir::dyn_cast<IntegerAttr>(element)) {
          if (integer.getValue().getBitWidth() == 64) {
            continue;
          }
        }
        return op->emitError() << "'" << kTfSavedModelIndexPathAttr
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

            {llvm::minimum(min_max_values[0], min_max_values[2]),
             llvm::maximum(min_max_values[1], min_max_values[3])});
        mlir::ElementsAttr axis_stats;
        mlir::IntegerAttr axis;
        for (auto& stats_op : stats_ops) {
          rewriter.setInsertionPointAfter(stats_op);
          rewriter.replaceOpWithNewOp<quantfork::StatisticsOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

          auto attr_keys = list_type.getAttrKeys();
          // N*T case
          if (attr_keys.size() == 2) {
            // The first one is N, and the second one is T
            int list_size =
                mlir::cast<IntegerAttr>(attrs.lookup(attr_keys[0].getValue()))
                    .getInt();
            Type list_type =
                mlir::cast<TypeAttr>(attrs.lookup(attr_keys[1].getValue()))
                    .getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

      tf_device::ReplicateOp replicate =
          cluster_func->getParentOfType<tf_device::ReplicateOp>();
      if (replicate) num_replicas = replicate.getN();
    
      auto num_cores_per_replica_attr = cluster_func->getAttrOfType<IntegerAttr>(
          tensorflow::kNumCoresPerReplicaAttr);
      if (!num_cores_per_replica_attr)
        return cluster_func.emitOpError(
            CreateMissingAttributeMsg(tensorflow::kNumCoresPerReplicaAttr));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/analysis/resource_alias_analysis.cc

        // instance IDs used by this pass.
        llvm::SmallDenseMap<int64_t, int64_t> attr_id_to_internal_id;
        for (auto arg : filter_resources(func_op.getArguments())) {
          auto id_attr = func_op.getArgAttrOfType<IntegerAttr>(
              arg.getArgNumber(), kResourceArgUniqueIdAttr);
          assert(id_attr &&
                 "tf.resource_arg_unique_id attribute should exist on either "
                 "none or all arguments.");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/ir/tf_device.cc

        llvm::ArrayRef<Type> region_arg_types, int32_t* n) {
      for (const auto& attr : state->attributes)
        if (attr.getName().strref() == "n")
          if (auto n_attr = mlir::dyn_cast<IntegerAttr>(attr.getValue()))
            *n = n_attr.getInt();
    
      if (*n < 2)
        return parser->emitError(loc) << "expects 'n' to be at least 2, got " << *n;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/flatbuffer_operator.cc

      std::vector<int32_t> intVec;
      intVec.reserve(attrArray.getValue().size());
      for (auto attr : attrArray.getValue()) {
        intVec.push_back(mlir::cast<mlir::IntegerAttr>(attr).getInt());
      }
      return builder->CreateVector(intVec);
    }
    
    static flatbuffers::Offset<flatbuffers::Vector<float>>
    ConvertF32ArrayAttrForOptionWriter(mlir::ArrayAttr attrArray,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 38K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

                                           func_def.mutable_attr()));
    
      for (int i = 0, e = function.getNumArguments(); i < e; ++i) {
        if (auto resource_arg_unique_id_attr =
                function.getArgAttrOfType<mlir::IntegerAttr>(
                    i, kResourceArgUniqueIdAttr)) {
          (*func_def.mutable_resource_arg_unique_id())[i] =
              resource_arg_unique_id_attr.getInt();
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
Back to top