Commit graph

897 commits

Author SHA1 Message Date
Admin
0c1aa42156 Add CUDA exact chat windowing and kernels 2026-04-15 21:33:39 +02:00
Admin
6cffd711c7 cuda otw 2026-04-13 11:09:08 +02:00
Admin
9809128567 cuda exact chat reuse and decode tuning 2026-04-13 11:09:08 +02:00
Admin
b5e31a352a wip cuda long-context profiling 2026-04-13 11:05:49 +02:00
Admin
77904dec0d cuda prefill metrics and chunked kernels 2026-04-13 11:05:49 +02:00
Admin
90ae117d84 cuda exact prefill to ~87 tok/s 2026-04-13 11:05:49 +02:00
Admin
d2d8e0459b Add FLUX warm pipeline and reference benchmarks 2026-04-13 11:01:13 +02:00
Admin
33261dcfc7 flux 1 works 2026-04-13 11:01:13 +02:00
Admin
43ac724e91 rotor quant for metal 2026-04-13 11:01:13 +02:00
Admin
8026215d2f Document Rotor divergence against BF16 baseline 2026-04-13 11:01:13 +02:00
Admin
f79724af4f Add optional Rotor-style K-cache compression for Gemma 4 2026-04-13 11:01:13 +02:00
alanpoon
5af1c812fc audio_input_panic_fix for macos (#1038) 2026-04-11 13:52:25 +02:00
Admin
b50c05dfe7 Add CUDA NVFP4 backend and GPU decode path 2026-04-11 11:44:04 +02:00
Admin
4d0a4c44f0 mlx image opt 2026-04-11 09:51:37 +02:00
Admin
bff75eb694 fix 2026-04-10 21:14:32 +02:00
Admin
0a8376e39f mlx multimodal 2026-04-10 15:10:25 +02:00
Admin
9ca672088f mlx optimisations 2026-04-10 14:48:17 +02:00
Admin
8f542c0d8a mlx working 2026-04-10 14:48:17 +02:00
Admin
1d1e91dae7 cleanup 2026-04-10 14:48:17 +02:00
Admin
e19a79d5a4 mlx otw 2026-04-10 14:48:17 +02:00
Admin
69aa615947 mlx 5x->2x 2026-04-10 14:46:22 +02:00
Admin
3d0171c8d6 mlx 2026-04-10 14:46:22 +02:00
Admin
f30a62422f mlx otw 2026-04-10 14:46:22 +02:00
Admin
00eed2e268 mlx otw 2026-04-10 14:46:22 +02:00
Ruben Daniels
c1056ea4f8 fix(base64): handle single '=' padding in base64_decode (#1027)
The decoder only checked for double padding ('==') at input[len-2],
subtracting 1 output byte. Single padding ('=') at input[len-1] was
not handled, leaving 1 extra garbage byte in the decoded output.

This affected 2 out of 3 input lengths (any input where len % 3 == 2),
producing decoded output 1 byte longer than expected.

Fix: check input[len-1] for '=' first (subtract 1 byte), then check
input[len-2] for '=' (subtract another byte for double padding).

Added 7 roundtrip tests covering: no padding (3n bytes), single
padding (3n+2 bytes), double padding (3n+1 bytes), empty input,
lengths 1-20, all 256 byte values, and URL-safe alphabet.

Co-authored-by: prime intellect <prime@prime-intellects-Mac-Studio.local>
2026-04-09 20:05:45 +02:00
Admin
f6c32eae92 stdin 2026-04-05 11:30:53 +02:00
Admin
d9d92a557e llama works 2026-04-05 11:30:53 +02:00
Admin
d4cbbaea87 llama works atleast 2026-04-05 11:30:53 +02:00
Admin
1e8f8cebbb churn 2026-04-05 11:28:47 +02:00
Admin
ddec6fc602 churn 2026-04-05 11:28:47 +02:00
Admin
080794781f driveable 2026-04-05 11:28:47 +02:00
Admin
a8ee2b194b drivable 2026-04-05 11:28:47 +02:00
Admin
357a0bd51b drivable 2026-04-05 11:28:47 +02:00
Admin
6cf21b67bd iterating 2026-04-05 11:28:47 +02:00
Admin
0a0652cfb0 otw 2026-04-05 11:28:47 +02:00
Admin
d134df9f06 xr llama and slug 2026-04-01 12:19:03 +02:00
Admin
1b9906f144 llama + xr 2026-04-01 12:19:03 +02:00
Admin
6836d3ac07 fixup 2026-04-01 12:19:03 +02:00
Admin
223cf39256 working emitters 2026-04-01 12:19:02 +02:00
Admin
1d1aed6de6 otw 2026-04-01 12:19:02 +02:00
Kevin Boos
fec9bb6f2e Introduce knowledge of device screen bounds/"safe inset areas" (#990)
* Introduce knowledge of device screen bounds/cutous/"safe inset areas"

Tested working on iOS, implemented for Android but not yet tested.

The approach may need to be improved, because it currently restricts
the whole app window to being fully within the safe areas.
We may not necessarily want that, or if we do, then we probably also
need to support setting the base color of the reserved system areas
(beneath the app bounds and above in the notification bar area).

* Use metal scissor rect to prevent SVGs/icons from being mis-drawn in safe areas

This prevents anything from being accidentally drawn in the safe
inset areas when the pass clear_color is transparent. Of course,
we can still draw the pass clear_color in those areas.

* Workaround: apply a scissor rect within safe inset area

Only apply it to clip any DrawSvg/DrawVector-specific draw calls
within the safe inset area.

This is unfortunately still just a hacky solution, because if we
actually do want to draw svg/vectors within that safe inset area,
then we won't be able to.

* Properly fix gpu artifacts when rendering SVGs

The `DrawSvg` vertex shader had a GPU fringe expansion pass designed for `fill_gpu()` mode, where fringe vertices encode per-vertex normals in the `v` and `stroke_dist` fields. SVG rendering used `fill_gpu()`, which produces **coincident-vertex fringe triangles** (body and outer fringe at the same CPU position, expanded on the GPU). These zero-area triangles caused **Metal GPU rasterization artifacts** — stray fragments appearing at unexpected screen positions.

**`draw/src/svg/render.rs`** — Switch SVG fill from `fill_gpu()` to `fill()`. Pre-computed fringe produces vertices at physically different positions (no coincident vertices).

**`draw/src/shader/draw_svg.rs`** — Remove the GPU fringe expansion code from the vertex shader. With pre-computed fringe, the `v` and `stroke_dist` fields are constants (`1.0` and `0.0`), not per-vertex normals. The expansion code was misinterpreting `v=1.0` as a horizontal normal, corrupting vertex positions.

**`libs/apple_sys/src/lib.rs`** — Added `MTLScissorRect` struct (unused now but available for future use).

**`src/home/rooms_sidebar.rs`** — Changed shadow offset from `vec2(1.0, 0.0)` to `vec2(0.0, 10.0)` so the `RoundedShadowView` shadow only draws below the header, eliminating the gray line at the top of the screen (issue 1).

* Expose safe area inset padding to app, don't forcibly apply it to root window

* Fixed safe area insets padding, with support for rotation

We now make these values available to the app dev (see below)
instead of forcibly inserting them as padding on all root windows.

This will allow each app to choose how and when they want to apply said pad values
(or if they want to at all) in an easy way, both at the Splash level
or more dynamically/programmatically at the Rust level.

Required quite a few changes to how things work in the iOS platform plumbing,
also described below in the generated summary:

On iOS and Android, Makepad apps render content behind device cutouts (Dynamic Island, camera notch), home indicators, and rounded screen corners because the framework has no awareness of safe area insets.

Added platform-level safe area inset querying on iOS and Android, exposed the values through both the Splash DSL (`mod.widgets.SAFE_INSET_PAD_*`) and Rust (`cx.display_context.safe_area_insets`), and ensured they update correctly on device rotation.

**New types:**
- `UIEdgeInsets` struct in `libs/apple_sys` for Objective-C interop
- `SafeAreaInsets` struct in `platform/src/event/window.rs` (top/right/bottom/left in logical points)
- Added `safe_area_insets` field to `WindowGeom` and `DisplayContext`

**iOS (`platform/src/os/apple/ios/`):**
- Query `[UIView safeAreaInsets]` from the MTKView in `check_window_geom()`
- Added `viewSafeAreaInsetsDidChange` callback on `MakepadViewController` to detect inset changes on rotation
- Populate `display_context` before `Event::Startup` so values are available during app script initialization
- Fixed MTKView setup: removed redundant `addSubview:` (conflicted with `setRootViewController:`) and added autoresizing mask — both required for safe area propagation on rotation

**Android (`platform/src/os/linux/android/`):**
- Added `SafeAreaInsets` variant to `FromJavaMessage` and corresponding JNI function
- Java side (`ResizingLayout.onApplyWindowInsets`): queries `WindowInsets.Type.systemBars() | displayCutout()` and sends insets to Rust (converted from px to dp)
- Added `safe_area_insets` field to `CxOs`, populated on `SafeAreaInsets` message and included in `WindowGeom` construction
- Added `surfaceOnSafeAreaInsets` native method to `MakepadNative.java`

**Splash DSL variables (`widgets/src/lib.rs`):**
- `mod.widgets.SAFE_INSET_PAD_TOP`
- `mod.widgets.SAFE_INSET_PAD_BOTTOM`
- `mod.widgets.SAFE_INSET_PAD_LEFT`
- `mod.widgets.SAFE_INSET_PAD_RIGHT`
- Values read from `display_context` at widget module initialization (during `Event::Startup`)
- Updated on the script heap via `Cx::update_safe_inset_script_values()` on `WindowGeomChange`

**Rotation support:**
- Added `pending_script_reapply` flag on `Cx` — set when safe area insets change, checked at the end of the platform event loop iteration
- Fires a deferred `LiveEdit` event to re-evaluate and re-apply all Splash widget definitions with updated inset values
- Implemented in both iOS and Android event loops

**StackNavigationView fix (`widgets/src/stack_navigation.rs`):**
- Full-screen stack views now position at `max(safe_area_insets.top, parent_rect.pos.y)` instead of hardcoded `y: 0`, respecting both mobile safe areas and desktop title bars

**All other platforms:**
- Added `..Default::default()` to all `WindowGeom` constructors (macOS, Windows, Linux X11/Wayland/Direct, web, tvOS, OpenHarmony) so the new `safe_area_insets` field defaults to zeros
2026-03-31 08:57:36 +02:00
Admin
808229c1c1 cleanup 2026-03-30 09:52:31 +02:00
Admin
fae9971b79 lz4 opt 2026-03-30 01:06:33 +02:00
Admin
b2a36e1dd6 lz4 wire protocol 2026-03-30 00:55:33 +02:00
Admin
bccb69c04c cleanup 2026-03-29 23:33:47 +02:00
Admin
85a485b463 cleanup 2026-03-29 22:57:11 +02:00
Admin
d077e864ce cleanup 2026-03-29 22:53:22 +02:00
Admin
7ac28493cd cleanup 2026-03-29 22:47:40 +02:00
Admin
ff07672927 optimize 2026-03-29 22:12:33 +02:00
Admin
618bcf11e7 optimisations 2026-03-29 21:01:06 +02:00