File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -114,10 +114,6 @@ class Module final {
114
114
return run_method (" forward" , std::forward<Types>(args)...);
115
115
}
116
116
117
- void set_delete_memory (std::shared_ptr<char > mem_to_delete) {
118
- mem_to_delete_ = mem_to_delete;
119
- }
120
-
121
117
private:
122
118
run_method_return_type run_method_internal (
123
119
const std::string& method_name,
@@ -164,23 +160,11 @@ class Module final {
164
160
return result;
165
161
}
166
162
167
- std::shared_ptr<char > mem_to_delete_; // loader_ may point to this.
168
163
std::unique_ptr<DataLoader> loader_; // program_ points to this.
169
164
std::unique_ptr<const Program> program_; // methods_ entries points to this.
170
165
std::unordered_map<std::string, std::unique_ptr<Method>> methods_;
171
166
};
172
167
173
- inline std::unique_ptr<Module> load_from_buffer (
174
- std::shared_ptr<char > ptr,
175
- size_t ptr_len,
176
- MemoryManager* memory_manager) {
177
- EXECUTORCH_SCOPE_PROF (" load_from_buffer" );
178
- auto loader = std::make_unique<BufferDataLoader>(ptr.get (), ptr_len);
179
- auto m = std::make_unique<Module>(std::move (loader), memory_manager);
180
- m->set_delete_memory (std::move (ptr));
181
- return m;
182
- }
183
-
184
168
inline std::unique_ptr<Module> load_from_buffer (
185
169
const void * ptr,
186
170
size_t ptr_len,
You can’t perform that action at this time.
0 commit comments