Skip to content

Commit

Permalink
fix a msan error, use before init.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 589829765
  • Loading branch information
rainwoodman authored and tensorflower-gardener committed Dec 11, 2023
1 parent 8160a32 commit 57f4bfc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tensorflow/compiler/tf2xla/kernels/matmul_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ constexpr std::array<DataType, 10> 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) {
Expand Down

0 comments on commit 57f4bfc

Please sign in to comment.