New model: minor fixes (#25368)

* 1456d261-d232-4654-8885-4d9fde883894/440 ac1a6744-85b0-4ec6-8ba7-608d0717b8f1/750

* some copies are useful

* update model replay ref

* less frames in model replay onnx cpu

Co-authored-by: Bruce Wayne <yassine@comma.ai>
Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
pull/25377/head
HaraldSchafer 3 years ago committed by GitHub
parent e05cfd2100
commit 55bf938504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      selfdrive/modeld/models/supercombo.dlc
  2. 4
      selfdrive/modeld/models/supercombo.onnx
  3. 8
      selfdrive/modeld/thneed/optimizer.cc
  4. 2
      selfdrive/test/process_replay/model_replay.py
  5. 2
      selfdrive/test/process_replay/model_replay_ref_commit

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:027cbb1fabae369878271cb0e3505071a8bdaa07473fad9a0b2e8d695c5dc1ff oid sha256:a9bf6166c9473b7c28935f8e5746f5c398dfa16b179c73d76d5d35f50cab981e
size 76725611 size 127889531

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:484976ea5bd4ddcabc82e95faf30d7311a27802c1e337472558699fa2395a499 oid sha256:cb0aef7f5fc3125b44bbd1cab6cde3b8f742ca2e06646477867d3040b62a3087
size 77472267 size 128751773

@ -9,7 +9,7 @@
extern map<cl_program, string> g_program_source; extern map<cl_program, string> g_program_source;
static int is_same_size_image(cl_mem a, cl_mem b) { /*static int is_same_size_image(cl_mem a, cl_mem b) {
size_t a_width, a_height, a_depth, a_array_size, a_row_pitch, a_slice_pitch; size_t a_width, a_height, a_depth, a_array_size, a_row_pitch, a_slice_pitch;
clGetImageInfo(a, CL_IMAGE_WIDTH, sizeof(a_width), &a_width, NULL); clGetImageInfo(a, CL_IMAGE_WIDTH, sizeof(a_width), &a_width, NULL);
clGetImageInfo(a, CL_IMAGE_HEIGHT, sizeof(a_height), &a_height, NULL); clGetImageInfo(a, CL_IMAGE_HEIGHT, sizeof(a_height), &a_height, NULL);
@ -29,7 +29,7 @@ static int is_same_size_image(cl_mem a, cl_mem b) {
return (a_width == b_width) && (a_height == b_height) && return (a_width == b_width) && (a_height == b_height) &&
(a_depth == b_depth) && (a_array_size == b_array_size) && (a_depth == b_depth) && (a_array_size == b_array_size) &&
(a_row_pitch == b_row_pitch) && (a_slice_pitch == b_slice_pitch); (a_row_pitch == b_row_pitch) && (a_slice_pitch == b_slice_pitch);
} }*/
static cl_mem make_image_like(cl_context context, cl_mem val) { static cl_mem make_image_like(cl_context context, cl_mem val) {
cl_image_format format; cl_image_format format;
@ -138,7 +138,7 @@ int Thneed::optimize() {
// delete useless copy layers // delete useless copy layers
// saves ~0.7 ms // saves ~0.7 ms
if (kq[i]->name == "concatenation" || kq[i]->name == "flatten") { /*if (kq[i]->name == "concatenation" || kq[i]->name == "flatten") {
string in = kq[i]->args[kq[i]->get_arg_num("input")]; string in = kq[i]->args[kq[i]->get_arg_num("input")];
string out = kq[i]->args[kq[i]->get_arg_num("output")]; string out = kq[i]->args[kq[i]->get_arg_num("output")];
if (is_same_size_image(*(cl_mem*)in.data(), *(cl_mem*)out.data())) { if (is_same_size_image(*(cl_mem*)in.data(), *(cl_mem*)out.data())) {
@ -148,7 +148,7 @@ int Thneed::optimize() {
kq.erase(kq.begin()+i); --i; kq.erase(kq.begin()+i); --i;
} }
} }*/
// NOTE: if activations/accumulation are done in the wrong order, this will be wrong // NOTE: if activations/accumulation are done in the wrong order, this will be wrong

@ -22,7 +22,7 @@ from tools.lib.logreader import LogReader
TEST_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36" TEST_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36"
SEGMENT = 0 SEGMENT = 0
MAX_FRAMES = 20 if PC else 1300 MAX_FRAMES = 10 if PC else 1300
SEND_EXTRA_INPUTS = bool(os.getenv("SEND_EXTRA_INPUTS", "0")) SEND_EXTRA_INPUTS = bool(os.getenv("SEND_EXTRA_INPUTS", "0"))

@ -1 +1 @@
5c2cb8fb9787584a1eb553968cb87e7e6782dac5 4d4276525c18c8955011eb10ace9ceb3d9d73307

Loading…
Cancel
Save