Skip to content

Visualize float16 datasets - #2045

Merged
axelboc merged 1 commit into
silx-kit:mainfrom
NAThompson:float16-support
Sep 28, 2026
Merged

axelboc merged 1 commit into
silx-kit:mainfrom
NAThompson:float16-support

Conversation

@NAThompson

Copy link
Copy Markdown
Contributor

isTypedArray did not recognize Float16Array, so half-precision values were rejected outright even though parseDType already labelled the datasets float16. The check goes through globalThis because naming the constructor directly would throw a ReferenceError on older runtimes.

Heatmaps view the halves as uint16 rather than widening them to float32, so they upload as a HALF_FLOAT texture -- already supported here -- with no conversion pass and half the texture memory.

@NAThompson

Copy link
Copy Markdown
Contributor Author

@axelboc : Had to alias to Uint16 until this is resolve.

Also this PR depends on usnistgov/h5wasm#141, so no merge until then.

@NAThompson

Copy link
Copy Markdown
Contributor Author

@loichuder , @axelboc : The h5wasm MR has been merged-this is ready for review.

Comment thread packages/lib/src/vis/heatmap/HeatmapMaterial.tsx
@axelboc

axelboc commented Sep 18, 2026

Copy link
Copy Markdown
Contributor
image

`isTypedArray` did not recognize `Float16Array`, so half-precision values were
rejected outright even though `parseDType` already labelled the datasets
float16. The check goes through `globalThis` because naming the constructor
directly would throw a `ReferenceError` on older runtimes.

Heatmaps view the halves as uint16 rather than widening them to float32, so
they upload as a HALF_FLOAT texture -- already supported here -- with no
conversion pass and half the texture memory.
@axelboc

axelboc commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Next steps will be to upgrade h5wasm once released, and to make sure the h5grove and HSDS providers return Float16Array (I already have a stash that's almost ready).

@axelboc
axelboc requested a review from loichuder September 18, 2026 14:29
@axelboc
axelboc merged commit 35cfd7d into silx-kit:main Sep 28, 2026
5 checks passed
@NAThompson

Copy link
Copy Markdown
Contributor Author

@loichuder , @axelboc : Did the h5wasm release get cut?

@NAThompson
NAThompson deleted the float16-support branch September 28, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants