Comments (3)
Thanks for the report, and for narrowing it down.
I think I see what's going on now. My fix for #46 was to interpolate many basic functions, which results in this:
julia> :(zero(T)) |> dump
Expr
head: Symbol call
args: Array{Any}((2,))
1: Symbol zero
2: Symbol T
julia> :($zero(T)) |> dump
Expr
head: Symbol call
args: Array{Any}((2,))
1: zero (function of type typeof(zero))
2: Symbol T
And LoopVectorization doesn't like that at all:
lex1 = quote
@avx for i in 1:10
acc = zero(T)
for j in 1:10
acc += A[i,j]
end
B[i] = acc
end
end
lex2 = quote
@avx for i in 1:10
acc = $zero(T)
for j in 1:10
acc += A[i,j]
end
B[i] = acc
end
end
macroexpand(Main, lex1) # ok
macroexpand(Main, lex2) # MethodError: no method matching instruction!(::LoopVectorization.LoopSet, ::typeof(zero))
The error during expansion is caught, so you get only the slow Base version:
julia> using Tullio, LoopVectorization
julia> A, B, C = rand(9,9), rand(9,9), rand(9,9);
julia> @tullio C[i, j] = A[i, k] * B[k, j] grad=false verbose=1;
┌ Warning: LoopVectorization failed
│ err =
│ LoadError: MethodError: no method matching instruction!(::LoopVectorization.LoopSet, ::typeof(zero))
...
I'm not sure which side the fix should be on. Perhaps I should undo some of these interpolations in the meantime.
from tullio.jl.
Ah of course. Yeah, this is a good example of a way in which LoopVectorization.jl is operating kinda at the wrong level of abstraction. Hopefully we can remedy this with the new compiler technology, but that'll have to wait and see...
from tullio.jl.
I'm going to mark this as closed, since I think v0.2.10 fixes it.
And will make a note to check that any further work on #46 doesn't break this!
from tullio.jl.
Related Issues (20)
- HybridArrays HOT 9
- Runtime dispatch when reducing to scalar
- Alternative to Tullio for Chained Multiplication HOT 4
- @views macro causes module compilation failure HOT 3
- Reporting a bug when Tullio being included with LoopVectorization HOT 1
- [Question] Is it possible to create a vector of SVectors from a Matrix using Tullio? HOT 2
- [Question] How to change summation order? HOT 5
- Use package extensions HOT 1
- How finalizers `|>` work HOT 5
- Method error when broadcast and sum of matrices HOT 1
- GPU Kernel Compilation Failed with Interpolations HOT 2
- Upgrade to CUDA.CUDAKernels HOT 9
- Bug when using Tullio + LoopVectorization HOT 5
- Add Finch.jl backend HOT 4
- CUDA v4 support HOT 2
- Using threads, vs setting threads=false gives different result HOT 3
- Issue with vectorized functions on GPU HOT 3
- Error when specifying the range of an index with a UnitRange HOT 4
- Scalar indexing with CUDA HOT 10
- Please update dep of FillArrays to v1.
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 tullio.jl.