Skip to content

Commit b7d698f

Browse files
Creating UI options for trace mode when capturing profiles using sampling mode
PiperOrigin-RevId: 812867750
1 parent d70fa0d commit b7d698f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tsl/profiler/protobuf/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Placeholder: load py_proto_library
44
load("@xla//xla/tsl:tsl.bzl", "internal_visibility")
55
load("@xla//xla/tsl/platform:build_config.bzl", "tf_proto_library")
6+
load("//tools/build_defs/js/jspb_proto_library:rules.bzl", "jspb_proto_library")
67

78
# copybara:uncomment package(default_applicable_licenses = ["//tensorflow:license"])
89

@@ -37,6 +38,12 @@ tf_proto_library(
3738
visibility = ["//visibility:public"],
3839
)
3940

41+
jspb_proto_library(
42+
name = "profiler_options_jspb_proto",
43+
visibility = ["//visibility:public"],
44+
deps = [":profiler_options_proto"],
45+
)
46+
4047
tf_proto_library(
4148
name = "profiler_service_monitor_result_proto",
4249
srcs = ["profiler_service_monitor_result.proto"],

tsl/profiler/protobuf/profiler_options.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ message ProfileOptions {
8484
}
8585
}
8686

87+
enum TraceMode {
88+
TRACE_ONLY_HOST = 0;
89+
TRACE_ONLY_XLA = 1;
90+
TRACE_COMPUTE = 2;
91+
TRACE_COMPUTE_AND_SYNC = 3;
92+
}
93+
8794
// Advanced configuration for the profiler contains a map of config name to
8895
// config value. It gives the flexibility to pass any configuration to the
8996
// profiler. eg:

0 commit comments

Comments
 (0)