- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for MangleTensor (0.17 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/utils/tf_type_utils_test.cc
tensor.matrix<tsl::qint8>()(1, 1) = tsl::qint8(4); ::tensorflow::TensorProto tensor_proto; tensor.AsProtoTensorContent(&tensor_proto); return ::tensorflow::mangling_util::MangleTensor(tensor_proto); } std::string GetQint16Tensor() { ::tensorflow::Tensor tensor(::tensorflow::DT_QINT16, {2, 2}); tensor.matrix<tsl::qint16>()(0, 0) = tsl::qint16(1);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/mangling_util.cc
return absl::StrCat(kTensorShapePrefix, PrintShortTextProto(shape)); } Status DemangleShape(absl::string_view str, TensorShapeProto* proto) { return ParseTextProto(str, kTensorShapePrefix, proto); } string MangleTensor(const TensorProto& tensor) { return absl::StrCat(kTensorPrefix, PrintShortTextProto(tensor)); } Status DemangleTensor(absl::string_view str, TensorProto* proto) { return ParseTextProto(str, kTensorPrefix, proto);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Feb 26 03:47:51 UTC 2024 - 3.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc
if (use_tensor_content) input_tensor.AsProtoTensorContent(&tensor_proto); else input_tensor.AsProtoField(&tensor_proto); return tensor_proto; } static std::string MangleTensor(const Tensor& tensor) { return mangling_util::MangleTensor(ConvertToProto(tensor)); } // Converts a TensorFlow tensor into an MLIR elements attribute. template <typename T> absl::StatusOr<ElementsAttr> ConvertFlatTensor(const Tensor& input_tensor,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 20.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/constant_utils.cc
content.assign(reinterpret_cast<const char*>(&complex_value), sizeof(complex_value)); repr.set_tensor_content(content); std::string mangled = tensorflow::mangling_util::MangleTensor(repr); return mlir::TF::TensorProtoAttr::get(shaped_type, mangled); } else { return tensorflow::Status(absl::StatusCode::kInvalidArgument, "Unsupported type"); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc
: tensorflow::DT_QINT32); tensor_proto_attr = ElementsAttr(TF::TensorProtoAttr::get( new_type, tensorflow::mangling_util::MangleTensor(tensor_proto))); } auto const_op = rewriter.create<TF::ConstOp>(loc, new_type, tensor_proto_attr); // Add scast op to match quantize -> composition pattern. The added scast
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 54.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/flatbuffer_import.cc
} else if (elem_type.isa<mlir::ComplexType, mlir::TF::TensorFlowType>()) { tensorflow::TensorProto repr = tfl::ConvertTfliteConstTensor(tensor, buffer); std::string mangled = tensorflow::mangling_util::MangleTensor(repr); value = mlir::TF::TensorProtoAttr::get(shaped_type, mangled); } else { return errors::Unimplemented("Constant of unsupported type"); } if (use_stablehlo_constant) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 18:21:50 UTC 2024 - 66.8K bytes - Viewed (0)