Experimental small-batch CUDA baseline JPEG decoding core

Abierto
#60 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
8/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cpp, python, pytorch

Línea de trabajo

This is a proposal for an opt-in experimental CUDA baseline JPEG decoder core, and the author is asking whether the direction fits the project rather than asking for a specific change. Read the issue to see the planned split between Huffman decoding, IDCT, color conversion and host parsing, then wait for maintainer direction before touching any code. Done would mean the maintainers have answered the scope question and a draft review has been agreed.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Proposal

Introduce an opt-in experimental native CUDA baseline JPEG decoding core as a
step toward a low-host-work decoder backend for small batches.

nvJPEG and nvImageCodec already provide GPU-assisted Huffman decoding. This
proposal concerns host work and small-batch scheduling, not missing JPEG support.

Existing implementation and evidence

The prototype moves entropy decoding onto CUDA using overlapping speculative
Huffman decoding, exact chunk-state reconciliation, coefficient decoding, and
DC prefix scans, followed by dequantization, IDCT, and color conversion.
Host work is marker/table parsing, lookup-table construction, input staging,
and stream submission.

On 2026-10-22, the original Torch-bound implementation was checked on an RTX 5090
with PyTorch 2.8.0+cu128 and torchvision 0.23.0+cu128: 5000/5000 decoded images and
5000/5000 preprocessing tensors were bit-identical to that reference. The corpus
contained 4990 baseline 4:4:4 images and 10 grayscale images. A 200-image sequential
load benchmark changed from 2335.05 to 425.75 microseconds/image, while GPU busy
time increased from 57.79 to 335.80 microseconds/image. These are historical
prototype/load-path measurements rather than current nvImageCodec or model
end-to-end performance claims.

Scope of the proposed draft

  • Separate the algorithm from Torch into C++/CUDA parsing, kernels, resource
    ownership, stream submission, and explicit completion/error checking.
  • Initial scope: baseline 8-bit, single scan, grayscale/YCbCr 4:4:4, no restart
    intervals; caller-owned pitched planar RGB output.
  • Keep the component disabled by default, without changing codec selection.
  • Retain NVIDIA CUDA samples attribution for the IDCT butterfly.
  • Include malformed-header tests, sanitizer checks, and a GPU contract test.

I will submit the native core as a draft for architecture/kernel review. The
framework decoder adapter and matched current nvJPEG comparisons are separate
follow-up work. Is an optional backend with this initial scope a useful direction
for the project?

Lenguaje dominante
Jupyter Notebook
Estrellas
164
Forks
26
Merge medio
27 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NVIDIA/nvImageCodec

Todos los issues de NVIDIA/nvImageCodec

Issues similares

Más issues de Data Engineering

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.