File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
third_party/xla/third_party/tsl/tsl/profiler/lib Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,13 @@ namespace tsl::profiler {
35
35
// TraceCollector until PopAnnotation() is called.
36
36
template <typename T>
37
37
void PushAnnotation (const T& generator) {
38
+ #if GOOGLE_CUDA
38
39
if (auto domain = DefaultProfilerDomain ();
39
40
TF_PREDICT_FALSE (domain != nullptr )) {
40
41
RangePush (domain, generator ());
41
42
return ;
42
43
}
44
+ #endif
43
45
44
46
#if !defined(IS_MOBILE_PLATFORM)
45
47
if (TF_PREDICT_FALSE (AnnotationStack::IsEnabled ())) {
@@ -60,11 +62,13 @@ inline void PopAnnotation() {
60
62
// fail probably due to compiler in that presubmit config.
61
63
std::atomic_thread_fence (std::memory_order_acquire);
62
64
65
+ #if GOOGLE_CUDA
63
66
if (auto domain = DefaultProfilerDomain ();
64
67
TF_PREDICT_FALSE (domain != nullptr )) {
65
68
RangePop (domain);
66
69
return ;
67
70
}
71
+ #endif
68
72
69
73
#if !defined(IS_MOBILE_PLATFORM)
70
74
if (TF_PREDICT_FALSE (AnnotationStack::IsEnabled ())) {
You can’t perform that action at this time.
0 commit comments