Skip to content

Commit

Permalink
Speed up tests (#447)
Browse files Browse the repository at this point in the history
* reduce size of kernel matrices in test_interface

* make MOKernel test_interface actually have multiple outputs

* patch bump
  • Loading branch information
st-- authored Apr 13, 2022
1 parent 2162032 commit 6294d1d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "KernelFunctions"
uuid = "ec8451be-7e33-11e9-00cf-bbf324bd1392"
version = "0.10.35"
version = "0.10.36"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
28 changes: 14 additions & 14 deletions src/test_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ function test_interface(
rng::AbstractRNG, k::Kernel, ::Type{Vector{T}}; kwargs...
) where {T<:Real}
return test_interface(
k, randn(rng, T, 1001), randn(rng, T, 1001), randn(rng, T, 1000); kwargs...
k, randn(rng, T, 11), randn(rng, T, 11), randn(rng, T, 13); kwargs...
)
end

function test_interface(
rng::AbstractRNG, k::MOKernel, ::Type{Vector{Tuple{T,Int}}}; dim_out=1, kwargs...
rng::AbstractRNG, k::MOKernel, ::Type{Vector{Tuple{T,Int}}}; dim_out=3, kwargs...
) where {T<:Real}
return test_interface(
k,
[(randn(rng, T), rand(rng, 1:dim_out)) for i in 1:51],
[(randn(rng, T), rand(rng, 1:dim_out)) for i in 1:51],
[(randn(rng, T), rand(rng, 1:dim_out)) for i in 1:50];
[(randn(rng, T), rand(rng, 1:dim_out)) for i in 1:11],
[(randn(rng, T), rand(rng, 1:dim_out)) for i in 1:11],
[(randn(rng, T), rand(rng, 1:dim_out)) for i in 1:13];
kwargs...,
)
end
Expand All @@ -115,9 +115,9 @@ function test_interface(
) where {T<:Real}
return test_interface(
k,
ColVecs(randn(rng, T, dim_in, 1001)),
ColVecs(randn(rng, T, dim_in, 1001)),
ColVecs(randn(rng, T, dim_in, 1000));
ColVecs(randn(rng, T, dim_in, 11)),
ColVecs(randn(rng, T, dim_in, 11)),
ColVecs(randn(rng, T, dim_in, 13));
kwargs...,
)
end
Expand All @@ -127,9 +127,9 @@ function test_interface(
) where {T<:Real}
return test_interface(
k,
RowVecs(randn(rng, T, 1001, dim_in)),
RowVecs(randn(rng, T, 1001, dim_in)),
RowVecs(randn(rng, T, 1000, dim_in));
RowVecs(randn(rng, T, 11, dim_in)),
RowVecs(randn(rng, T, 11, dim_in)),
RowVecs(randn(rng, T, 13, dim_in));
kwargs...,
)
end
Expand All @@ -139,9 +139,9 @@ function test_interface(
) where {T<:Real}
return test_interface(
k,
[randn(rng, T, dim_in) for _ in 1:1001],
[randn(rng, T, dim_in) for _ in 1:1001],
[randn(rng, T, dim_in) for _ in 1:1000];
[randn(rng, T, dim_in) for _ in 1:11],
[randn(rng, T, dim_in) for _ in 1:11],
[randn(rng, T, dim_in) for _ in 1:13];
kwargs...,
)
end
Expand Down

2 comments on commit 6294d1d

@st--
Copy link
Member Author

@st-- st-- commented on 6294d1d Apr 13, 2022

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/58437

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.10.36 -m "<description of version>" 6294d1d60f493af36069cbc88ef62592a9b1d713
git push origin v0.10.36

Please sign in to comment.