Commit Graph

13 Commits

Author SHA1 Message Date
53c1dca6a3 [Reland] Add a workflow to release Android binaries (#110976)
This adds 2 jobs to build PyTorch Android with and without lite interpreter:

* Keep the list of currently supported ABI armeabi-v7a, arm64-v8a, x86, x86_64
* Pass all the test on emulator
* Run an the test app on emulator and my Android phone `arm64-v8a` without any issue
![Screenshot_20231010-114453](https://github.com/pytorch/pytorch/assets/475357/57e12188-1675-44d2-a259-9f9577578590)
* Run on AWS https://us-west-2.console.aws.amazon.com/devicefarm/home#/mobile/projects/b531574a-fb82-40ae-b687-8f0b81341ae0/runs/5fce6818-628a-4099-9aab-23e91a212076
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110976
Approved by: https://github.com/atalman
2023-10-18 21:17:11 +00:00
bd9a2465e7 Back out "Add a workflow to release Android binaries (#110976)" (#111401)
Summary:
Original commit changeset: 96813f0fac68

Original Phabricator Diff: D50161780

This breaks the integration test on T166457344

Test Plan: Sandcastle.

Differential Revision: D50344243

Pull Request resolved: https://github.com/pytorch/pytorch/pull/111401
Approved by: https://github.com/izaitsevfb
2023-10-16 23:16:37 +00:00
2edc75a669 Add a workflow to release Android binaries (#110976)
This adds 2 jobs to build PyTorch Android with and without lite interpreter:

* Keep the list of currently supported ABI armeabi-v7a, arm64-v8a, x86, x86_64
* Pass all the test on emulator
* Run an the test app on emulator and my Android phone `arm64-v8a` without any issue
![Screenshot_20231010-114453](https://github.com/pytorch/pytorch/assets/475357/57e12188-1675-44d2-a259-9f9577578590)
* Run on AWS https://us-west-2.console.aws.amazon.com/devicefarm/home#/mobile/projects/b531574a-fb82-40ae-b687-8f0b81341ae0/runs/5fce6818-628a-4099-9aab-23e91a212076
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110976
Approved by: https://github.com/atalman
2023-10-11 00:19:33 +00:00
3d82d8d0ed [BE] Enable more flake8-comprehensions checks (#94601)
I applied some flake8 fixes and enabled checking for them in the linter. I also enabled some checks for my previous comprehensions PR.

This is a follow up to #94323 where I enable the flake8 checkers for the fixes I made and fix a few more of them.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/94601
Approved by: https://github.com/ezyang
2023-02-10 23:40:29 +00:00
40e99fe6db Re-enable iOS simulator tests (#82027)
Issue #81613

To enable the rest of the tests, I had to disable dynamic_quant_ops test.

For further investigation and re-enabling dynamic_quant_ops (in a separate PR) need to look for a PR that went into nightly for Jul 16 2022 and broke the model file generation.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/82027
Approved by: https://github.com/huydhn
2022-07-25 18:43:47 +00:00
c755d22045 [mobile] Update test model generation script to count op occurrences
This updated script will count the number of model that contains a certain op, and calculate the coverage based on that.
Example output:
Generated 693 ops
Covered 344/393 (87.53%) production ops
Covered 6053/7146 (84.7%) occurrence
pytorch ver 1.12.0.dev20220401

Also updated some test generation scripts
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75155
Approved by: https://github.com/kit1980
2022-04-08 05:54:37 +00:00
54bd433879 [mobile] display uncovered ops and pytorch version
as title

Pull Request resolved: https://github.com/pytorch/pytorch/pull/75117
Approved by: https://github.com/kit1980
2022-04-01 19:53:13 +00:00
28a4b4759a Add models test for android and iOS
See https://github.com/pytorch/pytorch/pull/74793 for more details
Redo everything in one pr. This diff added test model generation script and updated android and ios tests.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74947
Approved by: https://github.com/kit1980
2022-03-30 20:56:24 +00:00
33b9726e6b Revert "add model test for Android"
This reverts commit 91ef3c82615d6ede05d5b86f1bd5571ea95e4ef1.

Reverted https://github.com/pytorch/pytorch/pull/74793 on behalf of https://github.com/seemethere
2022-03-29 22:08:22 +00:00
91ef3c8261 add model test for Android
This pr

moved some model generation scripts to a central place (mobile net v2, android test model)
updated scripts so these models can run on Android (Java doesn't support certain scalar types as return value)
updated model generation script to take arguments (generate models for android/ios, checked-in model or on-the-fly model)
add Android instrumentation tests for these new models
After this change, the Android instrumentation test will run 35 models which covered 91% of production ops. The coverage information can be found in this file: https://github.com/pytorch/pytorch/blob/master/test/mobile/model_test/coverage.yaml

Note that these models are checked-in for back compatibility check (to ensure they can run with newer pytorch versions).

The script generates models for mobile test. For each model we have a "checked-in" version
and an "on-the-fly" version. The "on-the-fly" version will be generated during test, and
should not be committed to the repo. The "checked-in" version is used for back compatibility check.

Note that Android only support checked-in model right now. iOS can test both (in another pr).

use 'gen_test_model.py android-test' to generate on the fly models for android
use 'gen_test_model.py ios-test' to generate on the fly models for ios
use 'python gen_test_model.py android' to generate checked-in models for android
use 'python gen_test_model.py ios' to generate on-the-fly models for ios
use 'gen_test_model.py <model_name_no_suffix>' to update the given checked-in model

Pull Request resolved: https://github.com/pytorch/pytorch/pull/74793
Approved by: https://github.com/kit1980
2022-03-29 04:46:14 +00:00
c24bc056c8 [mobile] add test model generation script and ios tests
- update model generation script to cover more ops (including quant ops)
- add more test cases for iOS simulator test
- Need to update GA config to run the new model test on iOS
```
Generated 703 ops and covered 356/393 (90.59%) production ops.
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74599
Approved by: https://github.com/kit1980
2022-03-23 07:53:04 +00:00
4bf84170ce update script to calculate operator coverage
update model generation script to calculate operator coverage
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74005
Approved by: https://github.com/kit1980
2022-03-10 05:17:36 +00:00
69cdcd2da2 [OSS] add script to generate test models for mobile (#73746)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73746

Added some scripts to generate 4 models for OSS mobile test

- tensor related ops
- math ops
- neural net related ops
- random sampling ops

So far these models covered around half of root ops used in production.
Will continue to iterate for more ops.

Also updated iOS test to run these test models.

Test Plan:
all tests passed on iOS simulator

{F708807282}

Reviewed By: xta0

Differential Revision: D34616936

fbshipit-source-id: c7b7b4644f766924f0914fbfe1beec2d8e098c38
(cherry picked from commit 4b1d52b1f2bc2d7325bf2712f39b8ba0a381cae1)
2022-03-09 18:18:50 +00:00