Skip to content

Conversation

@IvanKobzarev
Copy link
Contributor

@IvanKobzarev IvanKobzarev commented Sep 17, 2020

Stack from ghstack:

Differential Revision: D23766039

Testing:

USE_VULKAN=1 python setup.py install
import torch
from torch.utils.mobile_optimizer import optimize_for_mobile

script_module = torch.jit.load('mobilenet_v2.pt')
script_module_vulkan = optimize_for_mobile(script_module)
torch.jit.save(script_module_vulkan, 'mobilenet_v2_vulkan.pt')

IvanKobzarev added a commit that referenced this pull request Sep 17, 2020
ghstack-source-id: 39f6444
Pull Request resolved: #44903
@dr-ci
Copy link

dr-ci bot commented Sep 17, 2020

💊 CI failures summary and remediations

As of commit 6426cf4 (more details on the Dr. CI page):


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

Extra GitHub checks: 1 failed


ci.pytorch.org: 1 failed


codecov.io: 1 failed


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 or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 36 times.

JC-B pushed a commit to JC-B/pytorch that referenced this pull request Sep 17, 2020
Differential Revision: [D23766039](https://our.internmc.facebook.com/intern/diff/D23766039)

Testing:
```
python setup.py install
```

```
import torch
from torch.utils.mobile_optimizer import optimize_for_vulkan

script_module = torch.jit.load('mobilenet_v2.pt')
script_module_vulkan = optimize_for_vulkan(script_module)
torch.jit.save(script_module_vulkan, 'mobilenet_v2_vulkan.pt')
```

[ghstack-poisoned]
Copy link
Contributor

@kimishpatel kimishpatel left a comment

Choose a reason for hiding this comment

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

Looks good to me. Some builds are failing.

@codecov
Copy link

codecov bot commented Sep 18, 2020

Codecov Report

Merging #44903 into gh/IvanKobzarev/78/base will increase coverage by 0.00%.
The diff coverage is 40.00%.

Impacted file tree graph

@@                   Coverage Diff                    @@
##           gh/IvanKobzarev/78/base   #44903   +/-   ##
========================================================
  Coverage                    67.83%   67.83%           
========================================================
  Files                          384      384           
  Lines                        49945    49949    +4     
========================================================
+ Hits                         33881    33884    +3     
- Misses                       16064    16065    +1     
Impacted Files Coverage Δ
torch/utils/mobile_optimizer.py 86.84% <40.00%> (-7.28%) ⬇️
torch/utils/_benchmark/utils/common.py 79.33% <0.00%> (+1.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0063512...6426cf4. Read the comment docs.

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

Testing:
```
USE_VULKAN=1 python setup.py install
```

```
import torch
from torch.utils.mobile_optimizer import optimize_for_mobile

script_module = torch.jit.load('mobilenet_v2.pt')
script_module_vulkan = optimize_for_mobile(script_module)
torch.jit.save(script_module_vulkan, 'mobilenet_v2_vulkan.pt')
```

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Sep 18, 2020
ghstack-source-id: 7f62853
Pull Request resolved: #44903
Differential Revision: [D23766039](https://our.internmc.facebook.com/intern/diff/D23766039)

Testing:
```
USE_VULKAN=1 python setup.py install
```

```
import torch
from torch.utils.mobile_optimizer import optimize_for_mobile

script_module = torch.jit.load('mobilenet_v2.pt')
script_module_vulkan = optimize_for_mobile(script_module)
torch.jit.save(script_module_vulkan, 'mobilenet_v2_vulkan.pt')
```

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Sep 18, 2020
ghstack-source-id: 913e01a
Pull Request resolved: #44903
Differential Revision: [D23766039](https://our.internmc.facebook.com/intern/diff/D23766039)

Testing:
```
USE_VULKAN=1 python setup.py install
```

```
import torch
from torch.utils.mobile_optimizer import optimize_for_mobile

script_module = torch.jit.load('mobilenet_v2.pt')
script_module_vulkan = optimize_for_mobile(script_module)
torch.jit.save(script_module_vulkan, 'mobilenet_v2_vulkan.pt')
```

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Sep 18, 2020
ghstack-source-id: 874708b
Pull Request resolved: #44903
Differential Revision: [D23766039](https://our.internmc.facebook.com/intern/diff/D23766039)

Testing:
```
USE_VULKAN=1 python setup.py install
```

```
import torch
from torch.utils.mobile_optimizer import optimize_for_mobile

script_module = torch.jit.load('mobilenet_v2.pt')
script_module_vulkan = optimize_for_mobile(script_module)
torch.jit.save(script_module_vulkan, 'mobilenet_v2_vulkan.pt')
```

[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Sep 18, 2020
ghstack-source-id: b356d4c
Pull Request resolved: #44903
@facebook-github-bot
Copy link
Contributor

@IvanKobzarev merged this pull request in e9941a5.

@bugra
Copy link
Contributor

bugra commented Sep 20, 2020

@IvanKobzarev @kimishpatel I think this PR is breaking master due to function call of vulkanOptimizeForMobile: https://github.com/pytorch/pytorch/blob/master/binaries/optimize_for_mobile.cc#L71

The function signature of this call does not match of the changes with this PR.

gunandrose4u added a commit to gunandrose4u/pytorch that referenced this pull request Sep 21, 2020
@gunandrose4u gunandrose4u mentioned this pull request Sep 21, 2020
@kimishpatel
Copy link
Contributor

@bugra, thanks for pointing this out. @IvanKobzarev, I think you need something like this in vulkanOptimizeForMobile signature: https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/passes/xnnpack_rewrite.h#L26

@kimishpatel
Copy link
Contributor

@bugra if this needs revert to fix master, please feel free to revert.

@kimishpatel
Copy link
Contributor

Oh looks like @gunandrose4u already fixed this. Thanks.

facebook-github-bot pushed a commit that referenced this pull request Sep 21, 2020
Summary:
Update vulkanOptimizeForMobile function invoking in optimize_for_mobile.cc to align latest call contract in PR #44903.

Pull Request resolved: #45052

Reviewed By: malfet

Differential Revision: D23814953

Pulled By: mrshenli

fbshipit-source-id: 0fa844a8291e952715b9de35cdec0e411c42b7f9
@IvanKobzarev
Copy link
Contributor Author

@bugra, thanks for pointing this out. @IvanKobzarev, I think you need something like this in vulkanOptimizeForMobile signature: https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/passes/xnnpack_rewrite.h#L26

Yes, Sorry I forgot to change it.

@facebook-github-bot facebook-github-bot deleted the gh/IvanKobzarev/78/head branch September 22, 2020 14:18
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.

6 participants