Rust-GPU / Rust-GPU/rust-gpu

`NonUniform` decoration support

Abierto
#148 1 comentario 3 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

enhancement
Lenguaje dominante
Rust
Estrellas
3.4k
Forks
126
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Add support for the NonUniform decoration, allowing invocations within a workgroup (or subgroup) to access an array of descriptors using different indices.

I'd suggest that any indexing of descriptors should by default be NonUniform, and that the guarantee of uniformity should be an unsafe opt-in, to guarantee the code at the very least always works. Contrary to the current situation on glsl, where the guarantee of uniformity is the default and you have to opt-out of it using nonUniformExt().

One could also make a pass to automatically figure out which accesses are guaranteed to be uniform and remove the NonUniform Decoration. However, looking at how the IHV implement it, I question if making such a pass would actually bring any improvement (afaik):

  • Nvidia: NonUniform doesn't make a difference on their cards, I assume every access is always NonUniform.
  • Intel: I've heard that it also shouldn't make any difference, like Nvidia.
  • AMD: NonUniform is implemented with a uniform loop where each unique index within the subgroup is accessed one after the other. This is most likely quite slow, however, AMD is also really good in figuring out which instructions are uniform across the workgroup, due to them having dedicated scalar registers and a dedicated scalar unit for scalar operations. So the driver should eliminate unnecessary NonUniform accesses anyway, as it wants to optimize them from vector into scalar / uniform loads.

These statements are all afaik and I've done no actual testing.

Guía de contribución

Abrir la guía de contribución

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.

Línea de trabajo

El issue no menciona archivos, pruebas ni puntos de entrada. Empieza por localizar el manejo existente de decoration y descriptor-indexing en el compilador Rust-GPU y, después, aclara la semántica de uniformidad prevista y cómo debería validarse la compatibilidad entre las invocaciones de workgroup y subgroup.

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

Evaluación

Stack tecnológico
rust
Área
compilers
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.