Skip to content

Commit 5bc4a17

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 30582ab commit 5bc4a17

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

extension/module/module.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,12 @@ 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+
486+
481487
private:
482488
struct MethodHolder {
483489
std::vector<std::vector<uint8_t>> planned_buffers;
@@ -498,6 +504,7 @@ class Module {
498504
std::unique_ptr<runtime::EventTracer> event_tracer_;
499505
std::unique_ptr<runtime::DataLoader> data_map_loader_;
500506
std::unique_ptr<NamedDataMap> data_map_;
507+
std::vector<uint8_t> debug_buffer_;
501508

502509
protected:
503510
std::unordered_map<std::string, MethodHolder> methods_;

0 commit comments

Comments
 (0)