[TorchScript] C++ interface of to_<backend> (Re-land) (#52340)
Summary:
This is a re-land off https://github.com/pytorch/pytorch/pull/51797 with fix for spurious libcuda dependency
Fix limits the scope of `no-as-needed` linker flag to just `jitbackend_test`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/52340
Reviewed By: agolynski, iseeyuan
Differential Revision: D26476168
Pulled By: malfet
fbshipit-source-id: f909428af82182b3bffd020ca18cca7a9b5846b6
diff --git a/tools/build_variables.bzl b/tools/build_variables.bzl
index bf30705..e7757aa 100644
--- a/tools/build_variables.bzl
+++ b/tools/build_variables.bzl
@@ -129,6 +129,7 @@
"torch/csrc/jit/api/object.cpp",
"torch/csrc/jit/backends/backend_detail.cpp",
"torch/csrc/jit/backends/backend_interface.cpp",
+ "torch/csrc/jit/backends/backend_resolver.cpp",
"torch/csrc/jit/codegen/fuser/codegen.cpp",
"torch/csrc/jit/codegen/fuser/compiler.cpp",
"torch/csrc/jit/codegen/fuser/executor.cpp",
@@ -524,7 +525,6 @@
"torch/csrc/autograd/python_variable.cpp",
"torch/csrc/autograd/python_variable_indexing.cpp",
"torch/csrc/jit/backends/backend_init.cpp",
- "torch/csrc/jit/backends/backend_resolver.cpp",
"torch/csrc/jit/python/init.cpp",
"torch/csrc/jit/passes/onnx.cpp",
"torch/csrc/jit/passes/onnx/cast_all_constant_to_floating.cpp",