PyTorch MergeBot
084c4aa614
Revert "Reapply "Delete TorchScript based Android demo app and point to ExecuTorch ( #153633 )" ( #153656 )"
...
This reverts commit 7ed377f577 .
Reverted https://github.com/pytorch/pytorch/pull/153656 on behalf of https://github.com/larryliu0820 due to Still being used internally so can't remove ([comment](https://github.com/pytorch/pytorch/pull/153656#issuecomment-2887665403 ))
2025-05-16 21:00:11 +00:00
Mengwei Liu
7ed377f577
Reapply "Delete TorchScript based Android demo app and point to ExecuTorch ( #153633 )" ( #153656 )
...
This reverts commit ae0e8f0c73 .
Keep android/libs/fbjni because it's being used by other components of
PyTorch.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/153656
Approved by: https://github.com/malfet
2025-05-16 04:35:42 +00:00
PyTorch MergeBot
ae0e8f0c73
Revert "Delete TorchScript based Android demo app and point to ExecuTorch ( #153633 )"
...
This reverts commit b22f01fcb9 .
Reverted https://github.com/pytorch/pytorch/pull/153633 on behalf of https://github.com/malfet due to But libtorch build regressions are real, fbjni is still used for C++ builds ([comment](https://github.com/pytorch/pytorch/pull/153633#issuecomment-2884951805 ))
2025-05-15 20:16:05 +00:00
Mengwei Liu
b22f01fcb9
Delete TorchScript based Android demo app and point to ExecuTorch ( #153633 )
...
Delete TorchScript demo app and point people to ExecuTorch demo app.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/153633
Approved by: https://github.com/Skylion007 , https://github.com/malfet , https://github.com/atalman , https://github.com/janeyx99 , https://github.com/seemethere
2025-05-15 18:43:59 +00:00
Huy Do
20a7366147
Fix Android publish step with lite interpreter ( #111071 )
...
This file needs to be added to the list like others. The publish command `BUILD_LITE_INTERPRETER=1 android/gradlew -p android publish` finishes successfully with this and files are available on Nexus:

Pull Request resolved: https://github.com/pytorch/pytorch/pull/111071
Approved by: https://github.com/atalman
2023-10-11 20:28:12 +00:00
Linbin Yu
99bcadced4
improve android instrumentation test and update README
...
Added tests for lite interpreter. By default the run_test.sh will use lite interpreter, unless manually set BUILD_LITE_INTERPRETER=0
Also fixed model generation script for android instrumentation test and README.
Verified test can pass for both full jit and lite interpreter. Also tested on emulator and real device using different abis.
Lite interpreter
```
./scripts/build_pytorch_android.sh x86
./android/run_tests.sh
```
Full JIT
```
BUILD_LITE_INTERPRETER=0 ./scripts/build_pytorch_android.sh x86
BUILD_LITE_INTERPRETER=0 ./android/run_tests.sh
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72736
2022-02-22 08:05:33 +00:00
Ivan Kobzarev
d71092f668
[android][fbjni] Update fbjni to 0.2.2 ( #68400 )
...
Summary:
ghstack-source-id: caeb8df3a1
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68400
Fixes #{issue number}
CI-all check:
https://github.com/pytorch/pytorch/pull/68497
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68495
Reviewed By: linbinyu
Differential Revision: D32481451
Pulled By: IvanKobzarev
fbshipit-source-id: b19ce05ff9d63b3f701d718eefbf1e9d66e11639
2021-11-17 16:54:22 -08:00
Nikita Shulga
27eca2c6fd
Revert D32467139: [pytorch][PR] [android][fbjni] Update fbjni to 0.2.2
...
Test Plan: revert-hammer
Differential Revision:
D32467139 (04056df475 )
Original commit changeset: 49e155989d2d
fbshipit-source-id: ce03be3c6f209a6e9969660bd823d5343a7f0615
2021-11-16 13:50:50 -08:00
Ivan Kobzarev
04056df475
[android][fbjni] Update fbjni to 0.2.2 ( #68400 )
...
Summary:
ghstack-source-id: caeb8df3a1
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68400
Fixes #{issue number}
Updates fbjni version to 0.2.2
ci-all PR: https://github.com/pytorch/pytorch/pull/68401
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68402
Reviewed By: linbinyu
Differential Revision: D32467139
Pulled By: IvanKobzarev
fbshipit-source-id: 49e155989d2dbafedd5b2df77e089e25e8b4f8f8
2021-11-16 11:34:46 -08:00
Ailing Zhang
eb52e36460
Revert D27469727: [pytorch][PR] [android] fbjni from prefab dependency 0.2.2
...
Test Plan: revert-hammer
Differential Revision:
D27469727 (507b46f23e )
Original commit changeset: 2ab22879e81c
fbshipit-source-id: d656463b81a02fbf870dded5d3868bb33e016fe0
2021-03-31 17:21:30 -07:00
Ivan Kobzarev
507b46f23e
[android] fbjni from prefab dependency 0.2.2 ( #55066 )
...
Summary:
Switching pytorch android to use fbjni from prefab dependencies
Bumping version of fbjni to 0.2.2
soloader version to 0.10.1
Pull Request resolved: https://github.com/pytorch/pytorch/pull/55066
Reviewed By: dreiss
Differential Revision: D27469727
Pulled By: IvanKobzarev
fbshipit-source-id: 2ab22879e81c9f2acf56807c6a133b0ca20bb40a
2021-03-31 14:12:18 -07:00
Riley Dulin
62f9b03b7c
[lint] Apply whitespace linter to all gradle files
...
Summary: Run whitespace and license linters on gradle build files.
Reviewed By: zertosh
Differential Revision: D25687355
fbshipit-source-id: 44330daac7582fed6c05680bffc74e855a9b1dbc
2020-12-22 17:01:51 -08:00
David Reiss
35b249769d
Exclude lite interpreter Java files from OSS host build
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/31204
Test Plan: Imported from OSS
Differential Revision: D19200610
Pulled By: dreiss
fbshipit-source-id: 0cf41c99b4c2604afc2dccfebbea213c0e1f9638
2019-12-20 13:32:27 -08:00
Ivan Kobzarev
ca8cb3241a
Expose setNumThreads to android api ( #31205 )
...
Summary:
PR https://github.com/pytorch/pytorch/pull/31033 was unlanded due to macos build failure:
https://app.circleci.com/jobs/github/pytorch/pytorch/3916388
This PR has changes that `setNumThreads` is only for android and moved to separate class `org.pytorch.PytorchAndroid` as a static function which is better as it has global effect
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31205
Reviewed By: dreiss
Differential Revision: D18977250
Pulled By: IvanKobzarev
fbshipit-source-id: 4995859808af498c82933c4db52bd7c7dfae90e5
2019-12-12 18:57:27 -08:00
Ivan Kobzarev
eef349a679
host build gradle publishing ( #29749 )
...
Summary:
To publish snapshots:
`gradle -p android pytorch_host:uploadArchives`
(for test changed version to 0.0.1-SNAPSHOT)
Result:
https://oss.sonatype.org/#nexus-search;quick~pytorch_java_only
https://oss.sonatype.org/service/local/repositories/snapshots/content/org/pytorch/pytorch_java_only/0.0.1-SNAPSHOT/
jar:
https://oss.sonatype.org/service/local/repositories/snapshots/content/org/pytorch/pytorch_java_only/0.0.1-SNAPSHOT/pytorch_java_only-0.0.1-20191113.211446-1.jar
sources:
https://oss.sonatype.org/service/local/repositories/snapshots/content/org/pytorch/pytorch_java_only/0.0.1-SNAPSHOT/pytorch_java_only-0.0.1-20191113.211446-1-sources.jar
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29749
Differential Revision: D18496644
Pulled By: IvanKobzarev
fbshipit-source-id: 136213c23b9ab1e3e22059ad9c8b53822c026b3b
2019-11-14 11:44:02 -08:00
David Reiss
42faf961c8
Update fbjni submodule to new upstream and latest version
...
Summary:
The central fbjni repository is now public, so point to it and
take the latest version, which includes support for host builds
and some condensed syntax.
Test Plan: CI
Differential Revision: D18217840
fbshipit-source-id: 454e3e081f7e3155704fed692506251c4018b2a1
2019-10-31 11:48:25 -07:00
David Reiss
c9423c30b3
Add host build for pytorch_android ( #27662 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27662
This adds a new gradle subproject at pytorch_android/host and tweaks
the top-level build.gradle to only run some Android bits on the other
projects.
Referencing Java sources from inside the host directory feels a bit
hacky, but getting host and Android Gradle builds to coexist in the same
directory hit several roadblocks. We can try a bigger refactor to
separate the Android-specific and non-Android-specific parts of the
code, but that seems overkill at this point for 4 Java files.
This doesn't actually run without some local changes to fbjni, but I
want to get the files landed to avoid unnecessary merge conflicts.
Test Plan: Imported from OSS
Differential Revision: D18210317
Pulled By: dreiss
fbshipit-source-id: dafb54dde06a5a9a48fc7b7065d9359c5c480795
2019-10-29 16:04:09 -07:00