Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 89 for IntegerAttr (0.17 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

      return absl::OkStatus();
    }
    
    Status ConvertAttribute(const mlir::BoolAttr& attr, AttrValue* value) {
      value->set_b(attr.getValue());
      return absl::OkStatus();
    }
    
    Status ConvertAttribute(const mlir::IntegerAttr& attr, AttrValue* value) {
      value->set_i(attr.getInt());
      return absl::OkStatus();
    }
    
    Status ConvertAttribute(const mlir::FloatAttr& attr, AttrValue* value) {
      value->set_f(attr.getValueAsDouble());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util.cc

                                   << fetched_device_coordinates.status().message();
      }
    }
    
    int GetNumCoresPerReplica(mlir::tf_device::ClusterOp cluster) {
      mlir::IntegerAttr num_cores_per_replica_attr =
          cluster->getAttrOfType<mlir::IntegerAttr>(kNumCoresPerReplicaAttr);
      if (num_cores_per_replica_attr) {
        return num_cores_per_replica_attr.getInt();
      } else {
        return 1;
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 10 20:10:40 UTC 2024
    - 32.8K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

      // The StringRef cast is necessary before cxx14.
      mlir::IntegerAttr group_key_attr =
          module_op->getAttrOfType<mlir::IntegerAttr>(
              mlir::StringRef(kGroupKeyAttrName.data(), kGroupKeyAttrName.size()));
      mlir::IntegerAttr group_size_attr =
          module_op->getAttrOfType<mlir::IntegerAttr>(mlir::StringRef(
              kGroupSizeAttrName.data(), kGroupSizeAttrName.size()));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

    // is an IntegerAttr, containing axis in the TensorFlow format. TensorFlow
    // format supports negative indexing unlike HLO.
    static IntegerAttr GetHLOAxisFromTFAxis(Attribute attr, int64_t rank,
                                            Builder *b) {
      IntegerAttr intAttr = mlir::dyn_cast_or_null<IntegerAttr>(attr);
      if (auto elementAttr = mlir::dyn_cast_or_null<ElementsAttr>(attr)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

        int64_t arg_index = mlir::cast<IntegerAttr>(entry.value()).getInt();
        auto arg_metadata = metadata.mutable_args(arg_index);
        if (arg_metadata->enable_xla_sharding() ==
            ::tensorflow::tpu::TPUCompileMetadataProto_Arg::ALLOWED) {
          int64_t ret_index =
              mlir::cast<IntegerAttr>(
                  execute.getDeviceVarUpdatesIndices().getValue()[entry.index()])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/internal/passes/xla_broadcast.cc

      if (failed(tensorflow::GetDevicesFromOp(module, &devices))) return failure();
    
      uint32_t num_replicas = replicate.getN();
    
      auto num_cores_per_replica_attr = cluster->getAttrOfType<mlir::IntegerAttr>(
          tensorflow::kNumCoresPerReplicaAttr);
      if (!num_cores_per_replica_attr)
        return cluster.emitOpError(
            CreateMissingAttributeMsg(tensorflow::kNumCoresPerReplicaAttr));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 18:52:07 UTC 2024
    - 13.9K 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