[proposal] Add syntax for expressing priority of FMV target expressions
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
El issue no nombra archivos de implementación, pruebas ni puntos de entrada. Empieza revisando la sintaxis propuesta para target_clone y target_version y los dos enfoques de prioridad; se considera terminado cuando se haya acordado una sintaxis concreta y unas reglas de prioridad, y después se hayan identificado las ubicaciones de implementación y de pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
This proposal adds support for explicitly expressing the priority of function versions, in the target strings.
Example use case
For the case below, the default ordering has the sve feature as higher priority then dotprod, meaning for a target with both sve and dotprod the sve version would be selected. However, it may be that the dotprod version should be priority in this case.
typedef struct {
int x;
int y;
int z;
int w;
} Vec4;
[[target_clone("default", "sve")]]
Vec4 dotproduct (Vec4 a, Vec4 b)
{
// do a dot product
}
[[target_version("dotprod")]]
Vec4 dotproduct (Vec4 a, Vec4 b)
{
// Use dotprod intrinsics
}
Motivation
This enhancement was a natural result of considering the version priority rules. In specifying the default ordering, cases such as above, arose where the default priority rules would be a poor choice.
Possible solutions
There are several ways to solve this.
1. Add dummy features "priorityA", "priorityB", ...,
These features would have no effect on the versioned function, other than to change how they are ordered.
These versions would be higher priority than any other feature, so would override any default ordering.
Then the above would be:
typedef struct {
int x;
int y;
int z;
int w;
} Vec4;
[[target_clone("default", "sve")]]
Vec4 dotproduct (Vec4 a, Vec4 b)
{
// do a dot product
}
[[target_version("dotprod+priorityA")]]
Vec4 dotproduct (Vec4 a, Vec4 b)
{
// Use dotprod intrinsics
}
Could also use "priority1", "priority2", ...
This is similar to what was done for other targets (https://github.com/riscv-non-isa/riscv-c-api-doc/pull/85/files).
2. Label all the versions of a function
Another option is too support explicitly stating the order of all versions.
Something like:
typedef struct {
int x;
int y;
int z;
int w;
} Vec4;
[[target_clone("P3:default", "P2:sve")]]
Vec4 dotproduct (Vec4 a, Vec4 b)
{
// do a dot product
}
[[target_version("P1:dotprod")]]
Vec4 dotproduct (Vec4 a, Vec4 b)
{
// Use dotprod intrinsics
}
This seems like it introduces many more edge cases and complexity over suggestion 1 with little gain other than explicitness.
- Lenguaje dominante
- Python
- Estrellas
- 129
- Forks
- 77
- Merge medio
- 8 d 12 h
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ARM-software/acle
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ARM-software/acle#464 · 1 comentario ·
-
[BUG] Reinterpret cast (vreinterpret*) table has 10 missing rows and 2 incorrect rows for AArch32Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ARM-software/acle#442 ·
-
[proposal] __ARM_FEATURE_DITAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
ARM-software/acle#463 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
ARM-software/acle#436 ·
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 48/100
ARM-software/acle#426 ·
Todos los issues de ARM-software/acle
Issues similares
-
Claiming namespace apexdevAbiertonamespace operations
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
EclipseFdn/open-vsx.org#13737 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
zhuima/awesome-cloudflare#237 ·
-
Zero-token evaluations are treated as missing cost in selectionPosiblemente ocupada @sylvesterkaczmarek la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
google-research/rrsi#6 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
aws-samples/sample-aws-genai-db-modernizer#294 ·
Los mantenedores suelen responder en 1 día
-
feedback simulation workshop
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
githubnext/gh-aw-workshop#4174 ·
Los mantenedores suelen responder en 1 día