Skip to content

Commit

Permalink
Fix implicit data conversion (#4463)
Browse files Browse the repository at this point in the history
Cherry-picked from #4455
  • Loading branch information
Stonepia authored Jul 13, 2024
1 parent 5bd11ce commit d698764
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions csrc/gpu/aten/operators/DilatedMaxPool3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ struct MaxPool3dWithIndicesOutFrameImplKernelFunctor {
int64_t out_index;
if constexpr (!channels_last) {
out_index = (int64_t)slice * out_cf_c_stride +
oDepth * out_cf_d_stride + oRow * OutputSizeW + oColumn;
(int64_t)oDepth * out_cf_d_stride + (int64_t)oRow * OutputSizeW +
oColumn;
} else {
out_index = (int64_t)batch * out_batch_stride +
oDepth * out_cl_d_stride + oRow * out_cl_h_stride +
oColumn * numChannels + channel;
(int64_t)oDepth * out_cl_d_stride +
(int64_t)oRow * out_cl_h_stride + (int64_t)oColumn * numChannels +
channel;
}
outputData[out_index] = max;
indicesData[out_index] = maxIndex;
Expand Down

0 comments on commit d698764

Please sign in to comment.