Commit Graph

293 Commits (master)

Author SHA1 Message Date
George Hotz b8571710e0
remove the clCreateProgramWithSource interceptor (#1559)
* remove the clCreateProgramWithSource interceptor

* that's old code, thneed is better

* label them thneed_, we shouldn't need to touch CL for anything not SNPE related
2020-05-24 03:33:36 -07:00
Willem Melching ab5af232b2
Use C++ version of SubMaster and PubMaster (#1548)
* add PubMaster & SubMaster

remove 'delete msg'

remove headers

* use constructor to initial all submster

* modify drain sockets

* fix typo in ssconscript.remove lines

no checkValid in loggerd

last modify

handle_message:event->&event

fix type

remove heads

event to auto

* new interface

* api changed

* Revert "use constructor to initial all submster"

This reverts commit 73be7ea46250a325ce41d3a0445e34395a2ae692.

* change to new api

* revert loggerd

* dd

* use new PubSub api

* update to new interface

don't modify loggerd

reset panda

reset opendbc

remove empty lines

* switch to new pubMaster

* update to the new inteface

change

remove error code

. to ->

merge paramsd.cc

update panda

fix typo

simplify

fix typo

* Fix build

* always conflate

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-05-21 16:04:33 -07:00
George Hotz 6c0ad1e675
add thneed self test (#1535)
* add thneed self test

* don't do the memset in thneed, shouldn't matter though

Co-authored-by: Comma Device <device@comma.ai>
2020-05-18 11:34:29 -07:00
Comma Device 495e0c4648 wtf, how was that commented out and the tests still passed 2020-05-18 17:10:39 +00:00
George Hotz 78a352a8ca
This isn't bigmodel, but there's a lot of good stuff here (#1532)
* bigmodel

* more debug print

* debugging bigmodel

* remove the tanh, debugging

* print images/buffers

* disassemble the command queues

* decompiler

* dump the shaders

* full disasm

* support patching kernel and fixing convolution_horizontal_reduced_reads_1x1

* microbenchmark

* 42 GFLOPS, 1 GB/s

* gemm benchmark

* 75 GFLOPS vs 42 GFLOPS

* 115 GFLOPS

* oops, never mind

* gemm image is slow

* this is pretty hopeless

* gemm image gets 62 GFLOPS

* this is addictive and still a waste of time

* cleanup cleanup

* that hook was dumb

* tabbing

* more tabbing

Co-authored-by: Comma Device <device@comma.ai>
2020-05-17 23:13:17 -07:00
George Hotz 302d06ee70 thneed saves 45% of a core (#1512)
* thneed runs the model

* thneed is doing the hooking

* set kernel args

* thneeding the bufferS

* print the images well

* thneeds with better buffers

* includes

* disasm adreno

* parse packets

* disasm works

* disasm better

* more thneeding

* much thneeding

* much more thneeding

* thneed works i think

* thneed is patient

* thneed works

* 7.7%

* gpuobj sync

* yay, it mallocs now

* cleaning it up, Thneed

* sync objs and set power

* thneed needs inputs and outputs

* thneed in modeld

* special modeld runs

* can't thneed the DSP

* test is weird

* thneed modeld uses 6.4% CPU

* add thneed to release

* move to debug

* delete some junk from the pr

* always track the timestamp

* timestamp hacks in thneed

* create a new command queue

* fix timestamp

* pretty much back to what we had, you can't use SNPE with thneed

* improve thneed test

* disable save log

Co-authored-by: Comma Device <device@comma.ai>
2020-05-15 13:53:01 -07:00
Willem Melching add784a7df
remove eigen from phonelibs (#1505) 2020-05-13 16:41:52 -07:00
Willem Melching 72db8d890d
Library cleanup (#1491)
* library cleanup

* remove fastcv

* Fix build step

* bump cereal

* bump cereal

* Install capnp

* bump

* no docker cache

* Update installation instructions

* Needs sudo

* Can we sudo?

* Cache was not the problem

* remove static libraries from boardd install script

* Update setup script

* Remove import

* No capnp install in lgtm

* Fix dockerfile
2020-05-12 18:50:07 -07:00
Harald Schafer ee10697d86 safer 2020-05-10 22:00:41 -07:00
robbederks 71bebc4fca
Ambient light calibration parameters on persist partition (#1429)
* WIP: light sensor persistent params

* fix params writing

* Persistent params argument in C params lib. Fixed symlink flow

* Removed debug prints

* fix boardd

* fix ui

* remove debug print
2020-05-08 19:39:18 -07:00
HaraldSchafer 65fcc7c45f
Better poly (#1437)
- better polyfitting
- no mpc cost change during lane change
- model trained with better ll gt, sim noise and guaranteed memories
2020-05-08 17:14:43 -07:00
Dean Lee b6d6f52032
camerad: move c-capnp to c++ (#1472)
* convert c-capnp to c++

change paramater type

* remove c-capnp header from commonmodel.c

* unsigned short -> uint16_t

* MSM_CAMERA_I2C_ADDR_TYPE_MAX->4
2020-05-07 20:14:30 -07:00
George Hotz d5ca841b0f Revert "Bypass alignment related copy whenever possible (#1443)"
This reverts commit b225016628.
2020-05-04 09:54:05 -07:00
George Hotz e568d3cadc
More LGTM fixups (#1457)
* exclude lib dirs, fix 3 cpp errors

* fix more alerts, exclude mkvparse

Co-authored-by: George Hotz <geohot@gmail.com>
2020-05-02 20:00:41 -07:00
George Hotz 1295cfe06c
Using lgtm.com and fixing found alerts (#1452)
* lgtm in readme, and mac nui fixes

* call super inits in radars

* unused imports, dup lines

* more radars, more unused imports

* pass CP into RadarInterfaceBase

* more fixups

* unused imports

* delete unused lines

* ugh, new unused import

Co-authored-by: George Hotz <geohot@gmail.com>
2020-05-02 12:07:34 -07:00
Dean Lee b225016628
Bypass alignment related copy whenever possible (#1443)
remove blank lines

add file messagehelp.h

remove blank line

simplify

after review
2020-05-01 19:21:00 -07:00
Dean Lee 98ec06e125
unmap a previously mapped buff (#1410) 2020-04-22 10:16:05 -07:00
Dean Lee 2928c53e4f
cleanup visionipc when recovering from fault in dmonitoringd and loggerd (#1402) 2020-04-20 13:15:11 -07:00
Andrew Sidhu a120adaecc
Fix by Boggyver - Add Traffic Convention data to input buffer (#1405)
Credit goes to Boggyver for finding this.
2020-04-20 10:05:33 -07:00
Dean Lee ce4528c392
dmonitoringmodeld: fix memory leak (#1403) 2020-04-20 09:23:23 -07:00
Dean Lee 25ab2521ab
fixes the error with OpenCL depreciation warnings (#1394) 2020-04-19 14:04:33 -07:00
Willem Melching e171a7a047 modeld, add cloudlogs 2020-04-19 14:00:30 -07:00
Dean Lee 8f2858efba
modeld, cleanup visionipc when recovering from fault 2020-04-19 13:59:36 -07:00
Willem Melching 02e474580e
Release messaging sockets and context on shutdown (#1391)
* release resources when thread is done

* add white space

* add white space

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-04-17 16:37:34 -07:00
ZwX1616 6c5080fa98
fix RHD memory leak 2020-04-16 17:31:59 -07:00
HaraldSchafer f5b28ad2d2
add traffic convention (#1372)
* I think this works

* clean up
2020-04-15 21:19:25 -07:00
ZwX1616 133b1a20b4
RHD support for driver monitoring (#1299) 2020-04-15 16:48:44 -07:00
HaraldSchafer d3edc594ce
Traffic b2 (#1345)
* add traffic convention

* hope this work

* no comment

* latest and gratest

* big gru model

* 1af55c7d-ee15-414a-9e98-a0cb08c3441f/75

* much later in training

* wrong temporal size

* converged

* fix lane changes
2020-04-13 13:27:06 -07:00
George Hotz 8db0993663
tici: add (somewhat) broken camerad support (#1300)
* capnparm

* building in progress

* scons build works

* that script fixes opencl

* start new camera code

* includes and more camera scripts

* control c works now

* no device control yet

* phy too

* just one camera for now

* fix capnparm

* hmm, the inits are needed

* more cameras

* link stop start

* doesn't work yet

* fix ion on qcom2

* start poll ish

* 4 pictures and done

* no jpeg

* it works to picture

* destroy sync obj

* both work for now

* defined QCOM2

* fix fd leak

* run modeld

* 10 bit mode

* real frame stride

* needs digital gain

* dnew

* no color correcting on new

* that snpe doesn't work

* qcom2 gate

* cleanups

* oops, fix aarch64 detector

* update cereal

* modeld works with SNPE

* fix driver monitoring model

Co-authored-by: Tici <robbe@comma.ai>
2020-03-31 16:34:55 -07:00
George Hotz 6e5a2d404b
Preparing for the efficientnet (#1255)
* snpe version 1.35.0.698

* fix files common for new snpe

* efficient net with normal names

* compiling with 1.32 works

* actual snpe files

* fix monitoring, delete unneeded

* point the symlinks to the right places

* err, modeld needs the CPU

* benchmark for 50 its

* put back old model for now

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
Co-authored-by: George Hotz <geohot@gmail.com>
2020-03-30 14:20:51 -07:00
ZwX1616 a95e61edf4
add webcam to cameras (#1201) 2020-03-26 19:19:47 -07:00
Harald Schafer d02f55ae0b add long_x 2020-03-26 17:40:12 -07:00
Comma Device 9a50e0445a add program dumping to opencl hooks 2020-03-18 03:30:39 +00:00
George Hotz 774912075a
hook opencl to profile SNPE (#1249)
* hook for snpe speed

* hook works

* prints kernel names

* add timing to hook

* clean up printing

Co-authored-by: Comma Device <device@comma.ai>
2020-03-17 20:04:55 -07:00
HaraldSchafer 63d3bb517f
Pulse desire (#1172)
* initial

* compilation fixes

* add desire

* pulse desire

* 0d5728f6-a918-40a6-bce3-a9d0f1238180/20

* cleaner

* inject model

* inject model

* test runs

* ah already done I see

* remove useless

* update

* updates, doesnt work

* fix generating new references

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-03-04 18:51:45 -08:00
Harald Schafer 5f34f17c9e cutin not correctly parsed 2020-02-20 13:28:23 -08:00
Comma Device 042415b021 actually fix benchmark script 2020-02-19 02:27:31 +00:00
Comma Device a8f5562081 fix snpe_benchmark script 2020-02-19 02:13:46 +00:00
George Hotz c50c718293
Cleanup simulator and add usage instructions (#1050)
* cleanup simulator files

* minor updates

* update readme

* keras runner builds

* hmm, still doesn't work

* keras runner works

* should work with python3 keras mod

* touchups
2020-02-04 19:46:57 -08:00
HaraldSchafer f610e596c4
Multipath supercombo (#1036)
* exclude stuff outside of validity window

* 94dd2da7-23ae-4628-9d12-37f58b379110/10

* fbe443fd-1d65-4b4d-8e3a-3817b58bacd0/50

* sanity clip
2020-02-03 11:25:22 -08:00
ZwX1616 6322a275d6
dmonitoringd (#1016) 2020-01-30 19:12:44 -08:00
George Hotz 6ceffe68d0 base SNPE path off home dir, still not really generic 2020-01-17 17:45:38 -08:00
George Hotz da079d47d7 logcatd, loggerd, mapd, modeld, proclogd 2020-01-17 11:20:17 -08:00