Skip to content

Commit

Permalink
force initialization of packed tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
kali committed Jan 30, 2024
1 parent 90304fd commit 3557d9c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/ops/matmul/pack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ impl EvalOp for MatMatMulPack {
unsafe {
let output_shape = self.output_shape(b.shape());
let mut packed =
Tensor::uninitialized_aligned_dt(dt, &output_shape, self.packer.alignment())
.unwrap();
Tensor::zero_aligned_dt(dt, &output_shape, self.packer.alignment()).unwrap();
let mut bc_shape: TVec<usize> = b.shape().into();
bc_shape[self.k_axis] = 1;
bc_shape[self.mn_axis] = 1;
Expand Down

0 comments on commit 3557d9c

Please sign in to comment.