Skip to content

Commit 2b65260

Browse files
author
Comma Device
committed
thneed: a few asserts in the optimizer for cases it will fail
1 parent 724bab8 commit 2b65260

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

selfdrive/modeld/thneed/optimizer.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ int Thneed::optimize() {
173173

174174
if (lastout == in) {
175175
short neuron = *(int*)kq[i]->args[kq[i]->get_arg_num("neuron")].data();
176+
assert(neuron <= 5);
177+
178+
// ELU isn't supported in fc_Wtx
179+
assert(!(kq[i-1]->name == "fc_Wtx" && neuron == 5));
180+
176181
kq[i-1]->args[kq[i-1]->get_arg_num("neuron")] = string((char *)&neuron, sizeof(neuron));
177182

178183
cl_mem tmp = make_image_like(context, *(cl_mem *)lastout.data());

0 commit comments

Comments
 (0)