Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 171 for getElementDtype (0.21 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

          auto arg_type = mlir::cast<RankedTensorType>(arg.getType());
          assert(arg_type.getRank() == 0);
          llvm::ArrayRef<TensorType> underlying_type =
              mlir::cast<TF::ResourceType>(arg_type.getElementType()).getSubtypes();
    
          // If the arg type already matches the global_tensor type, we don't need
          // to do anything.
          if (!underlying_type.empty() &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.cc

      int64_t output_size = InferTensorSize(context, value_type);
    
      int64_t cost = kLookupTableFindCostScale * output_size;
    
      if (mlir::isa<mlir::TF::StringType>(key_type.getElementType()))
        cost *= kLookupTableFindStringKeyCostScale;
    
      return cost;
    }
    
    // The cost function for tf.GatherV2.
    int64_t InferGatherV2Cost(const CostContext& context, mlir::TF::GatherV2Op op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc

                    split_dimension, num_split));
          }
    
          shape[split_dimension] = shape[split_dimension] / num_split;
          output_type =
              mlir::RankedTensorType::get(shape, input_type.getElementType());
        }
      } else {
        output_type = input_type;
      }
    
      // Creates a split op that splits |src_input| along |split_dimension|.
      llvm::SmallVector<mlir::Type, 4> output_types(num_split, output_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:28:13 UTC 2024
    - 34K bytes
    - Viewed (0)
  4. subprojects/core/src/test/groovy/org/gradle/api/internal/collections/ElementSourceSpec.groovy

            TypedProviderOfSet(Class<T> type, Set<T> value) {
                this.type = type
                this.value = value
            }
    
            @Override
            Class<? extends T> getElementType() {
                return type
            }
    
            @Override
            protected Value<? extends Set<T>> calculateOwnValue(ValueConsumer consumer) {
                return Value.of(value)
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Aug 25 10:08:46 UTC 2022
    - 9.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/constant_fold_utils.cc

      // require "raising" later.
      for (const Type type : inst->getResultTypes()) {
        if (const TensorType tensor_type = mlir::dyn_cast<TensorType>(type)) {
          if (mlir::isa<VariantType>(tensor_type.getElementType())) {
            return false;
          }
        }
      }
    
      // Operations that execute function calls shouldn't be constant folded.
      if (llvm::isa<TF::WhileOp, TF::CaseOp, TF::IfOp, CallOpInterface>(inst)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

        // the operand can be tensor of type T or T_REF.
        bool is_output_ref = mlir::isa<tf_type::TensorFlowRefType>(
            output_tensor_type.getElementType());
        if (is_output_ref && !mlir::isa<tf_type::TensorFlowRefType>(
                                 operand0_tensor_type.getElementType())) {
          return switchn.emitOpError()
                 << "expects same operand and output element type but got "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/op_stat_pass.cc

          ShapedType value_shaped_type = mlir::dyn_cast_or_null<ShapedType>(
              value_for_deducing_op_type.getType());
          if (value_shaped_type != nullptr) {
            auto operand_or_result = value_shaped_type.getElementType();
            std::string dtype;
    
            TypeSwitch<Type>(operand_or_result)
                .Case<IntegerType>([&](Type) {
                  dtype =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/analysis/resource_value_typed_analyzer.cc

    namespace mlir {
    namespace TF {
    namespace {
    
    bool IsResourceType(Type type) {
      if (auto tensor_type = mlir::dyn_cast<TensorType>(type)) {
        return mlir::isa<TF::ResourceType>(tensor_type.getElementType());
      }
      return false;
    }
    
    bool IsResource(Value value) { return IsResourceType(value.getType()); }
    
    // Helper that returns the FuncOp that is the SessionInit function which
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 09:04:13 UTC 2024
    - 8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc

      if (!broadcasted_shapes_or.has_value()) return;
      const auto broadcasted_input_type = RankedTensorType::get(
          broadcasted_shapes_or->first, input_type.getElementType());
      const auto broadcasted_weight_type = RankedTensorType::get(
          broadcasted_shapes_or->second, weight_type.getElementType());
    
      if (broadcasted_input_type.hasStaticShape() &&
          broadcasted_weight_type.hasStaticShape()) {
        input = builder.create<TF::BroadcastToOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/pin_ops_with_side_effects.cc

    bool IsResourceTensor(Value value) {
      const auto tensor_type = mlir::dyn_cast<TensorType>(value.getType());
      return tensor_type &&
             mlir::isa<mlir::TF::ResourceType>(tensor_type.getElementType());
    }
    
    // The default criterion for operations being considered as causing or being
    // dependent on side effects. Reflects the current runtime logic; see below.
    bool OpHasSideEffects(Operation *op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
Back to top