JuliaSIMD / JuliaSIMD/LoopVectorization.jl
Turbo precondition checks
- Vorherrschende Sprache
- Julia
- Sterne
- 789
- Forks
- 73
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start with the README and documentation passages describing the five @turbo preconditions, then inspect how @turbo handles those conditions during testing or debugging. Determine whether a mode can enable runtime checks and document which checks are feasible and their relative costs; the issue is done when that behavior and coverage are clearly specified.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- julia
- Bereich
- performance
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100