mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-26 20:53:54 +08:00
* squash * dmonitoringmodeld: use cl transform (#34235) * needs cleanup * only if tici * bump tinygrad * check width * base modelframe * . * need to be args * more cleanup * no _frame in base * tici only * its DrivingModelFrame * .6 is fair --------- Co-authored-by: Comma Device <device@comma.ai> * Update tinygrad * tg upstream * bump tg * bump tg * debug * attr * misc cleanup * whitespace * remove * Add TODOs to make python proc for modelrunners * whitespace --------- Co-authored-by: ZwX1616 <zwx1616@gmail.com> Co-authored-by: Comma Device <device@comma.ai> Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
27 lines
744 B
Cython
27 lines
744 B
Cython
# distutils: language = c++
|
|
|
|
from msgq.visionipc.visionipc cimport cl_device_id, cl_context, cl_mem
|
|
|
|
cdef extern from "common/mat.h":
|
|
cdef struct mat3:
|
|
float v[9]
|
|
|
|
cdef extern from "common/clutil.h":
|
|
cdef unsigned long CL_DEVICE_TYPE_DEFAULT
|
|
cl_device_id cl_get_device_id(unsigned long)
|
|
cl_context cl_create_context(cl_device_id)
|
|
|
|
cdef extern from "selfdrive/modeld/models/commonmodel.h":
|
|
cppclass ModelFrame:
|
|
int buf_size
|
|
unsigned char * buffer_from_cl(cl_mem*, int);
|
|
cl_mem * prepare(cl_mem, int, int, int, int, mat3)
|
|
|
|
cppclass DrivingModelFrame:
|
|
int buf_size
|
|
DrivingModelFrame(cl_device_id, cl_context)
|
|
|
|
cppclass MonitoringModelFrame:
|
|
int buf_size
|
|
MonitoringModelFrame(cl_device_id, cl_context)
|