Comments (3)
FWIW, the code generated by LinearAlgebra.exp
is pretty large:
julia> write("file.ll", sprint(io->code_llvm(io, LinearAlgebra.exp!, Tuple{Array{Float64, 2}};
optimize=false, debuginfo=:none, dump_module=true)))
shell> ls -lah *.ll
-rw-r--r-- 1 tim tim 529K May 21 13:51 1.10.ll
-rw-r--r-- 1 tim tim 1.7M May 21 13:54 1.11.ll
-rw-r--r-- 1 tim tim 1.8M May 21 13:53 1.12-broadcast.ll
-rw-r--r-- 1 tim tim 548K May 21 13:53 1.12-loop.ll
from julia.
Yes, #43200 makes it better:
-rw-r--r-- 1 kristoffercarlsson staff 1.8M May 21 14:44 exp_1.11.ll
-rw-r--r-- 1 kristoffercarlsson staff 491K May 21 14:36 exp_1.11_noinline.ll
but it doesn't seem to impact compilation time much:
# current
julia> @time @eval LinearAlgebra.exp!(rand(2,2))
1.988244 seconds (8.59 M allocations: 422.911 MiB, 4.09% gc time, 99.49% compilation time)
# no @inline
julia> @time @eval LinearAlgebra.exp!(rand(2,2))
2.040852 seconds (7.57 M allocations: 370.544 MiB, 3.47% gc time, 99.48% compilation time)
from julia.
I guss a question is, is it reasonable for
function f(A::StridedMatrix{T}) where T
CC = T[64764752532480000.,32382376266240000.,7771770303897600.,
1187353796428800., 129060195264000., 10559470521600.,
670442572800., 33522128640., 1323241920.,
40840800., 960960., 16380.,
182., 1.]
tmp1, tmp2 = similar(A), similar(A)
tmp1 .= CC[14].*A .+ CC[12].*A .+ CC[10].*A
tmp2 .= CC[8].*A .+ CC[6].*A .+ CC[4].*A
tmp1 .= CC[13].*A .+ CC[11].*A .+ CC[9].*A
tmp2 .= CC[7].*A .+ CC[5].*A .+ CC[3].*A
return tmp1, tmp2
end
write("file.ll", sprint(io->code_llvm(io, f, Tuple{Array{Float64, 2}};
optimize=false, debuginfo=:none, dump_module=true)))
to expand to 13k lines of LLVM IR+
from julia.
Related Issues (20)
- Document to use nightly Julia to contribute to the standard library HOT 2
- Over/underflow in complex power function
- Proposed Negation Default Broadcast Behavior HOT 4
- Dotplot not overlaying violin plot HOT 1
- Filenames on Windows in coverage output are missing drive letter HOT 2
- Add ability to specify multiple paths via --code-coverage=@<path>
- ^C inside pkg-add prompt causes assertion abort
- Argument destructuring returned from macro accidentally assigns global
- Potentially erring paths in matrix logarithms HOT 1
- `nm -D --with-symbol-versions` unreliable
- julia1.10.4 using CUDA ERROR: failed to parse TOML output from running "~/.julia/packages/CUDA_Runtime_jll/VNnmC/.pkg/select_artifacts.jl", got: TOML Parser error: none:1:7 error: expected equal sign after key
- Stack overflow during gc_read_stack on win32 HOT 2
- Make an `isdense` trait HOT 8
- `factorize(<:AbstractMatrix)` prefers `Cholesky` but `factorize(<:Hermitian)` prefers `BunchKaufman` HOT 2
- Concurrent program crashes 1.12 nightly build (1.10 is fine) HOT 1
- Intermittent segmentation fault while running CFITSIO tests on nightly HOT 2
- Conversion to pointer not defined for `Base.ReinterpretArray` on v1.11 and above HOT 2
- Julia Rejecting this target due to use of runtime-disabled feature HOT 3
- Base.PersistentDict/HAMT: rehashing is ineffective HOT 4
- suboptimal subtyping: tuple types vs unions of tuple types
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 julia.