Comments (4)
And using LoopVectorization 0.12.125, the same code on the same data only takes 1.206 ms. I will post an MWE later today.
from loopvectorization.jl.
Version 0.12.129 is the last version without the warning (and the speed is obviously faster). Looking at the release notes, I'm not sure which function
can_turbo
determines to befalse.
That would be good to know. It obviously has a false positive.
It'd be helpful to get a message notifying why it didn't work...
from loopvectorization.jl.
Thanks for the reply! Below is the code to reproduce the warning:
using LoopVectorization
using BenchmarkTools
symbols = [:a1, :a2, :bh, :bhk, :gh, :ghk, :itap, :itap2, :phi, :u, :v1, :v2, :a1_rhs, :a2_rhs, :v1_rhs, :v2_rhs];
Nelem = 88_900;
for sym in symbols
@eval $sym = rand(Nelem);
end
function g_update_kernel_Line!(a1, a2, bh, bhk, gh, ghk, itap, itap2, phi, u, v1, v2, a1_rhs, a2_rhs, v1_rhs, v2_rhs)
@turbo @. a1_rhs = u*(-itap*v1*v2*(-bhk*sin(-a1 + a2 + phi) + ghk*cos(-a1 + a2 + phi)) + itap2*v1^2 *(gh + ghk))
@turbo @. a2_rhs = u*(-itap*v1*v2*(bhk*sin(-a1 + a2 + phi) + ghk*cos(-a1 + a2 + phi)) + v2^2 *(gh + ghk))
@turbo @. v1_rhs = u*(-itap*v1*v2*(-bhk*cos(-a1 + a2 + phi) - ghk*sin(-a1 + a2 + phi)) - itap2*v1^2 *(bh + bhk))
@turbo @. v2_rhs = u*(itap*v1*v2*(bhk*cos(-a1 + a2 + phi) - ghk*sin(-a1 + a2 + phi)) - v2^2 *(bh + bhk))
nothing
end
@btime g_update_kernel_Line!($a1, $a2, $bh, $bhk, $gh, $ghk, $itap, $itap2,
$phi, $u, $v1, $v2, $a1_rhs, $a2_rhs, $v1_rhs, $v2_rhs)
On my device, it gets
- 0.12.129: 1.2 ms
- 0.12.130: 6.9 ms (with warning)
But this code does not reproduce the slow down reported in my second post. I will wait for a possible fix and see if the slow down goes away.
from loopvectorization.jl.
Thanks for the new release! Please disregard the issue reported in my reply. The performance is now back with 0.12.133.
from loopvectorization.jl.
Related Issues (20)
- `vtrunc(::Float64)` issue HOT 3
- Strange compile behavior for @turbo HOT 2
- is it possible to set @turbo thread = true/false at runtime? HOT 3
- LoopVectorization fail to compile on julia 32bit REPL
- AssertionError: M == 1 HOT 9
- Inconsistent results w/ and w/o @turbo HOT 6
- vfilter with multiple conditions HOT 2
- Memory corruption HOT 2
- Incorrect results using @turbo with linear array indexing HOT 1
- Weird/inconsistent behavior with constant lhs indexing inside @turbo loop HOT 2
- Suboptimal Choice of the Vecotrization Level for Image Convolution HOT 1
- Performance for stride 2
- Bad IR generation triggers assertion failure on 1.11
- Release v0.12.167 breaks RecursiveFactorization on Julia v1.11+ HOT 12
- LoopVectorization.jl causing segfaults on 1.11 HOT 5
- type inference issue with vectors if ints and floats in julia 1.10 HOT 3
- LoadError: BoundsError: attempt to access 2-element Vector{LoopVectorization.ArrayReferenceMeta} at index [0] HOT 1
- Reduction not found HOT 2
- Safety of generating random numbers HOT 2
- Problem/error in execution order
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopvectorization.jl.