Skip to content

ZUNA GPU f16 fallback failure and embedding search timestamp mismatch #58

@FishBallMEOW

Description

@FishBallMEOW

Hi, I tested NeuroSkill with an LSL EEG stream and found two separate issues around ZUNA embeddings/search:

  1. On my setup, GPU f16 is attempted even though wgpu does not expose SHADER_F16, and the fallback does not recover cleanly;
  2. embeddings are stored successfully in CPU mode, but search misses them because the stored timestamp format does not match the query timestamp format.

Environment

  • Windows

  • RTX 3070

  • NVIDIA driver 596.21

  • LSL EEG input

  • Minimal test stream:

    • name: EmbeddingTestEEG
    • channels: TP9, AF7, AF8, TP10
    • sample rate: 256 Hz

Issue 1: Local wgpu f16 incompatibility is not caught by fallback

Observed behavior: in GPU mode, ZUNA starts loading but the embed worker disconnects, epochs are dropped, and embeddings are not produced reliably.

On my setup, NeuroSkill selects the RTX 3070 correctly, but the local wgpu backend does not expose SHADER_F16:

AutoGraphicsApi → Vulkan: adapter_has_shader_f16=false
Explicit Vulkan → Vulkan: adapter_has_shader_f16=false
Explicit DX12 → DX12: adapter_has_shader_f16=false

vulkaninfo also suggests only partial f16 support:

storageInputOutput16 = false

So this seems to be a local wgpu capability limitation, not a general GPU-selection issue.

However, ZUNA still attempts GPU f16, which triggers:

Using f16 values requires the naga::valid::Capabilities::FLOAT16 flag

The fallback does not appear to catch this cleanly, so the embed worker disconnects and embeddings are not produced reliably.

Suggested fix: check wgpu SHADER_F16 before using GPU f16, and safely fall back when it is unavailable.


Issue 2: Search misses existing embeddings due to timestamp format mismatch

I also found a separate search issue.

In CPU mode, embeddings are generated and stored successfully. However, neuroskill search returns:

query epochs: 0

even though embedding-count shows embedded rows exist.

Direct SQLite inspection shows stored timestamps like:

20260427034308000

This appears to be:

YYYYMMDDHHmmss000

But the search command receives Unix-second ranges, converts them to Unix milliseconds, and then queries something like:

WHERE timestamp BETWEEN start_ms AND end_ms

So search looks for timestamps like:

1777362376000

while the database stores timestamps like:

20260427034308000

These timestamp formats do not overlap, so search cannot find embeddings even though they exist.

Suggested fix:

  • Define one canonical timestamp format for embeddings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions