Skip to content

Commit

Permalink
Update SIMDPirates version and correctly calculate loopdependencies o…
Browse files Browse the repository at this point in the history
…f variables marked as possible reductions that are not.
  • Loading branch information
chriselrod committed Apr 19, 2020
1 parent 80dad59 commit 5795539
Show file tree
Hide file tree
Showing 22 changed files with 40 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
[compat]
DocStringExtensions = "0.8"
OffsetArrays = "1"
SIMDPirates = "0.7.13"
SIMDPirates = "0.7.14"
SLEEFPirates = "0.4.4"
UnPack = "0"
VectorizationBase = "0.10.4"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/driver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ logdettriangle_bench = benchmark_logdettriangle(sizes)

v = 1
filetype = "svg"
const PICTURES = joinpath(pkgdir("LoopVectorization"), "docs", "src", "assets")
const PICTURES = joinpath(pkgdir(LoopVectorization), "docs", "src", "assets")
save(joinpath(PICTURES, "bench_filter2d_dynamic_v$v.$filetype"), plot(filter2d_dynamic_bench));
save(joinpath(PICTURES, "bench_filter2d_3x3_v$v.$filetype"), plot(filter2d_3x3_bench));
save(joinpath(PICTURES, "bench_filter2d_unrolled_v$v.$filetype"), plot(filter2d_unrolled_bench));
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/bench_AmulB_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_AmulBt_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_Amulvb_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_AplusAt_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_AtmulB_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_AtmulBt_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_Atmulvb_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_aplusBc_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_dot3_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_dot_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_exp_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_filter2d_3x3_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_filter2d_dynamic_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_filter2d_unrolled_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_logdettriangle_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_random_access_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_selfdot_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/assets/bench_sse_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/add_compute.jl
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ function add_compute!(
# parent = getop(ls, var, elementbytes)
if length(reduceddeps) == 0
insert!(vparents, reduction_ind, parent)
mergesetv!(deps, loopdependencies(parent))
op = Operation(length(operations(ls)), var, elementbytes, instruction(ls,instr), compute, deps, reduceddeps, vparents)
pushop!(ls, op, var)
else
Expand Down
19 changes: 19 additions & 0 deletions test/miscellaneous.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,20 @@ using Test
end
end

function setcolumstovectorplus100!(Z::AbstractArray{T}, A) where {T}
for i = axes(A,1), j = axes(Z,2)
acc = zero(T)
acc = acc + A[i] + 100
Z[i, j] = acc
end
end
function setcolumstovectorplus100avx!(Z::AbstractArray{T}, A) where {T}
@avx for i = axes(A,1), j = axes(Z,2)
acc = zero(T)
acc = acc + A[i] + 100
Z[i, j] = acc
end
end

function mvp(P, basis, coeffs::Vector{T}) where {T}
len_c = length(coeffs)
Expand Down Expand Up @@ -557,6 +571,11 @@ using Test
@test dot3v2avx(x, A, y) d3
@test dot3_avx(x, A, y) d3

A2 = similar(A);
setcolumstovectorplus100!(A, x)
setcolumstovectorplus100avx!(A2, x)
@test A == A2

maxdeg = 20; nbasis = 1_000; dim = 15;
r = T == Float32 ? (Int32(1):Int32(maxdeg+1)) : (1:maxdeg+1)
basis = rand(r, (dim, nbasis));
Expand Down

2 comments on commit 5795539

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/13294

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.0 -m "<description of version>" 5795539d8f7d0959fe1ee9fb2c2512d7e5fd4661
git push origin v0.7.0

Please sign in to comment.