Skip to content

Commit bcc2355

Browse files
cccclaifacebook-github-bot
authored andcommitted
Add et_dump related API to module (#9284)
Summary: Pull Request resolved: #9284 It is for reusing the exention/module in the module definition in pybindings https://github.com/pytorch/executorch/blob/1a918c779e16c0ee903a08b30c1c666d1efb2c57/extension/pybindings/pybindings.cpp#L172 Reviewed By: shoumikhin Differential Revision: D71135352
1 parent 67b6009 commit bcc2355

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

extension/module/module.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,11 @@ class Module {
478478
return event_tracer_.get();
479479
}
480480

481+
ET_NODISCARD
482+
runtime::Span<uint8_t> debug_buffer() {
483+
return runtime::Span<uint8_t>(debug_buffer_.data(), debug_buffer_.size());
484+
}
485+
481486
private:
482487
struct MethodHolder {
483488
std::vector<std::vector<uint8_t>> planned_buffers;
@@ -498,6 +503,7 @@ class Module {
498503
std::unique_ptr<runtime::EventTracer> event_tracer_;
499504
std::unique_ptr<runtime::DataLoader> data_map_loader_;
500505
std::unique_ptr<NamedDataMap> data_map_;
506+
std::vector<uint8_t> debug_buffer_;
501507

502508
protected:
503509
std::unordered_map<std::string, MethodHolder> methods_;

0 commit comments

Comments
 (0)