fermiqc / tblis.jl Goto Github PK
View Code? Open in Web Editor NEWJulia wrapper for TBLIS tensor contraction library.
License: MIT License
Julia wrapper for TBLIS tensor contraction library.
License: MIT License
It would be helpful to either import LinearAlgebra.mul!
or don't export TBLIS.mul!
, so that if someone is using both LinearAlgebra
and TBLIS
then the names don't conflict:
julia> using TBLIS
julia> using LinearAlgebra
julia> mul!(randn(2,2), randn(2,2), randn(2,2))
WARNING: both LinearAlgebra and TBLIS export "mul!"; uses of it in module Main must be qualified
ERROR: UndefVarError: mul! not defined
Stacktrace:
[1] top-level scope at REPL[3]:1
As a follow up to #6, a useful feature would be to make TBLIS.set_num_threads(n)
return the current number of threads, so that you could do:
original_tblis_threads = TBLIS.set_num_threads(4)
# Do a calculation with a 4 TBLIS threads
# Then reset to the original number of threads
TBLIS.set_num_threads(original_tblis_threads)
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
julia> C = rand(20,20);
julia> @benchmark begin
Co = C[:, 1:5]
@tensor D[u,v] = Co[u,m]*Co[v,m]
end
BenchmarkTools.Trial:
memory estimate: 1.02 KiB
allocs estimate: 6
--------------
minimum time: 1.159 μs (0.00% GC)
median time: 1.277 μs (0.00% GC)
mean time: 1.504 μs (5.31% GC)
maximum time: 405.935 μs (98.49% GC)
--------------
samples: 10000
evals/sample: 10
julia> @benchmark begin
Co = C[:, 1:5]
D = Fermi.contract(Co,Co,"um","vm")
end
BenchmarkTools.Trial:
memory estimate: 7.48 KiB
allocs estimate: 60
--------------
minimum time: 180.007 ms (0.00% GC)
median time: 301.769 ms (0.00% GC)
mean time: 277.387 ms (0.00% GC)
maximum time: 331.220 ms (0.00% GC)
--------------
samples: 19
evals/sample: 1
Some problem with the image.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.