Commit Graph

54 Commits

Author SHA1 Message Date
George Hotz
40d6f4b65c modeld: Move from SNPE to tinygrad (#25207)
* compiling, won't work yet

* running with inputs and outputs

* there's some magic chance this works

* no more dlc, include onnx

* yolo tests plz

* bump tinygrad

* files_common + delete dlc

* tinygrad_repo -> tinygrad

* pre commit config

* llops needed

* extra in files_common

* bump tinygrad

* fix indent

* tinygrad/nn/__init__

* tinygrad_repo

* bump tinygrad repo

* bump tinygrad

* bump with native_exp, match maybe

* native_explog is argument

* pyopencl no cache

* 5% chance this matches

* work in float32?

* bump tinygrad

* fix build

* no __init__

* fix recip

* dumb hack

* adding thneed PC support

* fix pc segfault

* pc thneed is working

* to_image

* prints stuff with debug=2

* it sort of works

* copy host ptr is simpler

* bug fix

* build on c3

* this correct?

* reenable float16

* fix private, fixup copy_inputs internal

* bump tinygrad and update ref commit

* fix OPTWG on PC

* maybe fix non determinism

* revert model replay ref commit

* comments, init zeroed out buffers

* upd ref commit

* bump tinygrad to fix initial image

* try this ref

Co-authored-by: Comma Device <device@comma.ai>
2022-09-01 10:31:14 -07:00
HaraldSchafer
2f46fe5d85 Nuclear Grade Model: less memory, more accuracy (#25524)
* c9d10c64-bea4-41ec-8ca3-d8c886fda172/440 6d1c8a6b-4070-4780-80f1-6f08f234275e/900

* update ref
2022-08-25 00:01:21 -07:00
HaraldSchafer
041458f632 Falcon Punch Model: turn cutting improvements (#25413)
* simplified change to mpc dynamics

* add jerk pts

* increase jerk cost

* increase jerk pts multipler to master value

* Add final commit

* 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

* 1456d261-d232-4654-8885-4d9fde883894/440 264b67f5-3f52-4b58-b11f-58dd8aaf08bf/950

* 1456d261-d232-4654-8885-4d9fde883894/440 236fc556-fba3-4255-8ccf-684b22637160/950

* c9d10c64-bea4-41ec-8ca3-d8c886fda172/440 26d73dd2-862a-44ae-bbdd-32cc4f397ad7/900

* Fix couple tests

* Update ref

* Unused for now

* Add lateral factor comment

* Unused variable

Co-authored-by: nuwandavek <vivekaithal44@gmail.com>
Co-authored-by: Bruce Wayne <yassine@comma.ai>
Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
Co-authored-by: Bruce Wayne <batman@gpu06.internal>
2022-08-12 00:47:59 -07:00
YassineYousfi
3afe7464df Model file too big: Revert "New model: minor fixes" (#25390)
Revert "New model: minor fixes (#25368)"

This reverts commit 55bf938504.
2022-08-08 12:42:46 -07:00
HaraldSchafer
55bf938504 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>
2022-08-05 17:28:15 -07:00
HaraldSchafer
9fbbefbc94 Update model replay commit for calib change (#25357)
* Update model replay commit for calib test

* more reliable baseline

* update docker login

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-08-03 22:35:03 -07:00
HaraldSchafer
0e0b5c4e24 Revert "Rocket league model (#24869)" (#24936)
* Revert rocket league

* revert ref commit

* New model ref commit
2022-06-21 12:07:00 -07:00
ZwX1616
1f2f9ea9c9 fullframe DM model (#24860)
* Revert "put cereal on master"

This reverts commit a8ccd8f838.

* Revert "Revert fullframe DM model (#24812)"

This reverts commit c646eeee0a.

* revert revert cereal

* clip6

* 0.8 is fair

* Fiction compensation should be based on error

* Update refs

* Add deadzone

* not that

* good mg

* ref

* ref

* ee8f

* minor tweak

* ref

* recompile

* ref

* cereal

* match driverstatus

* new ref

* new ref

* pass token through jenkins credentials

* quote

* fix snpe dead weights

* final ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-06-20 16:24:51 -07:00
HaraldSchafer
9283040d84 Rocket league model (#24869)
* dd9a502d-c8e2-4831-b365-804b0ae0739d/600 80041070-d276-4fed-bdb9-0075e5442908/420

* no elementwise op

* 9dabf0fe-2e60-44bf-8d3a-d20a74aca072/600 ae746590-0bb5-4a16-80db-15f02d314f03/300 c4663a12-b499-4c9b-90dd-b169e3948cb1/60

* explicit slice

* some copies are useful

* 1456d261-d232-4654-8885-4d9fde883894/440 c06eba55-1931-4e00-9d63-acad00161be0/700 af2eb6ba-1935-4318-aaf8-868db81a4932/425

* 154f663e-d3e9-4020-ad49-0e640588ebbe/399 badb5e69-504f-4544-a99e-ba75ed204b74/800 08330327-7663-4874-af7a-dcbd2c994ba7/800

* set steer rate cost to 1.0

* smaller temporal size

* Update model reg

* update model ref again

* This did upload somehow

* Update steer rate cost

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
2022-06-15 15:29:42 -07:00
Harald Schafer
c851cf7379 Revert "Update model ref"
This reverts commit efc8aa05b4.
2022-06-15 11:33:59 -07:00
Harald Schafer
efc8aa05b4 Update model ref 2022-06-15 11:32:26 -07:00
George Hotz
7a6f57a28e remove weights fixup with new SNPE (#24254)
* remove weights fixup with new SNPE

* Update ref

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-06-14 15:46:03 -07:00
ZwX1616
c646eeee0a Revert fullframe DM model (#24812)
* Revert "fullframe DM: flip RHD yaw to use matching thresholds"

This reverts commit 2ac6931003.

* Revert "fullframe DM model (#24762)"

This reverts commit d6c07a6b15.

* revert cereal
2022-06-10 16:16:46 -07:00
ZwX1616
d6c07a6b15 fullframe DM model (#24762)
* get log

* simplify two nonsense

* not needed

* libyuv is a joke

* clean up

* try small

* fast but not bad

* working

* clean up driverview

* simplified

* thats mirrored

* smol

* tweak

* ref is screen

* w/ ee

* update camera model

* no if TICI

* start

* update pose thresh

* less cpu more dsp

* new libyuv

* new snpe

* add files

* test

* should be fast

* update out len

* trigger test

* use master snpe

* add cereal

* update cereal

* refactor parsing

* missing ;

* get

* wrong type

* test model

* use driver data

* 10829278-72fe-4283-a118-2cef959ce174/1550

* no pf

* adapt driverview

* ;

* rhd learner

* update libyuv buildi x64

* ad4337ea

* remove blink slack

* test

* no

* use toggle

* b16

* fix for nv12

* 5b02cff5 both

* update test

* update cereal

* update cereal

* update cereal

* v2 packets

* revert libyuv

* no /

* update snpemodel

* ;

* memcpy

* fix test

* use toggle in driverview

* update power

* update replay

* Revert "update replay"

This reverts commit 1d0979ca59dbc89bc5890656e9501e83f0556d50.

* update model ref

* halve cpu

* fake 8bit onnx runner

* same thresh as report

* cereal master

Co-authored-by: Comma Device <device@comma.ai>
2022-06-08 20:13:46 -07:00
HaraldSchafer
7da48ebdba New model: better laneless (#24605)
* Fix ping pong

* Fix hugging: e6fd3a62-aa86-46d1-a414-19137ed1babc/800

* Remove lateral toggle

* a6da6265-1952-48dd-986b-2b5996dd2642/950

* Model replay commit

* Revert "Remove lateral toggle"

This reverts commit 69e57eb7e1a72e4bad5e12bcfded6ff431a21a0e.
2022-05-24 09:11:31 -07:00
HaraldSchafer
e2e5378dd3 Revert "Joint model (#24521)" (#24581)
This reverts commit 7996fd37ef.
2022-05-18 10:56:45 -07:00
HaraldSchafer
7996fd37ef Joint model (#24521)
* update models

* wip lanelines mhp parsing

* typos

* newer models

* 95995a49-db0c-4261-8776-b90780dc2a8c/600

* Use laneful policy to prevent planner aggression

* c8c3ab69-bd2c-4d1c-a7f8-9e8457e4827b/950

* ede8f75a-df3e-41fb-bc56-63e2f33858e5/950

* 7205c5af-7532-4215-ad9b-678789054db7/995

* bfb34fa3-1d72-4987-854f-43d42ee01015/950

* change cost

* 8ae2477a-b452-4601-b04c-d3af66ea5e98/950

* Update heading cost

* 9b991314-94f5-4f0b-872e-58d95266e4d0/333

* 9b991314-94f5-4f0b-872e-58d95266e4d0/950

* ede8f75a-df3e-41fb-bc56-63e2f33858e5/950

* undo lateral planner changes

* rm whitespace

* update ref

* c0acc19d-f2f1-47ae-8838-5382c6c6c7f5/950

* c0acc19d-f2f1-47ae-8838-5382c6c6c7f5/950

* update model refg

* Update model ref

Co-authored-by: Yassine Yousfi <yyousfi1@binghamton.edu>
2022-05-16 17:26:23 -07:00
Adeeb Shihadeh
ef81afc354 Revert "Joint Model (#24213)"
This reverts commit eff08cb17f.
2022-05-12 22:52:45 -07:00
YassineYousfi
eff08cb17f Joint Model (#24213)
* update models

* wip lanelines mhp parsing

* typos

* newer models

* 95995a49-db0c-4261-8776-b90780dc2a8c/600

* Use laneful policy to prevent planner aggression

* c8c3ab69-bd2c-4d1c-a7f8-9e8457e4827b/950

* ede8f75a-df3e-41fb-bc56-63e2f33858e5/950

* 7205c5af-7532-4215-ad9b-678789054db7/995

* bfb34fa3-1d72-4987-854f-43d42ee01015/950

* change cost

* 8ae2477a-b452-4601-b04c-d3af66ea5e98/950

* Update heading cost

* 9b991314-94f5-4f0b-872e-58d95266e4d0/333

* 9b991314-94f5-4f0b-872e-58d95266e4d0/950

* ede8f75a-df3e-41fb-bc56-63e2f33858e5/950

* undo lateral planner changes

* rm whitespace

* update ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-05-12 19:47:33 -07:00
ZwX1616
720adbc49f DM: reduce model error on dsp by another 3.5x (#24159)
* a8236e30

* match

* update model ref
2022-04-07 16:53:06 -07:00
ZwX1616
de4031c98e DM: more precision running on DSP + e2e outputs (#23900)
* update cereal

* run but not use

* log distraction type

* regression scaling

* clean up naming

* add calib buf

* add to header

* fake model

* no calib model

* adjust threshs

* 018a305f

* fix bn

* tweak1

* tweak2

* 0ff2/666

* tweak3

* t4

* t5

* fix out of bound

* skip when replaying old segments

* update ref

* fix onnxmodel

* get calib

* update model replay refs

* up ref
2022-03-15 19:02:21 -07:00
Willem Melching
492398826f modeld: sync based on frame timestamp (#23901)
* sync based on frame ts

* log extra frame id

* ints only

* update ref

* no rounding errors
2022-03-07 10:46:15 +01:00
George Hotz
8d6f49aecf model: mse err from 0.02-> 0.000056 (#23891)
* mse err from 0.028070712 -> 5.8073703e-05

* build with weights fixup

* need thneed lib also

* don't break for binaries

* static analysis says i need init

* check the bias

* load_dlc_weights

* nicer scons

* tested scons

* fix static

* pylint issue

* new ref

* a few more asserts

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-03-02 20:52:17 -08:00
HaraldSchafer
48154703a7 Fix tici bigmodel (#23817)
* Fix bigmodel on tici: cam intrinsics arent static

* Give TICI route own name for import

* Make function useable in offline test

* typo

* change tici ecam focal to trained focal

* No shadow variable

* Fixed ref

* Force update this time

* Update model replay ref commit
2022-02-21 19:57:04 -08:00
Willem Melching
85efde269d bigmodel (#23684)
* Added wide cam vipc client and bigmodel transform logic

* Added wide_frame to ModelState, should still work normally

* Refactored image input into addImage method, should still work normally

* Updated thneed/compile.cc

* Bigmodel, untested: 44f83118-b375-4d4c-ae12-2017124f0cf4/200

* Have to initialize extra buffer in SNPEModel

* Default paramater value in the wrong place I think

* Move USE_EXTRA to SConscript

* New model: 6c34d59a-acc3-4877-84bd-904c10745ba6/250

* move use extra check to runtime, not on C2

* this is always true

* more C2 checks

* log if frames are out of sync

* more logging on no frame

* store in pointer

* print sof

* add sync logic

* log based on sof difference as well

* keep both models

* less assumptions

* define above thneed

* typo

* simplify

* no need for second client is main is already wide

* more comments update

* no optional reference

* more logging to debug lags

* add to release files

* both defines

* New model: 6831a77f-2574-4bfb-8077-79b0972a2771/950

* Path offset no longer relevant

* Remove duplicate execute

* Moved bigmodel back to big_supercombo.dlc

* add wide vipc stream

* Tici must be tici

* Needs state too

* add wide cam support to model replay

* handle syncing better

* ugh, c2

* print that

* handle ecam lag

* skip first one

* so close

* update refs

Co-authored-by: mitchellgoffpc <mitchellgoffpc@gmail.com>
Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
2022-02-19 16:06:31 -08:00
George Hotz
90beaebefb add thneed optimizer (#23772)
* add thneed optimizer

* local work group opt

* kernels and final mods

* release files

* build system touchups

* fix kernel path, rand inputs for self test

* broken since extra is gone

* update model replay ref

Co-authored-by: Comma Device <device@comma.ai>
2022-02-15 15:32:00 -08:00
Adeeb Shihadeh
e49480185a update model replay ref commit after increased model idx precision 2021-12-16 15:58:56 -08:00
Mitchell Goff
1d119999c2 New model: 224877e7-dfcf-4b28-9482-371655918fe1/950 (#23170)
* New model: 224877e7-dfcf-4b28-9482-371655918fe1/950

* Updated model replay ref
2021-12-08 13:55:30 -08:00
Mitchell Goff
be89044c51 New model: d2053554-6094-43ce-943a-7bee3f43458d/950 (#23097)
* New model: d2053554-6094-43ce-943a-7bee3f43458d/950

* Updated model replay ref

* Revert "Updated model replay ref"

This reverts commit e83e0a1adc79dd20232b74932de202d858ebb485.

* New refs (again)

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-12-01 22:43:13 -08:00
ZwX1616
1ec8f03ec6 test: Replay both models on C2/C3 (#23019)
* add dcam stream

* delete model_test

* both in jenkins

* update spinner

* get filename fn

* they are not random names

* update route

* new ref commit

* temporarily resize tmp

* clean up unlog send

* need calib 0

* revert device

* cleanup

* arg

Co-authored-by: Comma Device <device@comma.ai>
2021-11-24 15:59:19 -08:00
HaraldSchafer
e6545a7238 Update model_replay_ref_commit 2021-10-17 19:41:53 -07:00
HaraldSchafer
72a736f90e Improved lead model: 6be443f2-ed70-4580-9c31-61b94d068e24/950 (#22290)
* 6be443f2-ed70-4580-9c31-61b94d068e24/950

* meta changed too

* new ref

* new ref from CI

* unused

* Revert "new ref from CI"

This reverts commit 28b6bdc81055c39973d0bf9cc964647838b73a73.

* new ref from CI again
2021-09-21 17:36:05 -07:00
Mitchell Goff
05b37552f3 Retuned desire model (#21919)
* New model: d8e7f76f-7bec-4a83-af00-c0fae792527f/950

* Updated process replay refs

* Updated model replay ref
2021-08-12 21:06:26 -07:00
Mitchell Goff
15d6bbb47c Revert "New desire model (#21729)" (#21805)
* Revert "New desire model (#21729)"

This reverts commit e83973b9b3.

* Updated process replay ref and reverted release notes
2021-07-30 14:34:29 -07:00
Mitchell Goff
e83973b9b3 New desire model (#21729)
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900

* Enable keeps

* use new packet

* Send keep pulses once per second

* Updated model_replay_ref_commit

* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac

* Bump model_replay_ref_commit

* Bump submodules

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/550

* New model: fd904bf9-5dd8-4619-8997-c5668400e078/950

* No keeps

* Bumped model replay ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2021-07-26 21:11:09 -07:00
Adeeb Shihadeh
88424ede2c Revert model (#21571)
* Revert "New desire model (#21458)"

This reverts commit 4230d5d212.

* revert rel notes
2021-07-12 19:26:50 -07:00
HaraldSchafer
4230d5d212 New desire model (#21458)
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900

* Enable keeps

* use new packet

* Send keep pulses once per second

* Updated model_replay_ref_commit

* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac

* Bump model_replay_ref_commit

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
2021-07-07 19:44:17 -07:00
Adeeb Shihadeh
cf6d133638 fix up model tests + tools (#21071)
* unlogger: send yuv stream

* fix up model test tools

* fix unlogger

* rename model replay

* bump cereal

* test in actions

* no ci for now
2021-05-28 23:08:08 -07:00
HaraldSchafer
dc40631e97 Fix planner low speed behaviour (#20990)
* first point is 0

* first point is always now

* print replay diffs

* new ref

* changed wrong commit
2021-05-21 15:10:59 -07:00
Mitchell Goff
29cc3500a5 New model outputs (#20933)
* New model: 51a237cd-9c43-4281-9072-802325e6744d/950

* Added new meta outputs and proper interp for plan_t_arr

* Added meta-based trigger for FCW

* No nans in planner, separate alert for model FCW

* Cleaned up plan_t interp logic

* Added empty cameraError alert to fix unit tests

* Use the normal FCW event

* Updated filter logic

* Updated model replay ref

* Moved disengage predictions into their own cereal struct

* Updated model replay ref for new cereal structs

* Apparently this breaks stuff?

* Bumped cereal commit and model replay ref
2021-05-19 22:30:23 -07:00
HaraldSchafer
d72d433ec7 no heading cost (#20594)
* no heading cost

* live mpc weight config

* need to add stds

* make work on empty data

* no divide by 0

* update refs

* update model replay

* update proc replat

* new model replay ref
2021-04-06 23:49:29 -07:00
HaraldSchafer
7ee79c9923 New KL model + laneless toggle (#20454)
* New model: 0bf38240-6b55-42b0-bcfb-da08ff5cd0b9/650

* laneless baby

* hardcode model difference for now

* kale toggle

* kale emoji

* sensible description

* make clear it is not just for ui

* emojis dont work yet

* 9671a8fe-539f-4a04-a163-54571df21139/650

* new model

* only read param on rising edge of ignition

* update toggle text

* fix that

* update refs

Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-24 01:10:31 -07:00
Adeeb Shihadeh
8b1e51bbdd tici jenkins build (#19505)
* tici jenkins

* /usr/bin/bash

* source all

* fix model replay

* onroad tests
2021-01-23 18:34:18 -08:00
HaraldSchafer
158210cde8 Mpc rework2 (#19660)
* start again

* need that too

* this actually works

* not needed

* do properly

* still works

* still works

* still good

* all G without ll

* still works

* all still good

* cleanup building

* cleanup sconscript

* new lane planner

* how on earth is this silent too....

* update

* add rotation radius

* update

* pathplanner first pass

* misc fixes

* fix

* need deep_interp

* local again

* fix

* fix test

* very old

* new replay

* interp properly

* correct length

* another horrible silent bug

* like master

* fix that

* do doubles

* different delay compensation

* make robust to empty msg

* make pass with hack for now

* add some extra

* update ref for increased leg

* test cpu usage on this pr

* tiny bit faster

* purge numpy

* update ref

* not needed

* ready for merge

* try again after recompile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-14 18:43:50 -08:00
Harald Schafer
c09dfdf244 new ref 2020-12-16 18:56:25 -08:00
HaraldSchafer
c89ec883cc Early model 081 (#19510)
* c91b82af-c0b0-4378-8431-3e6efc26b084/325

* 0b6e45f8-21c1-408a-b61d-3dce02a69d23/200

* update model ref
2020-12-15 22:21:30 -08:00
Adeeb Shihadeh
8992639754 add modelV2 to model replay (#2725)
* add modelV2 to model replay

* update refs

* ignore fields for modelv2

* execution time

* fix compare logs

Co-authored-by: Comma Device <device@comma.ai>
2020-12-08 22:01:34 -08:00
Mitchell Goff
bbe9accd4d Added model_replay and fixed some bugs in camera_replay (#2679)
* Added model_replay and fixed some bugs in camera_replay

* Unpack capnp logs on device

* add sync to device

* GPU now also works on PC

* update model ref

* update refs

* dont change this one

* Use pipeline calib instead of rlog calib

* remove that

* update refs

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-12-08 19:01:59 -08:00
HaraldSchafer
7b216e7cbb Minor fixes 08 (#2565)
* correct indexes

* best metrics yet 30231f46-08af-477e-9d30-776593913c24/700

* sometimes x decreases

* update model refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-17 20:04:32 -08:00
Adeeb Shihadeh
448734dbfd update model refs 2020-11-14 18:05:13 -08:00