pytorch/android/pytorch_android
Ivan Kobzarev 8ec6bc7292 [pytorch][vulkan][jni] LiteModuleLoader load argument to use vulkan device
Summary:
### Java, CPP
Introducing additional parameter `device` to LiteModuleLoader to specify device on which the `forward` will work.

On the java side this is enum that contains CPU and VULKAN, passing as jint to jni side and storing it as a member field on the same level as module.

On pytorch_jni_lite.cpp - for all input tensors converting them to vulkan.

On pytorch_jni_common.cpp (also goes to OSS) - if result Tensor is not cpu - call cpu. (Not Cpu at the moment is only Vulkan).

### BUCK
Introducing `pytorch_jni_lite_with_vulkan` target, that depends on `pytorch_jni_lite_with_vulkan` and adds `aten_vulkan`

In that case `pytorch_jni_lite_with_vulkan` can be used along with `pytorch_jni_lite_with_vulkan`.

Test Plan:
After the following diff with aidemo segmentation:
```
buck install -r aidemos-android
```
{F296224521}

Reviewed By: dreiss

Differential Revision: D23198335

fbshipit-source-id: 95328924e398901d76718c4d828f96e112dfa1b0
2020-09-16 18:35:22 -07:00
..
host Exclude lite interpreter Java files from OSS host build 2019-12-20 13:32:27 -08:00
src [pytorch][vulkan][jni] LiteModuleLoader load argument to use vulkan device 2020-09-16 18:35:22 -07:00
build.gradle [android][ci] Fix CI packaging headers to aar (#40442) 2020-06-23 16:41:12 -07:00
CMakeLists.txt Re-apply PyTorch pthreadpool changes 2020-06-23 19:26:21 -07:00
generate_test_asset.cpp [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
generate_test_torchscripts.py [android][jni] Support Tensor MemoryFormat in java wrappers (#40785) 2020-09-03 17:01:35 -07:00
gradle.properties Gradle tasks for publishing to bintray, jcenter, mavencentral etc. (#25351) 2019-08-30 17:52:34 -07:00
test_asset.jit [android][jni] Support Tensor MemoryFormat in java wrappers (#40785) 2020-09-03 17:01:35 -07:00