Commit Graph

451 Commits

Author SHA1 Message Date
Adeeb Shihadeh
03c4bdc0be Revert "modeld: remove extra cloudlog.bind, manager does this"
This reverts commit d99afd438be153166affb99ce366c537d977ba47.

old-commit-hash: 362c0bf2ca
2023-09-21 20:13:13 -07:00
Adeeb Shihadeh
f0a8853060 modeld: remove extra cloudlog.bind, manager does this
old-commit-hash: 754af893e9
2023-09-21 20:06:46 -07:00
Harald Schäfer
3f1086c410 Optimus Prime Model 🤖 (#29752)
* b449f295-7e40-4f97-96a6-d858815955e5/700

* make it compile b449f295-7e40-4f97-96a6-d858815955e5/700

* simpler - b449f295-7e40-4f97-96a6-d858815955e5/700

* feature_len changed

* 0a833ab4-9fc7-4e51-a686-9bce3eafcb91/700

* Revert "0a833ab4-9fc7-4e51-a686-9bce3eafcb91/700"

This reverts commit 41708b88447cfcf302b16f21f0caa69450bbd3df.

* 0a833ab4-9fc7-4e51-a686-9bce3eafcb91/700 again

* Update ref

* update ref

---------

Co-authored-by: Yassine <yassine.y10@gmail.com>
old-commit-hash: 3799fe46b3
2023-09-21 13:51:12 -07:00
Harald Schäfer
5bb0112fdd Test modeld: 3s enough for modeld startup (#29936)
* Test modeld: 3s enough for modeld startup

* Always fails when you send frames before modeld is ready

* Wait for modeld to read
old-commit-hash: ef50b4fdac
2023-09-15 14:59:46 -07:00
Mitchell Goff
3e1903a6cb Converted onnx runner to python (#29856)
old-commit-hash: 9cc00c2101
2023-09-08 16:45:38 -07:00
Mitchell Goff
65fc9f14b3 Update model input names to match onnx inputs (#29855)
Updated model input names to match onnx inputs
old-commit-hash: 2d69f3d63e
2023-09-08 16:06:16 -07:00
Mitchell Goff
5732002296 Rewrite dmonitoringmodeld in python (#29740)
* Added dmonitoringmodeld.py

* Removed dmonitoringmodeld.cc

* Use ModelRunner helpers from runners/__init__.py

* Fixed DriverStateResult field ordering

* Some bug fixes

* Set calib input

* Look ma, no loop!

* Bump dmonitoringmodeld cpu usage in test_onroad

* Fixed memory leak caused by np.ctypes.data_as

* Formatting fixes

* chmod +x

* remove USE_ONNX_MODEL

* Realtime priority 1, formatting fixes
old-commit-hash: 503fa121ee
2023-09-07 19:46:43 -07:00
Mitchell Goff
f9daa1d1cc Rewrite navmodeld in python (#29579)
* Added navmodeld.py

* Deleted navmodeld.cc

* Write SConscript config flags to config.py

* Remove deleted files from release/files_common

* Some more bug fixes

* Added config.py to gitignore

* Get rid of config.py

* Use set_realtime_priority

* A tiny bit more cleanup

* set realtime priority 1

* Use ModelRunner helper class from runners/__init__.py

* Formatting fixes

* mama mia that's a SPICY memory leak
old-commit-hash: 0c0af682a1
2023-09-07 14:39:37 -07:00
mitchellgoffpc
459e4fdb50 Added cython bindings for commonmodel sigmoid
old-commit-hash: 05993f50df
2023-08-31 19:40:53 -07:00
Mitchell Goff
cd7d73eaf8 Added ModelRunner helpers in modeld/runners/__init__.py (#29737)
* Added ModelRunner helper class

* import Runtime in __init__.py
old-commit-hash: d5a55136a1
2023-08-31 14:19:20 -07:00
mitchellgoffpc
aca5580900 Move Runtime into runmodel_pyx
old-commit-hash: f91e955a86
2023-08-31 13:51:50 -07:00
mitchellgoffpc
e9c82290c0 Remove unnecessary hardware check in modeld
old-commit-hash: 857f747467
2023-08-31 13:51:49 -07:00
mitchellgoffpc
51066175f5 Set ADSP_LIBRARY_PATH in snpemodel_pyx
old-commit-hash: 18526c58b6
2023-08-31 13:11:39 -07:00
mitchellgoffpc
83745ad42f Set RPATH for snpemodel
old-commit-hash: aebff37593
2023-08-31 11:33:42 -07:00
Mitchell Goff
52901d2a20 Cleaned up modeld SConscript (#29646)
old-commit-hash: 88a36f4464
2023-08-30 15:29:33 -07:00
Mitchell Goff
fa770f1ccc Combine update_calibration/get_warp_matrix (#29719)
old-commit-hash: 151ac4bf76
2023-08-30 15:16:29 -07:00
Mitchell Goff
54988e457f Move update_calibration to modeld.py (#29688)
* Move update_calibration to modeld.py

* Updated ref commit
old-commit-hash: 1eb60516cb
2023-08-30 14:12:52 -07:00
mitchellgoffpc
16a3f0f67f -DUSE_THNEED is dead
old-commit-hash: 12d1020239
2023-08-30 12:58:31 -07:00
Mitchell Goff
c4ae1fae5a Added USE_THNEED environment variable and removed build flag (#29645)
old-commit-hash: d998fd88a8
2023-08-29 14:07:57 -07:00
mitchellgoffpc
fdaee85b1e Remove no-thneed build flag
old-commit-hash: 807410e0ac
2023-08-25 19:09:25 -07:00
mitchellgoffpc
e9e98abe89 Remove USE_THNEED check from run.h
old-commit-hash: e0287fa93e
2023-08-25 19:05:49 -07:00
Kacper Rączy
d254137f4c modeld: fix bash scripts (#29643)
Fix shebang. Fix LD_PRELOAD
old-commit-hash: a4a0429fca
2023-08-25 18:56:06 -07:00
mitchellgoffpc
68e2c74cd3 Remove thneed logic from snpemodel
old-commit-hash: ef8e0fef55
2023-08-25 14:37:08 -07:00
Mitchell Goff
a3fbbb26ac Rewrite modeld in python (#29230)
* Added modeld.py (WIP)

* No more VisionIpcBufExtra

* Started work on cython bindings for runmodel

* Got ONNXModel cython bindings mostly working, added ModelFrame bindings

* Got modeld main loop running without model eval

* Move everything into ModelState

* Doesn't crash!

* Moved ModelState into modeld.py

* Added driving_pyx

* Added cython bindings for message generation

* Moved CLContext definition to visionipc.pxd

* *facepalm*

* Move cl_pyx into commonmodel_pyx

* Split out ONNXModel into a subclass of RunModel

* Added snpemodel/thneedmodel bindings

* Removed modeld.cc

* Fixed scons for macOS

* Fixed sconscript

* Added flag for thneedmodel

* paths are now relative to openpilot root dir

* Set cl kernel paths in SConscript

* Set LD_PRELOAD=libthneed.so to fix ioctl interception

* Run from root dir

* A few more fixes

* A few more minor fixes

* Use C update_calibration for now to exactly match refs

* Add nav_instructions input

* Link driving_pyx.pyx with transformations

* Checked python FirstOrderFilter against C++ FirstOrderFilter

* Set process name to fix test_onroad

* Revert changes to onnxmodel.cc

* Fixed bad onnx_runner.py path in onnxmodel.cc

* Import all constants from driving.h

* logging -> cloudlog

* pylint import-error suppressions no longer needed?

* Loop in SConscript

* Added parens

* Bump modeld cpu usage in test_onroad

* Get rid of use_nav

* use config_realtime_process

* error message from ioctl sniffer was messing up pyenv

* cast distance_idx to int

* Removed cloudlog.infos in model.run

* Fixed rebase conflicts

* Clean up driving.pxd/pyx

* Fixed linter error
old-commit-hash: 72a3c987c0
2023-08-25 14:36:26 -07:00
Mitchell Goff
5033da5e27 Added cython bindings for model runners and commonmodel (#29607)
* Added cython bindings for model runners and commonmodel

* Removed cython language_level=3

* loop to set CXXFLAGS for both envs
old-commit-hash: e2e39d100b
2023-08-24 17:00:26 -07:00
Justin Newberry
c4f322ce2d Linter: remove pylint (#29611)
remove pylint
old-commit-hash: 1ee6ed4b16
2023-08-24 16:30:54 -07:00
mitchellgoffpc
01e73c76f8 Moved thneed src to top of modeld sconscript
old-commit-hash: 7dae580441
2023-08-24 15:12:01 -07:00
mitchellgoffpc
c4bb5bbf04 Some cleanup in modeld sconscript
old-commit-hash: fc8c97e7a9
2023-08-24 14:41:04 -07:00
mitchellgoffpc
0126d840f3 Disable error message in thneed ioctl interceptor to fix pyenv issues
old-commit-hash: a184d40b7a
2023-08-24 14:41:04 -07:00
Dean Lee
de809632bf cpplint: add filter whitespace/comma (#29595)
old-commit-hash: 7bfd3dac81
2023-08-24 10:42:06 -07:00
Dean Lee
228d30d5a9 cpplint: add filter whitespace/tab (#29588)
old-commit-hash: 9c7bf50703
2023-08-24 08:06:58 -07:00
Dean Lee
0984736972 cpplint: add filter build/include_subdir (#29585)
old-commit-hash: 21da5a216f
2023-08-24 15:42:17 +01:00
Dean Lee
5f4b422305 cpplint: add filter whitespace/semicolon (#29568)
old-commit-hash: f203648de0
2023-08-23 15:00:30 -07:00
Dean Lee
db211ce617 cpplint: add filter whitespace/parens (#29565)
old-commit-hash: 5480d32bb5
2023-08-23 14:25:05 -07:00
Dean Lee
97e9d55588 cpplint: build/include_what_you_use (#29556)
* include_what_you_use

* remove comments

* include <memory>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 2d99521e75
2023-08-23 13:25:17 -07:00
mitchellgoffpc
8a1e4d8575 Set paths for cl kernels and onnx_runner.py in modeld SConscript
old-commit-hash: 7699444816
2023-08-21 19:38:40 -07:00
mitchellgoffpc
b1a10e45d1 Move USE_RUNTIME flags into runmodel.h
old-commit-hash: 24090d2121
2023-08-21 19:26:48 -07:00
mitchellgoffpc
b69de80962 exit if onnxmodel exec fails
old-commit-hash: 8c478708ee
2023-08-21 19:23:23 -07:00
Adeeb Shihadeh
16ec56398c add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
old-commit-hash: a9626f95b6
2023-08-20 20:49:55 -07:00
Justin Newberry
f33b4de80b Ruff: b905 (strict zip) (#29336)
* added mutable default args

* most of the Bs

* add comment about lrucache

* b905
old-commit-hash: e4ead4f183
2023-08-11 16:13:51 -07:00
Justin Newberry
d487c0501f Ruff: enable most of bugbear (#29320)
* added mutable default args

* most of the Bs

* add comment about lrucache
old-commit-hash: 62c1e65924
2023-08-11 15:33:49 -07:00
Mitchell Goff
e6e19f8d3e Non-Inflatable Model 🎈 (#29003)
* Added all maneuvers to navInstruction message

* Added nav instruction logic to modeld

* New model: fcee01c1-96bb-414f-b00d-e4a994a00922/700

* Fixed bug in navd

* Added sharp/slight modifiers

* Updated refs
old-commit-hash: c04e5d12fc
2023-08-09 19:56:45 -07:00
Justin Newberry
3ee0786de3 CI: Pylint to ruff (#29294)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad

* set line length

* pylint exclusions to ruff

* same excludes as old linter

* fix tools QA

* remove unrequired check

* revert linting third_party

* ignore e402
old-commit-hash: 7fdd9fc37c
2023-08-09 13:26:54 -07:00
Justin Newberry
ff96892511 Revert "CI: pylint to ruff (#29276)" (#29284)
This reverts commit ffad7279cbad3c4f2ea786287b4624d3a3aa18d7.
old-commit-hash: a91764954b
2023-08-08 14:24:04 -07:00
Justin Newberry
99006365a3 CI: pylint to ruff (#29276)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad
old-commit-hash: cb31a53d8a
2023-08-08 13:41:30 -07:00
eFini
0a9ec3e2aa unused variables removal (#29247)
old-commit-hash: e883789c0e
2023-08-06 21:41:13 -07:00
mitchellgoffpc
7616368e5b Added modeld gitignore
old-commit-hash: 66dfe8fd5e
2023-08-04 14:14:45 -07:00
Mitchell Goff
181e9775f7 Clean up model_publish args to simplify cython bindings (#29203)
* Clean up model_publish args to simplify cython bindings

* pass by reference

* Move FCW and model confidence queues into PublishState
old-commit-hash: 663fc0d8fe
2023-08-01 19:23:18 -07:00
Kacper Rączy
edc31db6df aarch64: ubuntu build support (#29171)
* Add support for aarch64 pc linux

* Add new libyuv path to release files

* Add libyuv's x86_64 lib dir

* Move left-over platform specific dirs from files_common

* Remove libyuv/lib directory (duplicate)

* Fix mpc Sconscripts

* Remove acados lib path from mpc sources

* Fix typo

* Add watch3 exec on aarch64
old-commit-hash: c640429406
2023-08-01 16:18:46 -07:00
Dean Lee
b80325aa04 swaglog: enable type-checked against format string (#29096)
* check&fix fmt

* bump rednose

* correct format string

* bump rednose

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 940954c13e
2023-07-31 17:49:50 -07:00