Skip to content

Commit

Permalink
Correcting the padding of mask tensor when the dimension is lesser th…
Browse files Browse the repository at this point in the history
…an self tensor
  • Loading branch information
apbose committed May 19, 2023
1 parent 98c4011 commit 3b10531
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/conversion/converters/impl/select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,12 +708,12 @@ auto select_registrations TORCHTRT_UNUSED =
int diff = mask->getDimensions().nbDims - self->getDimensions().nbDims;
for (int i = 0; i < diff; i++) {
if (mask->getDimensions().d[i] != 1) {
LOG_DEBUG("The mask dimension cannot be unpadded to the self dimension");
LOG_ERROR("The mask dimension cannot be unpadded to the self dimension");
}
}
mask = addUnpadding(ctx, n, mask, self->getDimensions().nbDims, false, true);
} else {
self = addPadding(ctx, n, self, mask->getDimensions().nbDims, false, true);
mask = addPadding(ctx, n, mask, self->getDimensions().nbDims, false, true);
}
// mask = addPadding(ctx, n, mask, self->getDimensions().nbDims, false, true);
auto val = args[2].unwrapToScalar();
Expand Down

0 comments on commit 3b10531

Please sign in to comment.