Skip to content

Commit 80fbede

Browse files
pytorchbotlucylq
andauthored
Deprecate debug buffer in Module (#14199)
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #14161 by @lucylq ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/lucylq/112/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/112/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/112/orig @diff-train-skip-merge Co-authored-by: lucylq <[email protected]>
1 parent b2ae2b4 commit 80fbede

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

extension/module/module.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,9 @@ class Module {
598598
return event_tracer_.get();
599599
}
600600

601-
ET_NODISCARD
602-
runtime::Span<uint8_t> debug_buffer() {
601+
// Note: this debug_buffer will always be empty. The one being used is in
602+
// the event_tracer attached to module. Please use that one.
603+
ET_DEPRECATED ET_NODISCARD runtime::Span<uint8_t> debug_buffer() {
603604
return runtime::Span<uint8_t>(debug_buffer_.data(), debug_buffer_.size());
604605
}
605606

@@ -622,7 +623,7 @@ class Module {
622623
std::unique_ptr<runtime::EventTracer> event_tracer_;
623624
std::unique_ptr<runtime::DataLoader> data_map_loader_;
624625
std::unique_ptr<NamedDataMap> data_map_;
625-
std::vector<uint8_t> debug_buffer_;
626+
ET_DEPRECATED std::vector<uint8_t> debug_buffer_;
626627

627628
protected:
628629
std::unordered_map<std::string, MethodHolder> methods_;

0 commit comments

Comments
 (0)