Skip to content

Commit

Permalink
refactor(aten::topk): linting topk converter
Browse files Browse the repository at this point in the history
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
  • Loading branch information
narendasan committed Feb 2, 2021
1 parent 22e6a6b commit 5bd7528
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/conversion/converters/impl/topk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ auto topk_registrations TRTORCH_UNUSED = RegisterNodeConversionPatterns().patter

auto selfDim = util::toVec(self->getDimensions());

//reduceAxes The reduction dimensions. The bit in position i of bitmask reduceAxes corresponds to explicit dimension i of the result.
//E.g., the least significant bit corresponds to the first explicit dimension and the next to least significant bit corresponds to the second explicit dimension.
// reduceAxes The reduction dimensions. The bit in position i of bitmask reduceAxes corresponds to explicit
// dimension i of the result. E.g., the least significant bit corresponds to the first explicit dimension and the
// next to least significant bit corresponds to the second explicit dimension.

if (dim < 0) {
dim = selfDim.size() + dim;
dim = selfDim.size() + dim;
}

uint32_t shiftDim = 1 << dim;
Expand Down

0 comments on commit 5bd7528

Please sign in to comment.