Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 79 for getElementDtype (0.35 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc

        // Non-float tensors do not need quantization.
        QuantizationUnits quantizable_ops;
        const ShapedType type = mlir::dyn_cast<ShapedType>(op.getType());
        if (!type || !type.getElementType().isF32()) return quantizable_ops;
    
        const Value value = op.getResult();
    
        for (OpOperand& use : value.getUses()) {
          Operation* user = use.getOwner();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.h

                rewriter.getI32Type());
            new_indices = rewriter.create<TF::ReshapeOp>(
                loc,
                RankedTensorType::get({num_updates, index_depth},
                                      indices_type.getElementType()),
                indices, indices_shape);
            auto updates_shape =
                BuildIntArrayConstOp(builder, rewriter,
                                     llvm::SmallVector<int64_t>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

          mlir::dyn_cast<DenseElementsAttr>(Quantize(attr, shaped_quantized_type));
      if (!tensor_proto_attr) {
        return nullptr;
      }
    
      Type storage_type =
          mlir::cast<QuantizedType>(shaped_quantized_type.getElementType())
              .getStorageType();
      ShapedType new_type = shaped_quantized_type.clone(storage_type);
    
      rewriter.setInsertionPointAfter(op);
      auto const_op =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h

            if (mlir::isa<NoneType>(operand_type)) {
              inputs.push_back(operand);
              continue;
            }
    
            auto ele_type =
                mlir::cast<TensorType>(operand.getType()).getElementType();
            if (auto dq_op =
                    dyn_cast_or_null<DequantizeOpT>(operand.getDefiningOp())) {
              inputs.push_back(dq_op.getOperand());
            } else if (!ele_type.isF32()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc

    }
    
    StatusOr<mlir::ElementsAttr> ConvertIntBuffer(
        mlir::RankedTensorType shaped_type, const std::vector<uint8_t>& buffer,
        bool truncate) {
      mlir::Type elem_type = shaped_type.getElementType();
      unsigned bit_width;
      if (auto itype = mlir::dyn_cast<mlir::IntegerType>(elem_type)) {
        bit_width = itype.getWidth();
      } else if (auto qtype =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  6. platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/manage/schema/extract/ScalarCollectionNodeInitializerExtractionStrategy.java

                        ScalarCollectionModelProjection.forList(schema.getElementType(), !writable),
                        new ModelElementProjection(schema.getType())
                    );
                } else {
                    return new ProjectionOnlyNodeInitializer(
                        ScalarCollectionModelProjection.forSet(schema.getElementType(), !writable),
                        new ModelElementProjection(schema.getType())
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 24 13:15:09 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc

            redux_axes.end()) {
          sum_shape.push_back(shape[i]);
        }
      }
      return rewriter->create<TF::SumOp>(
          loc, RankedTensorType::get(sum_shape, value_type.getElementType()), value,
          redux_op);
    }
    
    TF::TransposeOp createTransposeOp(Value value, Location loc,
                                      llvm::ArrayRef<int32_t> permutation,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_resource_partitioning.cc

                                        .getElementType()
                                        .cast<TF::ResourceType>()
                                        .getSubtypes()))
          return false;
    
      return true;
    }
    
    Type GetResourceSubtype(Type type) {
      return type.cast<TensorType>()
          .getElementType()
          .cast<TF::ResourceType>()
          .getSubtypes()
          .front();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc

      elem_shape.push_back(length);
      for (int64_t dim : buffer_type.getShape().drop_front()) {
        elem_shape.push_back(dim);
      }
      *elem_type = RankedTensorType::get(elem_shape, buffer_type.getElementType());
      return success();
    }
    
    // Tries to infer the tensor array element shape.
    std::optional<llvm::SmallVector<int64_t, 8>> GetTensorArrayElementShape(
        TF::TensorArrayV3Op ta, ModuleOp module) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 40.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

                                                    const int axis) {
      const auto source_type = dyn_cast_or_null<ShapedType>(source.getValue());
      if (!source_type) return {};
      const auto src_ele_type = source_type.getElementType();
      auto qtype = dyn_cast<quant::QuantizedType>(src_ele_type);
    
      // Reset the quantization dimensions if it is per-axis.
      if (const auto per_axis =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
Back to top