Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
[MXNET-1413] Adding Large Tensor support for sort operators
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Kumar Srivastava committed Jun 7, 2019
1 parent bcff498 commit e62d8da
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 101 deletions.
6 changes: 6 additions & 0 deletions python/mxnet/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@ def rand_coord_2d(x_low, x_high, y_low, y_high):
return x, y


def create_2d_tensor(rows, columns):
a = np.arange(0, rows).reshape(rows, 1)
b = np.broadcast_to(a, shape=(a.shape[0], columns))
return mx.nd.array(b, dtype=np.int64)


def np_reduce(dat, axis, keepdims, numpy_reduce_func):
"""Compatible reduce for old version of NumPy.
Expand Down
2 changes: 1 addition & 1 deletion src/operator/mxnet_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ struct Kernel<OP, cpu> {
}
}
#else
for (size_t i = 0; i < N; ++i) {
for (index_t i = 0; i < static_cast<index_t>(N); ++i) {
OP::Map(i, args...);
}
#endif
Expand Down
Loading

0 comments on commit e62d8da

Please sign in to comment.