access2rohit commented on a change in pull request #18239:
URL: https://github.com/apache/incubator-mxnet/pull/18239#discussion_r420260793
##########
File path: src/operator/tensor/ordering_op-inl.h
##########
@@ -284,29 +285,29 @@ MSHADOW_XINLINE void MergeTopK(index_t K, DType *val1,
index_t *ind1, DType *val
}
}
-template<typename DType>
-__global__ void PartialSortSmallK(index_t K, index_t N, DType *val, index_t
*ind, bool is_ascend) {
+template<typename DType, typename IDXType = int32_t>
+__global__ void PartialSortSmallK(IDXType K, IDXType N, DType *val, IDXType
*ind, bool is_ascend) {
// Buffer for pairwise reduction.
- extern __shared__ index_t buff[];
+ extern __shared__ int32_t buff[];
Review comment:
Needed to be hardcoded. Since this is declared outside as extern so by
making it as IDXType. Compiler attempted to use int64 and int32 while it can
only be one of the 2 as its index_t outside where defined.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]