ChaiBapchya commented on a change in pull request #16898: Sparse int64 Large
tensor support
URL: https://github.com/apache/incubator-mxnet/pull/16898#discussion_r365056993
##########
File path: src/operator/tensor/cast_storage-inl.h
##########
@@ -283,14 +283,14 @@ struct CopyCsrDataToDns {
* \param num_cols number of columns of the dns tensor
*/
template<typename DType, typename IType, typename CType>
- MSHADOW_XINLINE static void Map(int i,
+ MSHADOW_XINLINE static void Map(index_t i,
DType* dns_data,
const CType* col_idx,
const IType* indptr,
const DType* csr_data,
const nnvm::dim_t num_cols) {
const nnvm::dim_t offset = i * num_cols;
- for (IType j = indptr[i]; j < indptr[i+1]; ++j) {
+ for (index_t j = static_cast<index_t>(indptr[i]); j <
static_cast<index_t>(indptr[i+1]); ++j) {
Review comment:
Found that IType and CType will be int64 anyway. No need for hard-code to
index_t
----------------------------------------------------------------
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]
With regards,
Apache Git Services