Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 133 for ShapedType (0.31 sec)

  1. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

        // Here we assume that the element_shape won't be changed before calling
        // the first `TensorListSetItemOp`.
        if (auto shaped_type = element_shape.getType().dyn_cast<ShapedType>()) {
          if (shaped_type.hasRank() && shaped_type.getRank() == 0) {
            bool element_shape_acquired = false;
            auto uses = op.getResult().getUses();
            for (auto &use : llvm::make_early_inc_range(uses)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc

            TypedAttr typed_attr = it.dyn_cast<TypedAttr>();
            if (!typed_attr) return failure();
            all_types.insert(typed_attr.getType());
          }
          if (all_types.size() != 1) return failure();
          ShapedType new_out_type = RankedTensorType::get(
              {static_cast<int64_t>(array.size())}, *all_types.begin());
          DenseElementsAttr attr =
              DenseElementsAttr::get(new_out_type, array.getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 16:55:41 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc

      int64_t prod_shape = 1;
      for (auto index_tuple : index_tuples) {
        const int64_t shape_i = shape[std::get<I>(index_tuple)];
        if (ShapedType::isDynamic(shape_i)) return ShapedType::kDynamic;
        prod_shape *= shape_i;
      }
      return prod_shape;
    }
    
    // Reshapes LHS and RHS to have B0,...,Bn,L,C and B0,...,Bn,C,R shape
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

        const auto [input_height, input_width] =
            GetDimSize(op->getOperand(0).getType().cast<ShapedType>().getShape(),
                       dimension_numbers.getInputSpatialDimensions());
        const auto [output_height, output_width] =
            GetDimSize(op->getResult(0).getType().cast<ShapedType>().getShape(),
                       dimension_numbers.getOutputSpatialDimensions());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.cc

      SmallVector<Attribute> shape_attrs;
      for (const Type result_type : output_types) {
        shape_attrs.push_back(
            tf_type::ShapeAttr::get(ctx, mlir::cast<ShapedType>(result_type)));
      }
      auto empty_array_attr = ArrayAttr::get(ctx, {});
      auto platforms = ArrayAttr::get(ctx, {StringAttr::get(ctx, kPlatformCpu)});
    
      auto call_op = builder.create<TF::XlaCallModuleOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc

      // Create attributes used for creating an XlaCallModuleOp.
      SmallVector<Attribute> shape_attrs;
      for (const Type result_type : result_types) {
        shape_attrs.push_back(
            tf_type::ShapeAttr::get(ctx, mlir::cast<ShapedType>(result_type)));
      }
      const auto empty_array_attr = ArrayAttr::get(ctx, {});
      // TODO: b/310291615 - find a better way for platform support.
      const auto platforms = ArrayAttr::get(
          ctx,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td

                             (TFL_TopKV2Op $input, $k)>;
    
    def ReductionDimensionIsLastDim : Constraint<CPred<"($0.cast<IntegerAttr>().getInt() == "
      "$1.getType().cast<ShapedType>().getRank() - 1 || $0.cast<IntegerAttr>().getInt() == -1)">>;
    
    // Legalizes TF_ApproxTopKOp to TFL_TopKV2Op with the following constraints:
    //    1. It computes max k
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 04 13:30:42 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/c/c_api_unified_experimental_mlir.cc

        // unified_api_test.cc.
        return Unimplemented("MlirTensor::Shape is not implemented yet.");
      }
    
      Value getValue() { return value_; }
      Type getElementType() {
        return mlir::cast<ShapedType>(value_.getType()).getElementType();
      }
    
      // For LLVM style RTTI.
      static bool classof(const AbstractTensorHandle* ptr) {
        return ptr->getKind() == kMlir;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

      if (!tensor.quantization || tfl::IsQuantized(tensor)) return nullptr;
      // If the result isn't float and unquantizable, the min/max is ignored.
      if (!res.getType()
               .cast<mlir::ShapedType>()
               .getElementType()
               .isa<mlir::FloatType>()) {
        return nullptr;
      }
      auto mins = tensor.quantization->min;
      auto maxs = tensor.quantization->max;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

        // `stablehlo.dot_general` legalizable to `tfl.fully_connected` has a
        // filter rank of 2 with the last dimension as the channel dimension.
        const int64_t quantization_dimension =
            mlir::cast<ShapedType>(filter_type).getShape().size() - 1;
        accumulation_quantized_element_type =
            CreateI32F32UniformQuantizedPerAxisType(
                gemm_style_op->getLoc(), *rewriter.getContext(), result_scales,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
Back to top