Skip to content

Commit 4f9f9f0

Browse files
committed
Cap non-reduction unrolling at 4, updated dependency versions.
1 parent acf388a commit 4f9f9f0

File tree

5 files changed

+33
-14
lines changed

5 files changed

+33
-14
lines changed

Manifest.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
6161

6262
[[SIMDPirates]]
6363
deps = ["MacroTools", "VectorizationBase"]
64-
git-tree-sha1 = "6c6a77a41c846c08c61a0e556183a9c33b53e3d1"
64+
git-tree-sha1 = "c0f42ddb2645c54b8620979df5dc979c4742db59"
6565
uuid = "21efa798-c60a-11e8-04d3-e1a92915a26a"
66-
version = "0.1.3"
66+
version = "0.1.4"
6767

6868
[[SLEEFPirates]]
6969
deps = ["SIMDPirates", "VectorizationBase"]
70-
git-tree-sha1 = "1c5b6827da87a12bdb7a4c893f44c3adbce3389d"
70+
git-tree-sha1 = "547bcf7d30967d87d4c62b3fe5efdb0e57a6e436"
7171
uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa"
72-
version = "0.1.1"
72+
version = "0.1.2"
7373

7474
[[Serialization]]
7575
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
@@ -83,6 +83,6 @@ uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
8383

8484
[[VectorizationBase]]
8585
deps = ["CpuId", "LinearAlgebra"]
86-
git-tree-sha1 = "54f5ba672c7d684fb0312825721368e22354ecd5"
86+
git-tree-sha1 = "bb905673925d36d1bf4693a114687d56723d5991"
8787
uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
88-
version = "0.1.5"
88+
version = "0.1.6"

Project.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
1414
[compat]
1515
MacroTools = "0.5"
1616
Parameters = "0.12.0"
17-
SIMDPirates = "0.1.3"
18-
SLEEFPirates = "0.1.1"
19-
VectorizationBase = "0.1.5"
17+
SIMDPirates = "0.1.4"
18+
SLEEFPirates = "0.1.2"
19+
VectorizationBase = "0.1.6"
2020
julia = "1.3.0"
2121

2222
[extras]

benchmark/benchmarks.jl

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11

22
using BenchmarkTools
33

4-
suite = BenchmarkGroup()
5-
suite["linalg"] = BenchmarkGroup(["matmul","dot"])
4+
const SUITE = BenchmarkGroup()
5+
SUITE["linalg"] = BenchmarkGroup(["matmul","dot"])
66

77
include(joinpath(@__DIR__, "looptests.jl"))
88

9-
for n 1:256
10-
9+
SUITE["linalg"]["matmul"] = BenchmarkGroup()
10+
SUITE["linalg"]["dot"] = BenchmarkGroup()
11+
for n 1:64
12+
A = rand(n,n);
13+
A′ = copy(A');
14+
B = rand(n,n);
15+
C = Matrix{Float64}(undef, n, n);
16+
SUITE["linalg"]["matmul"]["AmulB", n] = @benchmarkable gemmavx!($C, $A, $B)
17+
SUITE["linalg"]["matmul"]["A′mulB", n] = @benchmarkable jAtmulBavx!($C, $A′, $B)
18+
x = rand(n); y = rand(n);
19+
SUITE["linalg"]["dot"]["dot", n] = @benchmarkable jdotavx($x, $y)
20+
SUITE["linalg"]["dot"]["selfdot", n] = @benchmarkable jselfdotavx($x)
21+
SUITE["linalg"]["dot"]["dot3", n] = @benchmarkable jdot3avx($x, $A, $y)
1122
end
23+
24+

src/determinestrategy.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function unroll_no_reductions(ls, order, vectorized, Wshift, size_T)
125125
end
126126
# heuristic guess
127127
# @show compute_rt, load_rt
128-
min(2, round(Int, (compute_rt + load_rt + 1) / compute_rt))
128+
min(4, round(Int, (compute_rt + load_rt + 1) / compute_rt))
129129
end
130130
function determine_unroll_factor(
131131
ls::LoopSet, order::Vector{Symbol}, unrolled::Symbol, vectorized::Symbol = first(order)

test/runtests.jl

+6
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,12 @@ end
483483
fill!(c2, 99999.9);
484484
@avx @. c2 = a + bl;
485485
@test c1 c2
486+
br = reshape(b, (1,100,100));
487+
bl = LowDimArray{(false,true,true)}(br);
488+
@. c1 = a + br;
489+
fill!(c2, 99999.9);
490+
@avx @. c2 = a + bl;
491+
@test c1 c2
486492

487493
a = rand(T, M); B = rand(T, M, N); c = rand(T, N); c′ = c';
488494
d1 = @. a + B * c′;

0 commit comments

Comments
 (0)