Skip to content

[Need Discussion] fix #1524, let long_args False for param "size" of set_#1568

Merged
soumith merged 5 commits intopytorch:masterfrom
stegben:fix-set-1524
May 18, 2017
Merged

[Need Discussion] fix #1524, let long_args False for param "size" of set_#1568
soumith merged 5 commits intopytorch:masterfrom
stegben:fix-set-1524

Conversation

@stegben
Copy link
Contributor

@stegben stegben commented May 16, 2017

It passed on my python3.5 w/o CUDA environment.

Just curious, why does size need to be a long argument? I thought that the size of a tensor should be fixed.

p.s. The test will be removed if this PR is approved.

@apaszke
Copy link
Contributor

apaszke commented May 16, 2017

long_args doesn't mean that it expects longs, but that the tail is expected to be arbitrary many integers. I think the current two options could be compressed to this:

     - cname: setStorage
        arguments:
         - THTensor* self
         - THStorage* sourceStorage
         - long storage_offset
         - THSize* size
         - arg: THStride* strides
           default: NULL

It's backward incompatible (x.set_(storage, 0, 1, 2, 3, 4) is no longer valid), but I think I'm ok with this change. @soumith @colesbury?

@stegben
Copy link
Contributor Author

stegben commented May 16, 2017

compressed

@soumith
Copy link
Collaborator

soumith commented May 17, 2017

I'm okay with this change!

@colesbury
Copy link
Member

@pytorchbot test this please

@soumith soumith merged commit c57f053 into pytorch:master May 18, 2017
gchanan pushed a commit to gchanan/pytorch that referenced this pull request May 23, 2017
* fix pytorch#1524, let long_args False for param "size" of set_
gchanan pushed a commit to gchanan/pytorch that referenced this pull request May 23, 2017
* fix pytorch#1524, let long_args False for param "size" of set_
killeent pushed a commit to killeent/pytorch that referenced this pull request May 31, 2017
* fix pytorch#1524, let long_args False for param "size" of set_
@stegben stegben deleted the fix-set-1524 branch June 10, 2017 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants