- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ConvertToTensor (0.28 sec)
-
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc
TF_ASSERT_OK(value_or.status()); auto attr = value_or.value(); EXPECT_EQ(attr.getShapedType().getElementType(), expected_ty); Tensor out; TF_ASSERT_OK(ConvertToTensor(attr, &out)); test::ExpectTensorEqual<T>(tensor, out); } }; TEST_F(ConvertTensorTest, Simple) { mlir::MLIRContext context; RegisterDialects(context);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc
std::to_string(operand_index)); if (defining_op && matchPattern(defining_op, m_Constant(&const_attr))) { tensorflow::Tensor tensor; auto status = tensorflow::ConvertToTensor(const_attr, &tensor); if (!status.ok()) { op->emitRemark() << "skipping legalization due to failed const conversion" << status.ToString();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:16:07 UTC 2024 - 18.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc
return errors::Unimplemented(absl::StrCat("Unimplemented data type ", DataTypeString(output_dtype))); } return absl::OkStatus(); } Status ConvertToTensor(const mlir::ElementsAttr attr, Tensor* output_tensor) { TensorProto tensor_proto; TF_RETURN_IF_ERROR(ConvertToTensorProto(attr, &tensor_proto)); if (!output_tensor->FromProto(tensor_proto)) {
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/quantization/stablehlo/passes/bridge/convert_tf_quant_to_mhlo_int_test.cc
return absl::InternalError("Failed to evaluate TF ops"); } // Convert output tensor back to xla::Literal. tensorflow::Tensor tensor; TF_RETURN_IF_ERROR(tensorflow::ConvertToTensor( llvm::dyn_cast<TF::ConstOp>(fold_results[0].getDefiningOp()).getValue(), &tensor)); xla::Shape xla_shape; TF_RETURN_IF_ERROR(tensorflow::TensorShapeToXLAShape(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 03 01:03:21 UTC 2024 - 35.8K bytes - Viewed (0)