Enable test_api IMethodTest in OSS (#63345)
authorJiewen Tan <jwtan@fb.com>
Thu, 26 Aug 2021 23:49:13 +0000 (16:49 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 26 Aug 2021 23:50:52 +0000 (16:50 -0700)
commited573a8e08fadaa611d568294df14c0a96dc4a81
tree4f86bbaa6b416e5e3a3cd123e2f9e27255c568f5
parent0bd8d0951dcb4063c0f7552a7404bd7f0e7b6e6f
Enable test_api IMethodTest in OSS (#63345)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63345

This diff did the following few things to enable the tests:
1. Exposed IMethod as TORCH_API.
2. Linked torch_deploy to test_api if USE_DEPLOY == 1.
3. Generated torch::deploy examples when building torch_deploy library.

Test Plan: ./build/bin/test_api --gtest_filter=IMethodTest.*

Reviewed By: ngimel

Differential Revision: D30346257

Pulled By: alanwaketan

fbshipit-source-id: 932ae7d45790dfb6e00c51893933a054a0fad86d
.jenkins/pytorch/test.sh
test/cpp/api/CMakeLists.txt
test/cpp/api/imethod.cpp
torch/csrc/api/include/torch/imethod.h