Skip to content

Commit

Permalink
modeld: delete wide_frame in model_free (commaai#25562)
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee authored and rjsmith1999 committed Oct 8, 2022
1 parent 3aa7a82 commit d9c0576
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions selfdrive/modeld/models/driving.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ ModelOutput* model_eval_frame(ModelState* s, VisionBuf* buf, VisionBuf* wbuf,

void model_free(ModelState* s) {
delete s->frame;
delete s->wide_frame;
}

void fill_lead(cereal::ModelDataV2::LeadDataV3::Builder lead, const ModelOutputLeads &leads, int t_idx, float prob_t) {
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/modeld/models/driving.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ constexpr int NET_OUTPUT_SIZE = OUTPUT_SIZE + TEMPORAL_SIZE;

// TODO: convert remaining arrays to std::array and update model runners
struct ModelState {
ModelFrame *frame;
ModelFrame *wide_frame;
ModelFrame *frame = nullptr;
ModelFrame *wide_frame = nullptr;
std::array<float, NET_OUTPUT_SIZE> output = {};
std::unique_ptr<RunModel> m;
#ifdef DESIRE
Expand Down

0 comments on commit d9c0576

Please sign in to comment.