Skip to content

Commit 2487639

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

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
@@ -2,6 +2,7 @@
22
# Placeholder: load py_proto_library
33
load("@xla//xla/tsl:tsl.bzl", "internal_visibility")
44
load("@xla//xla/tsl/platform:build_config.bzl", "tf_proto_library")
5+
load("//tools/build_defs/js/jspb_proto_library:rules.bzl", "jspb_proto_library")
56

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

@@ -26,6 +27,12 @@ tf_proto_library(
2627
visibility = ["//visibility:public"],
2728
)
2829

30+
jspb_proto_library(
31+
name = "profiler_options_jspb_proto",
32+
visibility = ["//visibility:public"],
33+
deps = [":profiler_options_proto"],
34+
)
35+
2936
tf_proto_library(
3037
name = "profiler_service_monitor_result_proto",
3138
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)