Skip to content

[pytorch][size] remove unused SparseCPUType from mobile build #33517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

ljk53
Copy link
Contributor

@ljk53 ljk53 commented Feb 19, 2020

Stack from ghstack:

I don't think any mobile model uses SparseCPU backend yet so we can skip
generating dispatch code for this backend type.

This will help reduce mobile code size with dynamic dispatch turned on,
roughly ~100K for uncompressed iOS: D19616007 +413K v.s. D19616016 +319K.

It probably doesn't affect much static dispatch build size as the unused
static dispatch methods will be stripped by linker in the end.

Differential Revision: D19978633

NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!

I don't think any mobile model uses SparseCPU backend yet so we can skip
generating dispatch code for this backend type.

This will help reduce mobile code size with dynamic dispatch turned on,
roughly ~100K for uncompressed iOS: D19616007 +413K v.s. D19616016 +319K.

It probably doesn't affect much static dispatch build size as the unused
static dispatch methods will be stripped by linker in the end.

Differential Revision: [D19978633](https://our.internmc.facebook.com/intern/diff/D19978633/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D19978633/)!

[ghstack-poisoned]
@ljk53 ljk53 requested review from ezyang, gchanan and bhosmer February 19, 2020 21:33
@dr-ci
Copy link

dr-ci bot commented Feb 19, 2020

💊 CircleCI build failures summary and remediations

As of commit 7408719:

  • 1/1 failures introduced in this PR

Detailed failure analysis

One may explore the probable reasons each build failed interactively on the Dr. CI website.

🕵️ 1 new failure recognized by patterns

The following build failures do not appear to be due to upstream breakage:

See CircleCI build pytorch_linux_backward_compatibility_check_test (1/1)

Step: "Test" (full log | pattern match details)

Feb 20 19:48:52 The PR is introducing backward incompatible changes to the operator library. Please contact PyTorch team to confirm whether this change is wanted or not.
Feb 20 19:48:52 processing existing schema:  aten::values(Tensor(a) self) -> (Tensor(a)) 
Feb 20 19:48:52 processing existing schema:  aten::values(Dict(str, t) self) -> (t[](*)) 
Feb 20 19:48:52 processing existing schema:  aten::values(Dict(int, t) self) -> (t[](*)) 
Feb 20 19:48:52 processing existing schema:  aten::values(Dict(float, t) self) -> (t[](*)) 
Feb 20 19:48:52 processing existing schema:  aten::values(Dict(Tensor, t) self) -> (t[](*)) 
Feb 20 19:48:52 processing existing schema:  aten::view(Tensor(a) self, int[] size) -> (Tensor(a)) 
Feb 20 19:48:52 processing existing schema:  aten::where(Tensor condition) -> (Tensor[]) 
Feb 20 19:48:52 processing existing schema:  aten::where.self(Tensor condition, Tensor self, Tensor other) -> (Tensor) 
Feb 20 19:48:52 processing existing schema:  aten::zeros_like(Tensor self, *, int? memory_format=None) -> (Tensor) 
Feb 20 19:48:52 processing existing schema:  aten::zeros_like.dtype(Tensor self, *, int dtype, int layout, Device device, bool pin_memory=False, int? memory_format=None) -> (Tensor) 
Feb 20 19:48:52 The PR is introducing backward incompatible changes to the operator library. Please contact PyTorch team to confirm whether this change is wanted or not.  
Feb 20 19:48:52  
Feb 20 19:48:52 Broken ops: [ 
Feb 20 19:48:52 	aten::tril_indices(int row, int col, int offset=0, *, int? dtype=4, int? layout=None, Device? device=None, bool? pin_memory=None) -> (Tensor) 
Feb 20 19:48:52 	aten::triu_indices(int row, int col, int offset=0, *, int? dtype=4, int? layout=None, Device? device=None, bool? pin_memory=None) -> (Tensor) 
Feb 20 19:48:52 ] 
Feb 20 19:48:52 + cleanup 
Feb 20 19:48:52 + retcode=1 
Feb 20 19:48:52 + set +x 
Feb 20 19:48:52 =================== sccache compilation log =================== 
Feb 20 19:48:52 =========== If your build fails, please take a look at the log above for possible reasons =========== 

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.

This comment has been revised 4 times.

…ild"

I don't think any mobile model uses SparseCPU backend yet so we can skip
generating dispatch code for this backend type.

This will help reduce mobile code size with dynamic dispatch turned on,
roughly ~100K for uncompressed iOS: D19616007 +413K v.s. D19616016 +319K.

It probably doesn't affect much static dispatch build size as the unused
static dispatch methods will be stripped by linker in the end.

Differential Revision: [D19978633](https://our.internmc.facebook.com/intern/diff/D19978633/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D19978633/)!

[ghstack-poisoned]
ljk53 added a commit that referenced this pull request Feb 19, 2020
Pull Request resolved: #33517

I don't think any mobile model uses SparseCPU backend yet so we can skip
generating dispatch code for this backend type.

This will help reduce mobile code size with dynamic dispatch turned on,
roughly ~100K for uncompressed iOS: D19616007 +413K v.s. D19616016 +319K.

It probably doesn't affect much static dispatch build size as the unused
static dispatch methods will be stripped by linker in the end.
ghstack-source-id: 98578917

Differential Revision: [D19978633](https://our.internmc.facebook.com/intern/diff/D19978633/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D19978633/)!
…ild"

I don't think any mobile model uses SparseCPU backend yet so we can skip
generating dispatch code for this backend type.

This will help reduce mobile code size with dynamic dispatch turned on,
roughly ~100K for uncompressed iOS: D19616007 +413K v.s. D19616016 +319K.

It probably doesn't affect much static dispatch build size as the unused
static dispatch methods will be stripped by linker in the end.

Differential Revision: [D19978633](https://our.internmc.facebook.com/intern/diff/D19978633/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D19978633/)!

[ghstack-poisoned]
ljk53 added a commit that referenced this pull request Feb 20, 2020
Pull Request resolved: #33517

I don't think any mobile model uses SparseCPU backend yet so we can skip
generating dispatch code for this backend type.

This will help reduce mobile code size with dynamic dispatch turned on,
roughly ~100K for uncompressed iOS: D19616007 +413K v.s. D19616016 +319K.

It probably doesn't affect much static dispatch build size as the unused
static dispatch methods will be stripped by linker in the end.
ghstack-source-id: 98615810

Differential Revision: [D19978633](https://our.internmc.facebook.com/intern/diff/D19978633/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D19978633/)!
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 009293e.

@facebook-github-bot facebook-github-bot deleted the gh/ljk53/104/head branch February 24, 2020 15:18
ttumiel pushed a commit to ttumiel/pytorch that referenced this pull request Mar 4, 2020
…h#33517)

Summary:
Pull Request resolved: pytorch#33517

I don't think any mobile model uses SparseCPU backend yet so we can skip
generating dispatch code for this backend type.

This will help reduce mobile code size with dynamic dispatch turned on,
roughly ~100K for uncompressed iOS: D19616007 +413K v.s. D19616016 +319K.

It probably doesn't affect much static dispatch build size as the unused
static dispatch methods will be stripped by linker in the end.
ghstack-source-id: 98615810

Test Plan: - CI & BuildSizeBot

Reviewed By: linbinyu

Differential Revision: D19978633

fbshipit-source-id: 27bf6ada2ba98482084cf23724cf400b538b0a03
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.

4 participants