Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KernelFunctions on Julia 1.3 #554

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.3'
- '1'
- '1.6'
- 'nightly'
os:
- ubuntu-latest
Expand Down
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.63"
version = "0.10.64"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
6 changes: 3 additions & 3 deletions src/chainrules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
d̄ = ChainRulesCore.Tangent{typeof(d)}(; r=r̄)
return NoTangent(), d̄, @thunk(project_x(x̄))
end
return Distances.pairwise(d, x; dims), pairwise_pullback
return Distances.pairwise(d, x; dims=dims), pairwise_pullback

Check warning on line 156 in src/chainrules.jl

View check run for this annotation

Codecov / codecov/patch

src/chainrules.jl#L156

Added line #L156 was not covered by tests
end

function ChainRulesCore.rrule(
Expand Down Expand Up @@ -190,7 +190,7 @@
d̄ = ChainRulesCore.Tangent{typeof(d)}(; r=r̄)
return NoTangent(), d̄, @thunk(project_x(x̄)), @thunk(project_y(ȳ))
end
return Distances.pairwise(d, x, y; dims), pairwise_pullback
return Distances.pairwise(d, x, y; dims=dims), pairwise_pullback

Check warning on line 193 in src/chainrules.jl

View check run for this annotation

Codecov / codecov/patch

src/chainrules.jl#L193

Added line #L193 was not covered by tests
end

function ChainRulesCore.rrule(
Expand Down Expand Up @@ -229,7 +229,7 @@
"or because some external computation has acted on `ColVecs` to produce a vector of vectors." *
"In the former case, to solve this issue overload `kernelmatrix(_diag)` for your kernel for `ColVecs`." *
"In the latter case, one needs to track down the `rrule` whose pullback returns a `Vector{Vector{T}}`," *
" rather than a `Tangent`, as the cotangent / gradient for `ColVecs` input, and circumvent it."
" rather than a `Tangent`, as the cotangent / gradient for `ColVecs` input, and circumvent it.",
)
end
return ColVecs(X), ColVecs_pullback
Expand Down
2 changes: 1 addition & 1 deletion test/test_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ function test_zygote_perf_heuristic(
f, name::String, args1, args2, passes, Δ1=nothing, Δ2=nothing
)
@testset "$name" begin
primal, fwd, pb = ad_constant_allocs_heuristic(f, args1, args2; Δ1, Δ2)
primal, fwd, pb = ad_constant_allocs_heuristic(f, args1, args2; Δ1=Δ1, Δ2=Δ2)
if passes[1]
@test primal[1] == primal[2]
else
Expand Down
Loading