diff --git a/tsl/platform/BUILD b/tsl/platform/BUILD index 8d556d832..5edeccb3a 100644 --- a/tsl/platform/BUILD +++ b/tsl/platform/BUILD @@ -15,6 +15,7 @@ load( "tf_cuda_root_path_deps", "tf_error_logging_deps", "tf_fingerprint_deps", + "tf_google_mobile_hdrs_no_runtime", "tf_google_mobile_srcs_no_runtime", "tf_platform_deps", "tf_stream_executor_deps", @@ -357,6 +358,7 @@ filegroup( "random.h", "stacktrace.h", "stacktrace_handler.h", + "status.h", "statusor.h", "str_util.h", "stringpiece.h", @@ -404,19 +406,41 @@ filegroup( name = "mobile_srcs_no_runtime", srcs = [ "abi.cc", - "abi.h", "base64.cc", + "coding.cc", + "cpu_info.cc", + "denormal.cc", + "hash.cc", + "numbers.cc", + "path.cc", + "protobuf.cc", + "protobuf_util.cc", + "scanner.cc", + "setround.cc", + "str_util.cc", + "@xla//xla/tsl/platform:mobile_srcs_no_runtime", + ] + select({ + "@xla//xla/tsl:fuchsia": tf_google_mobile_srcs_no_runtime(), + "//conditions:default": [ + "tracing.cc", + "@xla//xla/tsl/platform/default:mobile_srcs_no_runtime", + ], + }), + compatible_with = get_compatible_with_portable(), +) + +filegroup( + name = "mobile_hdrs_no_runtime", + srcs = [ + "abi.h", "base64.h", "bfloat16.h", "blocking_counter.h", "casts.h", - "coding.cc", "coding.h", "context.h", - "cpu_info.cc", "cpu_info.h", "demangle.h", - "denormal.cc", "denormal.h", "env.h", "env_time.h", @@ -424,7 +448,6 @@ filegroup( "file_statistics.h", "file_system.h", "file_system_helper.h", - "hash.cc", "hash.h", "host_info.h", "init_main.h", @@ -432,27 +455,20 @@ filegroup( "macros.h", "mem.h", "numa.h", - "numbers.cc", "numbers.h", - "path.cc", "path.h", "platform.h", "platform_strings_computed.h", - "protobuf.cc", "protobuf.h", - "protobuf_util.cc", "raw_coding.h", "refcount.h", "regexp.h", - "scanner.cc", "scanner.h", - "setround.cc", "setround.h", "snappy.h", "stacktrace.h", "status.h", "statusor.h", - "str_util.cc", "str_util.h", "strcat.h", "stringpiece.h", @@ -461,12 +477,11 @@ filegroup( "threadpool.h", "threadpool_interface.h", "tracing.h", - "@xla//xla/tsl/platform:mobile_srcs_no_runtime", + "@xla//xla/tsl/platform:mobile_hdrs_no_runtime", ] + select({ - "@xla//xla/tsl:fuchsia": tf_google_mobile_srcs_no_runtime(), + "@xla//xla/tsl:fuchsia": tf_google_mobile_hdrs_no_runtime(), "//conditions:default": [ - "tracing.cc", - "@xla//xla/tsl/platform/default:mobile_srcs_no_runtime", + "@xla//xla/tsl/platform/default:mobile_hdrs_no_runtime", ], }), compatible_with = get_compatible_with_portable(), @@ -474,19 +489,30 @@ filegroup( filegroup( name = "mobile_srcs_only_runtime", + srcs = [ + "random.cc", + "@xla//xla/tsl/platform/profile_utils:android_armv7a_cpu_utils_helper.cc", + "@xla//xla/tsl/platform/profile_utils:cpu_utils.cc", + ], + compatible_with = get_compatible_with_portable(), + visibility = internal_visibility([ + "//tensorflow/core:__pkg__", + "//tensorflow/core/platform:__pkg__", + ]), +) + +filegroup( + name = "mobile_hdrs_only_runtime", srcs = [ "error_logging.h", "fingerprint.h", "notification.h", - "random.cc", "random.h", "test_benchmark.h", "threadpool_options.h", "unbounded_work_queue.h", - "@xla//xla/tsl/platform:mobile_srcs_only_runtime", - "@xla//xla/tsl/platform/profile_utils:android_armv7a_cpu_utils_helper.cc", + "@xla//xla/tsl/platform:mobile_hdrs_only_runtime", "@xla//xla/tsl/platform/profile_utils:android_armv7a_cpu_utils_helper.h", - "@xla//xla/tsl/platform/profile_utils:cpu_utils.cc", "@xla//xla/tsl/platform/profile_utils:cpu_utils.h", "@xla//xla/tsl/platform/profile_utils:i_cpu_utils_helper.h", ], diff --git a/tsl/profiler/lib/BUILD b/tsl/profiler/lib/BUILD index 752c17bfc..9293a2988 100644 --- a/tsl/profiler/lib/BUILD +++ b/tsl/profiler/lib/BUILD @@ -31,21 +31,29 @@ cc_library( filegroup( name = "mobile_srcs_no_runtime", srcs = [ - "nvtx_utils.h", "nvtx_utils_stub.cc", #Include the stub implementation here since CUDA isn't relevant to Android. - "scoped_annotation.h", "scoped_memory_debug_annotation.cc", + ], + compatible_with = get_compatible_with_portable(), + visibility = ["//visibility:public"], +) + +filegroup( + name = "mobile_hdrs_no_runtime", + srcs = [ + "nvtx_utils.h", + "scoped_annotation.h", "scoped_memory_debug_annotation.h", "traceme.h", "traceme_encode.h", - "@xla//xla/tsl/profiler/utils:mobile_srcs_no_runtime", + "@xla//xla/tsl/profiler/utils:mobile_hdrs_no_runtime", ], compatible_with = get_compatible_with_portable(), visibility = ["//visibility:public"], ) filegroup( - name = "mobile_srcs_only_runtime", + name = "mobile_hdrs_only_runtime", srcs = [ "connected_traceme.h", "context_types.h",