mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Revert "Delete functorch C extension entirely. (#163340)"
This reverts commit 1faf6367e396b1d0894e8735912a47ac465f469d. Reverted https://github.com/pytorch/pytorch/pull/163340 on behalf of https://github.com/wdvr due to temporary revert to pull out #162659 ([comment](https://github.com/pytorch/pytorch/pull/163340#issuecomment-3317105243))
This commit is contained in:
31
BUILD.bazel
31
BUILD.bazel
@ -833,6 +833,36 @@ pybind_extension(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "functorch",
|
||||
hdrs = glob([
|
||||
"functorch/csrc/dim/*.h",
|
||||
]),
|
||||
srcs = glob([
|
||||
"functorch/csrc/dim/*.cpp",
|
||||
]),
|
||||
deps = [
|
||||
":aten_nvrtc",
|
||||
":torch_python",
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
pybind_extension(
|
||||
name = "functorch/_C",
|
||||
copts=[
|
||||
"-DTORCH_EXTENSION_NAME=_C"
|
||||
],
|
||||
srcs = [
|
||||
"functorch/csrc/init_dim_only.cpp",
|
||||
],
|
||||
deps = [
|
||||
":functorch",
|
||||
":torch_python",
|
||||
":aten_nvrtc",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "torch/bin/torch_shm_manager",
|
||||
srcs = [
|
||||
@ -873,6 +903,7 @@ py_library(
|
||||
],
|
||||
data = [
|
||||
":torch/_C.so",
|
||||
":functorch/_C.so",
|
||||
":torch/bin/torch_shm_manager",
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user