-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Fix nd.pick large array issue #14082
Fix nd.pick large array issue #14082
Conversation
96766a4
to
aaa7f1c
Compare
@mxnet-label-bot add [pr-awaiting-review, NDArray] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Could you add an unit test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ChaiBapchya for your contribution! Overall looks good. Please add a test in test_large_array under nightly.
MSHADOW_XINLINE static void Map(int i, DType* out, const DType* a, | ||
const IType *idx, int M, int stride, | ||
MSHADOW_XINLINE static void Map(index_t i, DType* out, const DType* a, | ||
const IType *idx, size_t M, int stride, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just use index_t
for M so you don't need so many casting in this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for using index_t for M.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. i looked at other places where large array support was mentioned. It seemed that
index_t
was used where the variable is used as index
and size_t
was used otherwise. Hence I stuck to that. But I'll change it to avoid casting if that's what's useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add test case to test for large array ?
lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* large op support * replaced size_t with index_t for M, added test case * changed shape
* large op support * replaced size_t with index_t for M, added test case * changed shape
* large op support * replaced size_t with index_t for M, added test case * changed shape
* large op support * replaced size_t with index_t for M, added test case * changed shape
* large op support * replaced size_t with index_t for M, added test case * changed shape
Description
large op support (using index_t and size_t instead of int) based off of #13418
Fixes #9314
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments