Skip to content

Commit

Permalink
Add CI scripts for Custom Build (pytorch#32316)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#32316

### Summary

Since the Custom Build has been released in 1.4.0, it's time setup CI. To do that, we need

1.  Add a python script to generate the yaml file
2. Add new build scripts to circle CI (arm64 only).

### Test Plan

- Don't break the current iOS CIs

Test Plan: Imported from OSS

Differential Revision: D19437362

Pulled By: xta0

fbshipit-source-id: 395e27a582c43663af88d11b1ef974a4687e672c
  • Loading branch information
xta0 authored and facebook-github-bot committed Jan 16, 2020
1 parent 34c751c commit 8c8bd79
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ios/TestApp/custom_build/custom_build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import torch
import torchvision
import yaml

model = torchvision.models.mobilenet_v2(pretrained=True)
model.eval()
example = torch.rand(1, 3, 224, 224)
traced_script_module = torch.jit.trace(model, example)
ops = torch.jit.export_opnames(traced_script_module)
with open('mobilenetv2.yaml', 'w') as output:
yaml.dump(ops, output)
10 changes: 10 additions & 0 deletions ios/TestApp/custom_build/mobilenetv2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- aten::_convolution
- aten::add.Tensor
- aten::addmm
- aten::batch_norm
- aten::dropout
- aten::hardtanh_
- aten::mean.dim
- aten::t
- prim::Constant
- prim::ListConstruct

0 comments on commit 8c8bd79

Please sign in to comment.