From 57f4bfc98cc3c0299cd1f478d971257a0339ecc7 Mon Sep 17 00:00:00 2001 From: Yu Feng Date: Mon, 11 Dec 2023 08:16:16 -0800 Subject: [PATCH] fix a msan error, use before init. PiperOrigin-RevId: 589829765 --- tensorflow/compiler/tf2xla/kernels/matmul_op.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tensorflow/compiler/tf2xla/kernels/matmul_op.cc b/tensorflow/compiler/tf2xla/kernels/matmul_op.cc index 3df57005c9ad29..5a2a6e781cd65d 100644 --- a/tensorflow/compiler/tf2xla/kernels/matmul_op.cc +++ b/tensorflow/compiler/tf2xla/kernels/matmul_op.cc @@ -37,7 +37,10 @@ constexpr std::array kMatmulTypes = { class MatMulOp : public XlaOpKernel { public: explicit MatMulOp(OpKernelConstruction* ctx, bool is_sparse = false) - : XlaOpKernel(ctx), is_sparse_(is_sparse) { + : XlaOpKernel(ctx), + is_sparse_(is_sparse), + grad_a_(false), + grad_b_(false) { OP_REQUIRES_OK(ctx, ctx->GetAttr("transpose_a", &transpose_a_)); OP_REQUIRES_OK(ctx, ctx->GetAttr("transpose_b", &transpose_b_)); if (!is_sparse) {