STT-tensorflow/tensorflow/core/platform
Peter Hawkins 051542c14d Switch tensorflow::Subprocess to use posix_spawnp() instead of fork()/execvp() on non-Android POSIX platforms.
The goal of this change is to avoid calling pthread_atfork() handlers. Some libraries, in particular the version of OpenBLAS included in NumPy, have buggy pthread_atfork() handlers. See https://github.com/xianyi/OpenBLAS/pull/3111 and https://github.com/google/jax/issues/5713 for details.

Now, while we can and have fixed the buggy atfork handlers, it will take some time for the fix to be deployed in a NumPy release and for users to update to a new NumPy release. So we also take an additional step: avoid running atfork handlers in Subprocess.

My copy of the glibc documentation says:
"
According  to  POSIX, it unspecified whether fork handlers established with pthread_atfork(3)
are called when posix_spawn() is invoked.  On glibc, fork handlers are  called  only  if  the
child is created using fork(2).
"
It appears glibc 2.24 and newer do not call pthread_atfork() handlers from posix_spawn().

Using posix_spawn() should be at least no worse than an explicit fork()/execvp() pair, and on glibc it should do the right thing.

PiperOrigin-RevId: 358317859
Change-Id: Ic1d95446706efa7c0db4e79bf8281f14b2bd99df
2021-02-18 19:36:11 -08:00
..
cloud Optimize calls to std::string::find() and friends for a single char. 2020-12-17 18:11:13 -08:00
default Switch tensorflow::Subprocess to use posix_spawnp() instead of fork()/execvp() on non-Android POSIX platforms. 2021-02-18 19:36:11 -08:00
hadoop Deprecate legacy hdfs file system 2021-02-05 03:00:37 +00:00
profile_utils find bogomips on aarch64 2021-01-24 10:14:55 -06:00
s3 Deprecate s3 file system 2021-02-09 00:42:16 +00:00
testdata Make subprocess_test platform independent. 2020-01-29 11:52:10 -08:00
windows Split the memory bandwidth reporting into its own function so that users trying to get memory usage information won't incur additional calls 2021-02-11 21:46:03 -08:00
abi_test.cc Move uses of tensorflow::MakeTypeIndex() to tensorflow::TypeIndex::Make. 2020-06-23 12:50:42 -07:00
abi.cc
abi.h Qualify uses of std::string 2020-07-31 11:28:50 -07:00
base64.cc Removed USE_TSTRING usage. 2020-01-28 22:26:26 -08:00
base64.h Removed USE_TSTRING usage. 2020-01-28 22:26:26 -08:00
bfloat16.h Move bfloat16 header to tensorflow/core/platform. 2020-08-14 13:44:57 -07:00
blocking_counter.h Move blocking counter library from core/lib/core to core/platform 2019-12-01 16:01:09 -08:00
BUILD Propagate the frame where the resource var was created to resource var handles 2021-01-25 14:25:35 -08:00
build_config_root.bzl remove no_op register_extension_info calls. 2020-10-12 15:40:32 -07:00
build_config.bzl Add support for copybara inline directives in BUILD and .bzl files. 2021-01-14 11:46:25 -08:00
build_test.cc Move ScopedAnnotation out of core/platform/. 2019-11-13 14:24:33 -08:00
byte_order.h
casts.h Move down_cast to platform/casts.h 2020-01-14 15:01:48 -08:00
coding.cc Removed USE_TSTRING usage. 2020-01-28 22:26:26 -08:00
coding.h Add remaining needed tstring overloads. 2019-12-17 09:28:43 -08:00
context.h
cord.h
cpu_feature_guard.cc Fix typo in log 2020-07-09 13:59:47 -07:00
cpu_feature_guard.h
cpu_info.cc Change std::call_once to absl::call_once 2020-01-29 08:40:19 -08:00
cpu_info.h fix typos in core directory 2020-10-29 02:52:55 +03:00
ctstring_internal.h Fully init TF_TString in order to mitigate potential msan false positives. 2020-07-07 23:38:56 -07:00
ctstring_test.cc ABI stable tensorflow::tstring. 2020-01-22 15:58:40 -08:00
ctstring.h ABI stable tensorflow::tstring. 2020-01-22 15:58:40 -08:00
cuda_libdevice_path.h
cuda.h
demangle.h
denormal.cc minor spelling tweaks 2020-02-27 15:42:16 +09:00
denormal.h
dynamic_annotations.h
enable_tf2_utils_test.cc fixed the breakage. Re-submit plumbing of the enable_v2_behavior() call to C++ 2021-01-06 20:35:51 -08:00
enable_tf2_utils.cc fixed the breakage. Re-submit plumbing of the enable_v2_behavior() call to C++ 2021-01-06 20:35:51 -08:00
enable_tf2_utils.h fixed the breakage. Re-submit plumbing of the enable_v2_behavior() call to C++ 2021-01-06 20:35:51 -08:00
env_test.cc Add TF_USE_FILESYSTEM_METHODS_WITH_NO_TRANSACTION_SUPPORT macro to modified classes 2020-08-04 23:20:15 -07:00
env_time.h Add an XSpace to TraceEvents converter and unittest 2020-01-16 13:06:51 -08:00
env.cc Remove read limit of ReadBinaryProto. 2020-07-28 12:10:32 -07:00
env.h Merge pull request from yongtang:deprecate-hdfs 2021-02-08 16:27:59 -08:00
error.cc Isolate the include of Windows.h to the windows internals rather than bleeding out through error.h 2020-02-04 17:22:57 -08:00
error.h Isolate the include of Windows.h to the windows internals rather than bleeding out through error.h 2020-02-04 17:22:57 -08:00
errors.h Fix PrepareForStrCat() for types that are AlphaNum constructible but not implicitly convertible. 2020-11-19 13:36:33 -08:00
fake_python_env_test.cc
file_statistics.h
file_system_helper.cc Completely rewrite GetMatchingPaths. 2020-12-07 12:04:28 -08:00
file_system_helper.h Remove dependency on lib/core:status within tensorflow/core/platform 2019-11-27 11:04:20 -08:00
file_system_test.cc Merge pull request from samikama:Transactions_part11 2020-08-06 10:57:03 -07:00
file_system.cc Merge pull request from samikama:Transactions_part10 2020-07-31 06:39:45 -07:00
file_system.h Enable Cord reading and writing for InputStream and OutputStreams 2020-11-17 22:25:23 -08:00
fingerprint_test.cc
fingerprint.h [XLA:PJRT] Add optional platform-specific fingerprint to PjRtExecutable. 2020-07-31 12:27:28 -07:00
gif.h Change comment of the external repo #include file origin. 2020-03-23 10:42:53 -07:00
hash.cc Move core/lib/hash/hash library into core/platform 2019-11-30 13:58:03 -08:00
hash.h Qualify uses of std::string 2020-07-31 11:28:50 -07:00
host_info.h Internal change 2020-07-27 22:35:48 -07:00
human_readable_json.h Remove all uses of TENSORFLOW_LITE_PROTOS. 2020-05-06 02:43:41 -07:00
init_main.h
integral_types_test.cc
jpeg.h Change comment of the external repo #include file origin. 2020-03-23 10:42:53 -07:00
load_library.h Rename LoadLibrary to avoid conflict with Windows macros 2020-08-04 19:24:11 -07:00
logger.cc Do not log in DefaultLogger. 2020-06-30 11:30:29 -07:00
logger.h minor spelling tweaks 2020-02-27 15:42:16 +09:00
logging_test.cc Merge pull request from avitebskiy:feature/log-sinks 2020-11-19 12:47:15 -08:00
logging.h Fix minimal logging build for macos 2020-04-24 20:55:23 -07:00
macros.h Add TF_CONST_INIT macro 2020-10-07 08:58:36 -07:00
mem.h Split the memory bandwidth reporting into its own function so that users trying to get memory usage information won't incur additional calls 2021-02-11 21:46:03 -08:00
mutex_test.cc
mutex.h Prefixing TensorFlow thread annotation macros with TF_. 2020-03-05 08:42:01 -08:00
net_test.cc
net.h
notification.h
null_file_system.h Add TF_USE_FILESYSTEM_METHODS_WITH_NO_TRANSACTION_SUPPORT macro to modified classes 2020-08-04 23:20:15 -07:00
numa_test.cc
numa.h
numbers_test.cc
numbers.cc Make {Float,Double}ToBuffer uniform across platforms for NaNs 2020-10-05 23:05:00 -07:00
numbers.h Qualify uses of std::string 2020-03-20 13:19:21 -07:00
path.cc CommonPathPrefix utility: return the largest common subpath 2020-11-24 23:00:59 -08:00
path.h Qualifying "string" as std::string 2021-02-05 16:16:25 -08:00
platform_strings_computed.h
platform_strings_test.cc fix typos in core directory 2020-10-29 02:52:55 +03:00
platform_strings.cc Add error checks 2020-03-20 11:50:29 +00:00
platform_strings.h
platform.h remove the elif branch which already covered by else 2020-08-29 09:30:18 +08:00
png.h Change comment of the external repo #include file origin. 2020-03-23 10:42:53 -07:00
port_test.cc Remove dependence on core/lib/core/threadpool under tf/core/platform. 2019-11-30 13:53:30 -08:00
prefetch.h
protobuf_compiler.h
protobuf_internal.h Remove all uses of TENSORFLOW_LITE_PROTOS. 2020-05-06 02:43:41 -07:00
protobuf_util.cc
protobuf.cc Merge pull request from tg-at-google:patch-1 2020-05-27 22:39:36 -07:00
protobuf.h Adds proto comparators and options for nan-equivalence to graph util. 2021-01-26 09:35:06 -08:00
ram_file_system_test.py Fixed a bug in RamFileSystem::FileExists 2020-08-28 15:50:06 -07:00
ram_file_system.h Fixed a bug in RamFileSystem::FileExists 2020-08-28 15:50:06 -07:00
random.cc Move core/lib/random/random to core/platform 2019-11-29 21:20:47 -08:00
random.h Move core/lib/random/random to core/platform 2019-11-29 21:20:47 -08:00
raw_coding.h Move raw_coding.h to core/platform 2019-11-25 15:05:48 -08:00
README.md Create a readme file describing what should be in core/platform. 2019-11-04 09:59:40 -08:00
refcount.h Move refcount to core/platform 2019-11-25 15:36:37 -08:00
regexp.h To handle cloud filesystem paths on windows correctly, provide a way to run 2020-02-10 18:16:01 -08:00
resource_loader_test.cc Use JoinPath over a fixed string for building paths. 2020-02-19 17:48:45 -08:00
resource_loader.h Add a resoure loader library to load bazel data dependencies 2020-01-30 22:55:55 -08:00
resource.h Update ResourceTagger implementation. 2020-02-28 15:53:18 -08:00
retrying_file_system_test.cc Add TF_USE_FILESYSTEM_METHODS_WITH_NO_TRANSACTION_SUPPORT macro to modified classes 2020-08-04 23:20:15 -07:00
retrying_file_system.h Add TF_USE_FILESYSTEM_METHODS_WITH_NO_TRANSACTION_SUPPORT macro to modified classes 2020-08-04 23:20:15 -07:00
retrying_utils_test.cc Added relevant changes for retrying operations in the s3 file system 2020-02-01 02:57:21 +00:00
retrying_utils.cc Added relevant changes for retrying operations in the s3 file system 2020-02-01 02:57:21 +00:00
retrying_utils.h Added relevant changes for retrying operations in the s3 file system 2020-02-01 02:57:21 +00:00
rocm_rocdl_path_test.cc PR : [ROCm] Update to use ROCm 3.9 (when building TF with --config=rocm) 2020-11-10 00:57:26 -08:00
rocm_rocdl_path.h
rocm.h
rules_cc.bzl Adding tensorflow/core/platform/default/BUILD and tensorflow/core/platform/windows/BUILD. 2019-12-10 00:08:58 -08:00
scanner_test.cc
scanner.cc
scanner.h
setround_test.cc
setround.cc
setround.h
snappy.h Improving snapshot read performance (under snappy compression) by reducing the 2020-02-25 10:42:43 -08:00
stack_frame.h Propagate the frame where the resource var was created to resource var handles 2021-01-25 14:25:35 -08:00
stacktrace_handler_test.cc
stacktrace_handler.h
stacktrace_test.cc
stacktrace.h
status.cc Add Status payload API 2020-11-25 10:51:41 -08:00
status.h Propagate the frame where the resource var was created to resource var handles 2021-01-25 14:25:35 -08:00
str_util_test.cc Add StripPrefix and StripSuffix to TF. 2019-11-04 16:54:44 -08:00
str_util.cc Add StripPrefix and StripSuffix to TF. 2019-11-04 16:54:44 -08:00
str_util.h Qualify uses of std::string 2020-03-20 13:19:21 -07:00
strcat_test.cc Add explicit support for bfloat16 in tensorflow/core/platform/strcat.h 2020-08-14 14:42:24 -07:00
strcat.cc
strcat.h Add explicit support for bfloat16 in tensorflow/core/platform/strcat.h 2020-08-14 14:42:24 -07:00
stream_executor_no_cuda.h
stream_executor.h
stringpiece_test.cc
stringpiece.h Add IWYU tags to headers TF is re-exporting. 2020-01-25 16:05:32 -08:00
stringprintf_test.cc
stringprintf.cc
stringprintf.h Qualify uses of std::string 2020-07-31 11:28:50 -07:00
strong_hash.h Remove a layer of indirection in strong_hash. 2020-11-10 18:10:26 -08:00
subprocess_test.cc Make use of JoinPath to build paths to path references can work correctly across operating systems. 2020-02-20 11:20:17 -08:00
subprocess.h
tensor_coding.cc Internal change 2020-05-13 22:56:10 -07:00
tensor_coding.h Replacing ::Cord with absl::Cord. 2020-05-05 09:19:29 -07:00
tensor_float_32_utils.cc Use TensorFloat-32 instead of TF32 in comments and symbols. 2020-09-08 17:38:28 -07:00
tensor_float_32_utils.h Use TensorFloat-32 instead of TF32 in comments and symbols. 2020-09-08 17:38:28 -07:00
test_benchmark.h Add IWYU tags to headers TF is re-exporting. 2020-01-25 16:10:51 -08:00
test_main.cc
test.h Support of shadow runs for MLIR TF bridge. 2020-11-10 19:24:47 -08:00
thread_annotations.h Prefixing TensorFlow thread annotation macros with TF_. 2020-03-05 08:42:01 -08:00
threadpool_interface.h
threadpool_options.h Initialize the inter and intra-op thread pool pointers in ThreadPoolOptions to nullptr. Otherwise, they may have arbitrary values. 2020-02-12 21:59:40 -08:00
threadpool.cc Remove dependence on core/lib/core/blocking_counter. 2019-12-02 17:43:00 -08:00
threadpool.h Qualify uses of std::string 2020-07-31 11:28:50 -07:00
tracing.cc Remove dependencies on core/lib/hash under tensorflow/core/platform. 2019-11-30 15:53:35 -08:00
tracing.h minor spelling tweaks 2020-02-27 15:42:16 +09:00
tstring_test.cc ABI stable tensorflow::tstring. 2020-01-22 15:58:40 -08:00
tstring.h Removed USE_TSTRING usage. 2020-01-28 22:26:26 -08:00
types.h Move bfloat16 header to tensorflow/core/platform. 2020-08-14 13:44:57 -07:00
unbounded_work_queue_test.cc Prefixing TensorFlow thread annotation macros with TF_. 2020-03-05 08:42:01 -08:00
unbounded_work_queue.h
vmodule_benchmark_test.cc internal tests cleanup 2020-11-03 19:22:55 -08:00
vmodule_test.cc Fix environment variable set on windows in vmodule_test 2020-02-01 02:38:16 -08:00

TensorFlow Base libraries.

This package contains the following libraries: - Platform dependent libraries that require different implementations across different OSs or environments. - STL replacement libraries rest of TensorFlow should depend on.

The libraries in this package are not allowed to have ANY dependencies to any TensorFlow code outside this package.