JuliaSIMD / JuliaSIMD/LoopVectorization.jl
Turbo precondition checks
- Langage dominant
- Julia
- Étoiles
- 789
- Forks
- 73
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
The readme warns
> We expect that any time you use the `@turbo` macro with a given block of code that you:
>
> Are not indexing an array out of bounds. `@turbo` does not perform any bounds checking.
> Are not iterating over an empty collection. Iterating over an empty loop such as for i ∈ eachindex(Float64[]) is undefined behavior, and will likely result in the out of bounds memory accesses. Ensure that loops behave correctly.
> Are not relying on a specific execution order. `@turbo` can and will re-order operations and loops inside its scope, so the correctness cannot depend on a particular order. You cannot implement cumsum with `@turbo`.
> Are not using multiple loops at the same level in nested loops.
The docs also warn
> Broadcasting an Array A when size(A,1) == 1 is NOT SUPPORTED, unless this is known at compile time (e.g., broadcasting a transposed vector is fine).
I assume turbo can't check these preconditions at runtime for performance reasons. During testing and debugging, I want to check the preconditions. Is it possible to enable these checks in a certain mode?
I count five checks. Are some of them more costly than others?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par les passages du README et de la documentation qui décrivent les cinq préconditions de @turbo, puis examinez comment @turbo gère ces conditions pendant les tests ou le débogage. Déterminez si un mode peut activer des vérifications à l’exécution et documentez quelles vérifications sont réalisables ainsi que leurs coûts relatifs ; l’issue est terminée lorsque ce comportement et cette couverture sont clairement spécifiés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- julia
- Domaine
- performance
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100