| 295 | } // namespace |
| 296 | |
| 297 | string TimestampFor(const HloModule& module) { |
| 298 | if (!module.config().debug_options().xla_dump_include_timestamp()) { |
| 299 | return ""; |
| 300 | } |
| 301 | tensorflow::mutex_lock lock(mu); |
| 302 | auto timestamp_emplace = module_id_to_timestamp.try_emplace( |
| 303 | module.unique_id(), tensorflow::Env::Default()->NowMicros()); |
| 304 | return std::to_string(timestamp_emplace.first->second); |
| 305 | } |
| 306 | |
| 307 | string FilenameFor(const HloModule& module, string_view prefix, |
| 308 | string_view suffix) { |
no test coverage detected