Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 156 for RankedTensorType (0.28 sec)

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

        auto tranpose_op = *it;
        for (auto tranpose_operand : tranpose_op.getOperands()) {
          auto ranked_tranpose_type =
              mlir::dyn_cast_or_null<RankedTensorType>(tranpose_operand.getType());
          if (!ranked_tranpose_type) continue;
          if (ranked_tranpose_type.getRank() == permutation.size() &&
              operand->get().getType() ==
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

      if (!attr_type) return attr;
    
      if (attr_type.getValue() == "tensor") {
        if (auto f = mlir::dyn_cast<FloatAttr>(attr)) {
          RankedTensorType type = RankedTensorType::get({}, f.getType());
          return DenseFPElementsAttr::get(type, attr);
        }
        // TODO(fengliuai): handles ArrayAttr. Note that it can be nested ArrayAttr.
      }
    
      return attr;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/tfl_stablehlo_pass.cc

              }
              Attribute value;
              if (isDenseI64Array(op_name, key)) {
                value = builder->getDenseI64ArrayAttr(vec);
              } else {
                RankedTensorType ty = tensorflow::GetTypeFromTFTensorShape(
                    shape, builder->getIntegerType(64));
                value = DenseIntElementsAttr::get(ty, vec);
              }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jan 24 06:08:43 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_metadata_utils.cc

        // Populate argument shapes.
        *arg->mutable_shape() = tensorflow::TensorShapeProto();
        if (auto ranked_tensor_type =
                mlir::dyn_cast<RankedTensorType>(operand_type)) {
          tensorflow::TensorShapeProto shape_proto;
          ConvertToTensorShapeProto(ranked_tensor_type.getShape(), &shape_proto);
          *arg->mutable_shape() = std::move(shape_proto);
        } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

        int64_t multiplier = weight_shape[3] / in_channels;
    
        TensorType new_shape = RankedTensorType::get(
            {weight_shape[0], weight_shape[1], in_channels, multiplier},
            weight_type.getElementType());
    
        int cur_rank = weight_type.getRank();
    
        // Inserts a reshape op.
        auto shape_spec_type =
            RankedTensorType::get({cur_rank}, rewriter.getIntegerType(64));
        auto new_shape_const_attr =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

      // TODO - b/278949920: Enable Per-Channel Quantization for XLA Opset
      auto qtype = mlir::dyn_cast<UniformQuantizedType>(quant_type);
      TensorType scale_type = RankedTensorType::get({}, rewriter.getF32Type());
      Value scale_op = rewriter.create<TF::ConstOp>(
          loc, scale_type,
          DenseFPElementsAttr::get(scale_type,
                                   {static_cast<float>(qtype.getScale())}));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

            min_max_values[1] == min_max_values[3]) {
          return failure();
        }
    
        mlir::ElementsAttr layer_stats = mlir::DenseFPElementsAttr::get(
            mlir::RankedTensorType::get({2}, rewriter.getF32Type()),
            {llvm::minimum(min_max_values[0], min_max_values[2]),
             llvm::maximum(min_max_values[1], min_max_values[3])});
        mlir::ElementsAttr axis_stats;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/lift_tflite_flex_ops.cc

          // https://www.tensorflow.org/api_docs/python/tf/raw_ops/TensorArrayWriteV3
          Value flow = tensor_array_v3_op.getFlow();
          Type scalar_f32_tensor_type =
              RankedTensorType::get(/*shape=*/{}, rewriter.getF32Type());
          flow.setType(scalar_f32_tensor_type);
        }
    
        // Sets operand_segment_sizes or result_segment_sizes attribute to the op.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/stack_ops_decomposition.cc

      void runOnOperation() final;
    };
    
    // Returns the type of the local variable for the stack size.
    Type GetSizeVarType(OpBuilder builder) {
      auto size_type = cutil::GetSizeType(builder);
      return RankedTensorType::get(
          {}, TF::ResourceType::get(ArrayRef<TensorType>{size_type},
                                    builder.getContext()));
    }
    
    // Returns the aliasing argument number of a fucntion return value if it simply
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc

    }
    
    // Converts the condition for an IfOp/WhileOp to a boolean value.
    Value ConvertConditionToBoolean(Operation* op, Value cond) {
      if (auto ranked_type = mlir::dyn_cast<RankedTensorType>(cond.getType()))
        if (ranked_type.getRank() == 0 &&
            ranked_type.getElementType().isSignlessInteger(1))
          return cond;
    
      OpBuilder builder(op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top