mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-28 18:33:45 +08:00
1a8dd310ae
* Add support for TinyGrad model runner processing Introduced a new function `is_tinygrad_model` to detect TinyGrad as an active model runner. Updated the `is_stock_model` logic to account for TinyGrad models and added a new process entry for TinyGrad in the model manager. This enables handling TinyGrad models alongside existing configurations. adding modeld back Add support for `modeld_v2` and update paths for consistency Updated `SConscript` files to integrate `modeld_v2` alongside `modeld` and adjusted script paths for correct metadata handling. Adjusted various configurations and scripts, such as `labeler.yaml` and `build_release.sh`, to include `modeld_v2` and ensure cohesive project structure. Refactor imports to use updated `modeld_v2` paths. Replaced outdated `modeld` references with their `modeld_v2` counterparts for consistency and clarity across the codebase. Also updated `.gitignore` to accommodate new directory structure. This change ensures better maintainability and alignment with the new directory schema. Refactor and reorganize modeld to sunnypilot/modeld_v2 structure. Moved and renamed `modeld` components to the new `sunnypilot/modeld_v2` directory for better organization and modularity. Updated imports and file references to align with the new structure, ensuring compatibility and functionality. Streamlined project structure to improve maintainability and future development. * typo * Use `stock` model runner and refactor model checks. Replaces outdated model detection logic with unified `stock` runner integration, simplifying the decision flow for model selection. Includes `stock` as a new enum in the `Runner` type and updates affected references accordingly. * Handle missing 'sim_pose' in model outputs gracefully. Added conditional checks to ensure the code handles cases where 'sim_pose' is absent in the model outputs. Fallback behaviors use 'plan' data when 'sim_pose' is unavailable, preventing potential errors and enhancing robustness.
48 lines
1.3 KiB
Common Lisp
48 lines
1.3 KiB
Common Lisp
#define UV_SIZE ((TRANSFORMED_WIDTH/2)*(TRANSFORMED_HEIGHT/2))
|
|
|
|
__kernel void loadys(__global uchar8 const * const Y,
|
|
__global uchar * out,
|
|
int out_offset)
|
|
{
|
|
const int gid = get_global_id(0);
|
|
const int ois = gid * 8;
|
|
const int oy = ois / TRANSFORMED_WIDTH;
|
|
const int ox = ois % TRANSFORMED_WIDTH;
|
|
|
|
const uchar8 ys = Y[gid];
|
|
|
|
// 02
|
|
// 13
|
|
|
|
__global uchar* outy0;
|
|
__global uchar* outy1;
|
|
if ((oy & 1) == 0) {
|
|
outy0 = out + out_offset; //y0
|
|
outy1 = out + out_offset + UV_SIZE*2; //y2
|
|
} else {
|
|
outy0 = out + out_offset + UV_SIZE; //y1
|
|
outy1 = out + out_offset + UV_SIZE*3; //y3
|
|
}
|
|
|
|
vstore4(ys.s0246, 0, outy0 + (oy/2) * (TRANSFORMED_WIDTH/2) + ox/2);
|
|
vstore4(ys.s1357, 0, outy1 + (oy/2) * (TRANSFORMED_WIDTH/2) + ox/2);
|
|
}
|
|
|
|
__kernel void loaduv(__global uchar8 const * const in,
|
|
__global uchar8 * out,
|
|
int out_offset)
|
|
{
|
|
const int gid = get_global_id(0);
|
|
const uchar8 inv = in[gid];
|
|
out[gid + out_offset / 8] = inv;
|
|
}
|
|
|
|
__kernel void copy(__global uchar8 * in,
|
|
__global uchar8 * out,
|
|
int in_offset,
|
|
int out_offset)
|
|
{
|
|
const int gid = get_global_id(0);
|
|
out[gid + out_offset / 8] = in[gid + in_offset / 8];
|
|
}
|