Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 79 for getElementDtype (0.51 sec)

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

            result_shape, buffer_type.getElementType());
        return builder.create<TF::SliceOp>(
            loc, ArrayRef<Type>{slice_type},
            ArrayRef<Value>{buffer, GetR1Const(slice_starts, builder, loc),
                            GetR1Const(result_shape, builder, loc)});
      }
      auto result_type = tensorflow::GetTypeFromTFTensorShape(
          result_shape, buffer_type.getElementType());
      return builder.create<TF::GatherV2Op>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/lstm_utils.cc

      auto transpose_shape =
          llvm::to_vector<8>(llvm::map_range(perm, [transpose_type](int32_t dim) {
            return transpose_type.getDimSize(dim);
          }));
      auto elem_type = transpose_type.getElementType();
      auto result_type = RankedTensorType::get(transpose_shape, elem_type);
    
      return builder->create<TF::TransposeOp>(location, result_type,
                                              value_to_transpose, perm_op);
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/util.cc

      for (int64_t i = 0; i < permutation_array.size(); ++i) {
        transposed_shape[i] = input_type.getDimSize(permutation_array[i]);
      }
      auto transposed_type =
          RankedTensorType::get(transposed_shape, input_type.getElementType());
      DenseIntElementsAttr permutation = DenseIntElementsAttr::get(
          RankedTensorType::get(permutation_array.size(), rewriter.getI64Type()),
          permutation_array);
      return {permutation, transposed_type};
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/fold_broadcast_pass.cc

      if (!lhs || !rhs) return {};
    
      ShapedType type = mlir::cast<ShapedType>(op->getType());
      if (!type.hasStaticShape()) {
        return {};
      }
    
      Type etype = type.getElementType();
    
      // Evaluate for element types.
      if (!mlir::isa<ElementType>(etype)) {
        return {};
      }
    
      // Special case for folding splats no matter how large.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

                           /*output_axis=*/0, &input_indices, &new_values);
        auto result_type =
            RankedTensorType::get(output_shape, output_type.getElementType());
        auto values_type = RankedTensorType::get(
            output_shape,
            mlir::cast<quant::UniformQuantizedType>(output_type.getElementType())
                .getStorageType());
        rewriter.replaceOpWithNewOp<QConstOp>(
            op, TypeAttr::get(result_type),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc

            llvm::dyn_cast<RankedTensorType>(op->getResult(0).getType());
        auto new_out_type = RankedTensorType::get(
            PermuteShape(current_out_type.getShape(), inverse_perm_arr),
            current_out_type.getElementType());
    
        // Create new ewise op to appear before the tranpose.
        auto *new_ewise_op =
            rewriter.create(op->getLoc(), op->getName().getIdentifier(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

            op->getLoc(), *output_type, op.getInput());
        rewriter.replaceOpWithNewOp<mhlo::BitcastConvertOp>(
            op,
            output_type->clone(
                mlir::dyn_cast<quant::QuantizedType>(output_type->getElementType())
                    .getStorageType()),
            result);
    
        return success();
      }
    };
    
    // UniformDequantizeOp takes TF quantized types as input which would have been
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K 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/tfr/ir/tfr_ops.cc

        if ((input_tensor_type.getElementType() !=
             output_tensor_type.getElementType()) &&
            !isQuantizedType(input_type) && !isQuantizedType(output_type)) {
          auto new_tfr_cast = rewriter.create<TFR::CastOp>(
              cast_op.getLoc(),
              output_tensor_type.clone(input_tensor_type.getElementType()),
              cast_op.getArg());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 16:55:41 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

        if (const TensorType type = mlir::dyn_cast<TensorType>(operand.getType())) {
          if (mlir::isa<FloatType>(type.getElementType())) {
            return false;
          }
          if (mlir::isa<UniformQuantizedType, UniformQuantizedPerAxisType>(
                  type.getElementType())) {
            has_quantized_types = true;
          }
        }
      }
      for (const Value result : call_op.getResults()) {
    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