mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Move at::{Refcounted,}MapAllocator to c10 (#109881)
`libshm.so` depends on the torch library exclusively for `at::RefcountedMapAllocator`, so it makes sense to move it to c10 along with the other memory allocators. This means `libshm.so` only depends on `c10` and we don't need to relink `libshm.so` for every ATen change. Pull Request resolved: https://github.com/pytorch/pytorch/pull/109881 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
42b89aea4b
commit
68a1219f74
@ -14,6 +14,7 @@ cxx_library(
|
||||
"//third_party:cpuinfo",
|
||||
"//third_party:fmt",
|
||||
"//third_party:glog",
|
||||
"//third_party:rt",
|
||||
],
|
||||
exported_deps = [],
|
||||
compiler_flags = [
|
||||
@ -44,7 +45,12 @@ cxx_library(
|
||||
header_namespace = "c10",
|
||||
link_whole = True,
|
||||
platform_preprocessor_flags = [['windows', ['-D_WINDOWS', '-D_WIN32', '-DWIN32', '-DNOMINMAX', '-D_CRT_SECURE_NO_WARNINGS', '-D_USE_MATH_DEFINES']], ['windows.*64$', ['-D_WIN64']]],
|
||||
preprocessor_flags = ['-DC10_BUILD_MAIN_LIB'],
|
||||
preprocessor_flags = [
|
||||
'-DC10_BUILD_MAIN_LIB',
|
||||
'-DHAVE_MMAP=1',
|
||||
'-DHAVE_SHM_OPEN=1',
|
||||
'-DHAVE_SHM_UNLINK=1',
|
||||
],
|
||||
reexport_all_header_dependencies = True,
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
Reference in New Issue
Block a user