| 108 | }; |
| 109 | |
| 110 | bool DebugOptionsPassThroughEnabled() { |
| 111 | const char* env = getenv("TF_XLA_DEBUG_OPTIONS_PASSTHROUGH"); |
| 112 | bool enabled = |
| 113 | env != nullptr && (strcmp(env, "1") == 0 || strcmp(env, "true") == 0); |
| 114 | if (enabled) { |
| 115 | LOG(WARNING) << "Passing through XLA debug options!"; |
| 116 | } else { |
| 117 | LOG(WARNING) << "TF_XLA_DEBUG_OPTIONS_PASSTHROUGH not set, not all options " |
| 118 | "will be retained"; |
| 119 | } |
| 120 | return enabled; |
| 121 | } |
| 122 | |
| 123 | string SafeDebugPath(const string& path) { |
| 124 | if (path.empty() || path.compare(0, 5, "gs://") == 0 || |
no outgoing calls
no test coverage detected