In particular, I need this for supporting HLO profiling in the AOT backend.
PiperOrigin-RevId:
187081674
VersionedComputationHandle versioned_handle =
user_computation->GetVersionedHandle();
- // TODO(b/63773457): Track DebugOptions in AotCompilationOptions.
- DebugOptions debug_options = legacy_flags::GetDebugOptionsFromFlags();
+ const DebugOptions& debug_options = options.debug_options();
// Dump computation proto state if flag is set.
const string& directory_path = debug_options.xla_dump_computations_to();
return compilers->at(platform->id()).get();
}
+AotCompilationOptions::AotCompilationOptions()
+ : debug_options_(legacy_flags::GetDebugOptionsFromFlags()) {}
+
} // namespace xla
device_allocator_ = device_allocator;
}
+ const DebugOptions& debug_options() const { return debug_options_; }
+ DebugOptions* mutable_debug_options() { return &debug_options_; }
+
protected:
- AotCompilationOptions() = default;
+ AotCompilationOptions();
private:
DeviceMemoryAllocator* device_allocator_ = nullptr;
+ DebugOptions debug_options_;
};
// Abstract compiler interface that is subclassed for compilation on a