Skip to content

Commit

Permalink
Bump deps to support some BitMatrix ops, and add tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Mar 31, 2020
1 parent e390c17 commit a361f17
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
8 changes: 4 additions & 4 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[SIMDPirates]]
deps = ["VectorizationBase"]
git-tree-sha1 = "53c43af0172c24b0783bd93650bd8b78afb3e57b"
git-tree-sha1 = "adbd979a7bc7e83efabd60c34ff118788653955a"
uuid = "21efa798-c60a-11e8-04d3-e1a92915a26a"
version = "0.7.5"
version = "0.7.6"

[[SLEEFPirates]]
deps = ["Libdl", "SIMDPirates", "VectorizationBase"]
Expand All @@ -69,6 +69,6 @@ version = "0.1.0"

[[VectorizationBase]]
deps = ["CpuId", "LinearAlgebra"]
git-tree-sha1 = "2a83ab02d3fb6ad5de0c6d04103b0ca403d9a7d8"
git-tree-sha1 = "d0edd2aec08b18d39929f088c44873e2138e5be2"
uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
version = "0.9.5"
version = "0.9.6"
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LoopVectorization"
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
authors = ["Chris Elrod <[email protected]>"]
version = "0.6.25"
version = "0.6.26"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -13,10 +13,10 @@ VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"

[compat]
OffsetArrays = "1"
SIMDPirates = "0.7.5"
SIMDPirates = "0.7.6"
SLEEFPirates = "0.4"
UnPack = "0"
VectorizationBase = "0.9.5"
VectorizationBase = "0.9.6"
julia = "1.1"

[extras]
Expand Down
6 changes: 3 additions & 3 deletions src/determinestrategy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,13 @@ function solve_tilesize(X, R, UL, TL)
c = -RR*R[1]*X[3]
discriminant = b^2 - 4a*c
discriminant < 0 && return -1,-1,Inf
Ufloat = (sqrt(discriminant) - b) / (2a)
Tfloat = (RR - max(1.0,Ufloat)*R[2])/(max(1.0,Ufloat)*R[1])
Ufloat = max(1.0, (sqrt(discriminant) - b) / (2a)) # must be at least 1
Tfloat = (RR - Ufloat*R[2])/(Ufloat*R[1])
if !(isfinite(Tfloat) && isfinite(Ufloat))
return 4, 4, tile_cost(X, 4, 4, UL, TL)
# return itertilesize(X, UL, TL)
end
Ulow = max(1, floor(Int, Ufloat)) # must be at least 1
Ulow = floor(Int, Ufloat)
Tlow = max(1, floor(Int, Tfloat)) # must be at least 1
Uhigh = Ulow + 1 #ceil(Int, Ufloat)
Thigh = Tlow + 1 #ceil(Int, Tfloat)
Expand Down
6 changes: 6 additions & 0 deletions test/gemm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,12 @@
@test C C2
fill!(C, 9999.999); gemm_accurate!(C, At', Bt');
@test C C2
Abit = A .> 0.5
fill!(C, 9999.999); AmulBavx1!(C, Abit, B)
@test C Abit * B
Bbit = B .> 0.5
fill!(C, 9999.999); AmulBavx1!(C, A, Bbit)
@test C A * Bbit
end
@time @testset "_avx $T dynamic gemm" begin
AmulB_avx1!(C, A, B)
Expand Down
9 changes: 8 additions & 1 deletion test/gemv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ using Test
for T (Float32, Float64, Int32, Int64)
@show T, @__LINE__
TC = sizeof(T) == 4 ? Float32 : Float64
R = T <: Integer ? (T(1):T(1000)) : T
R = T <: Integer ? (T(-1000):T(1000)) : T

A = rand(R, M, K);
x = rand(R, K);
Expand All @@ -164,6 +164,13 @@ using Test
mygemvavx_range!(y2, A, x)
@test y1 y2

Abit = A .> 0.5
fill!(y2, -999.9); mygemv_avx!(y2, Abit, x)
@test y2 Abit * x
xbit = x .> 0.5
fill!(y2, -999.9); mygemv_avx!(y2, A, xbit)
@test y2 A * xbit

B = rand(R, N, N);
G1 = Matrix{TC}(undef, N, 1);
G2 = similar(G1);
Expand Down

2 comments on commit a361f17

@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/11903

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.6.26 -m "<description of version>" a361f17b3c40b15f157cc3728b4841f6411848a2
git push origin v0.6.26

Please sign in to comment.