Skip to content

Add a test to verify non-contiguous tensors work correctly with RPC.#36705

Closed
pritamdamania87 wants to merge 1 commit intogh/pritamdamania87/119/basefrom
gh/pritamdamania87/119/head
Closed

Add a test to verify non-contiguous tensors work correctly with RPC.#36705
pritamdamania87 wants to merge 1 commit intogh/pritamdamania87/119/basefrom
gh/pritamdamania87/119/head

Conversation

@pritamdamania87
Copy link
Copy Markdown
Contributor

@pritamdamania87 pritamdamania87 commented Apr 16, 2020

Stack from ghstack:

Differential Revision: D21058176

pritamdamania87 pushed a commit that referenced this pull request Apr 16, 2020
Differential Revision: [D21058176](https://our.internmc.facebook.com/intern/diff/D21058176/)

ghstack-source-id: 102257937
Pull Request resolved: #36705
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Apr 16, 2020

💊 Build failures summary and remediations

As of commit 46cd21f (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

Extra GitHub checks


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker.

See how this bot performed.

This comment has been revised 1 time.


# Send non-cont tensor over RPC.
next_rank = (self.rank + 1) % self.world_size
t_ret = rpc.rpc_sync(worker_name(next_rank), non_cont_test, args=(t_view, t_cont))
Copy link
Copy Markdown
Contributor

@mrshenli mrshenli Apr 16, 2020

Choose a reason for hiding this comment

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

Isn't this behavior depending on the sparsity of the data?

pTensors.push_back(worthRecopying(t) ? t.clone() : t);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, although given the small size of the tensor here I don't think that we're copying the tensor. This test was mostly to ensure we can send non-contiguous tensors over the wire without any correctness issues.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in b0227f2.

@facebook-github-bot facebook-github-bot deleted the gh/pritamdamania87/119/head branch April 20, 2020 14:17
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…ytorch#36705)

Summary:
Pull Request resolved: pytorch#36705

ghstack-source-id: 102257937

Test Plan: waitforbuildbot

Differential Revision: D21058176

fbshipit-source-id: 1d32730d61420324856cc641f888751418c1dd26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants