Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Return size_t from shape::size().#367

Closed
ZhennanQin wants to merge 1 commit intodmlc:masterfrom
ZhennanQin:master
Closed

Return size_t from shape::size().#367
ZhennanQin wants to merge 1 commit intodmlc:masterfrom
ZhennanQin:master

Conversation

@ZhennanQin
Copy link
Copy Markdown

@ZhennanQin ZhennanQin commented Dec 29, 2018

This issue blocks MXNet PR: apache/mxnet#13697. apache/mxnet#13729 is the corresponding fix for MXNet. After this fix, that PR can pass. Ref to apache/mxnet#13755.

@ZhennanQin
Copy link
Copy Markdown
Author

@apeforest Please help review and merge. Thanks.

@pengzhao-intel
Copy link
Copy Markdown

@szha We have an offline talk with @apeforest and we agreed with the change to fix the casting issue in MXNet. Please help take a review and merge this PR.

Happy New Year 👍

Copy link
Copy Markdown
Contributor

@apeforest apeforest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZhennanQin Could you please link the PR (ready for review) in MXNet that requires this change?

@KellenSunderland
Copy link
Copy Markdown
Contributor

It's apache/mxnet#13697 If we cast manually to size_t it compiles. For reference: apache/mxnet#13755

@ZhennanQin
Copy link
Copy Markdown
Author

@szha Please help to review and merge this. Then I will upgrade mshadow in apache/mxnet#13729.

Comment thread mshadow/tensor.h
/*! \return number of valid elements */
MSHADOW_XINLINE index_t Size(void) const {
MSHADOW_XINLINE size_t Size(void) const {
index_t size = this->shape_[0];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we want to cast here to size_t explicitly?

@stu1130
Copy link
Copy Markdown

stu1130 commented Jan 16, 2019

@ZhennanQin could you address the comments Thanks!

@ZhennanQin
Copy link
Copy Markdown
Author

@stu1130 The comment request is beyond my initial scope, and I don't have enough knowledge to address other API changes. As it's not a block issue for me anymore, let @apeforest to continue this work. I can abandon this PR.

@ZhennanQin ZhennanQin closed this Jan 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants