Skip to content

Commit

Permalink
[module] Change the deleter of Program in Module to make android happy
Browse files Browse the repository at this point in the history
Differential Revision: D61837043

Pull Request resolved: pytorch#4924
  • Loading branch information
larryliu0820 authored Aug 27, 2024
1 parent f65c28e commit f92139f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions extension/module/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ Error Module::load(const Program::Verification verification) {
auto program =
ET_UNWRAP_UNIQUE(Program::load(data_loader_.get(), verification));
program_ = std::shared_ptr<Program>(
program.release(),
[data_loader = std::move(data_loader_)](Program* pointer) {
delete pointer;
});
program.release(), [](Program* pointer) { delete pointer; });
}
return Error::Ok;
}
Expand Down

0 comments on commit f92139f

Please sign in to comment.