Skip to content

Commit

Permalink
Skip running Tessellate backpropagation if the matrix is empty (#2465)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbennun authored Aug 12, 2024
1 parent b41221c commit 6adcc45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/layers/transform/tessellate_cutensor_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ void tessellate_layer<TensorDataType, T_layout, Dev>::bp_compute_cutensor(
LocalMat const& input =
static_cast<LocalMat const&>(output_grad.LockedMatrix());
LocalMat& output = static_cast<LocalMat&>(input_grad);
if (input.IsEmpty() || output.IsEmpty())
return;

// Make dimensions and modes
int dims = static_cast<int>(output_dims.size());
Expand Down

0 comments on commit 6adcc45

Please sign in to comment.