Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Smart and user-controllable automatic Constant memory space placement for `static` variables

Abierto
#218 12 comentarios 0 reacciones 0 asignados Ver en GitHub

@distributedstatemachine ya está trabajando en esto.

Desde el 22/6/2025.

Evaluación

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

Línea de trabajo

Comienza revisando el PR #217 y la lógica actual de colocación en constant memory que modificó. El issue no menciona archivos ni tests, así que sigue los puntos de entrada de codegen de ese pull request y estudia Rust project-goals issue #254. Para darlo por terminado, se requiere un diseño acordado para la colocación automática, el packing, el spilling, los límites manuales y los controles del usuario.

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

Descripción

enhancement good first issue help wanted

https://github.com/Rust-GPU/Rust-CUDA/pull/217 made codegen default to not using constant memory with an opt-in flag. But in the interest of performance we should try to use constant memory automatically as much as possible.

As it is, using the flag / turning on constant memory can blow up as constant memory placing logic isn't fully correct. Ideally we keep track of what we have put into constant memory and when it is filled up spill instead of only spilling when a static is too large on its own. We should also sometimes hard error rather than spilling...for example, if you annotate a bunch of things over the limit manually, the last annotation should fail at compile time.

We'll also probably want some packing strategy controlled by the user...for example, if you have one large static and many small ones, you might want the small ones to all be in constant memory or just the big one depending on your workload. We need some design work around this, and the design shouldn't require code to be annotated to support third party non-GPU-aware libraries.

Some designs off the top of my head:

  • Pack blindly by default, use the existing flag to turn automatic off and then rely on annotations and flags (?) to place. The flags could have a type name / path or an entire crate.
  • Different built-in packing and spilling strategies controlled by flags (largest first, smallest first, etc)
  • Use https://github.com/rust-lang/rust-project-goals/issues/254 to hand control to user code?
Lenguaje dominante
Rust
Estrellas
5.4k
Forks
251
Merge medio
4 d 15 h
PR fusionados (30 d)
4

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 Rust-GPU/rust-cuda

Todos los issues de Rust-GPU/rust-cuda

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.