Skip to content

Commit f30fb37

Browse files
committed
Add compatibility layers back
1 parent 7cc9524 commit f30fb37

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/upsample.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,15 @@ function ∇upsample_linear_kernel!(
380380
return dx
381381
end
382382

383+
# Compatibility layer for old versions of NNlibCUDA.
384+
# TODO Can be removed from NNlib 0.9.
385+
upsample_linear_wcn!(y, x) = upsample_linear_kernel!(y, x)
386+
upsample_bilinear_whcn!(y, x) = upsample_linear_kernel!(y, x)
387+
upsample_trilinear_whdcn!(y, x) = upsample_linear_kernel!(y, x)
388+
∇upsample_linear_wcn!(y, x) = ∇upsample_linear_kernel!(y, x)
389+
∇upsample_bilinear_whcn!(y, x) = ∇upsample_linear_kernel!(y, x)
390+
∇upsample_trilinear_whdcn!(y, x) = ∇upsample_linear_kernel!(y, x)
391+
383392
# Linear (CPU): parallelization along channel x batch dimensions.
384393

385394
@kernel function _upsample_linear_kernel!(::CPU, y::T, x::T, rwidth, align::Val{A}) where {

test/runtests.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ end
5656
if get(ENV, "NNLIB_TEST_AMDGPU", "false") == "true"
5757
import Pkg
5858
test_info = Pkg.project()
59+
# Add MIOpen_jll to AMDGPU.
5960
Pkg.develop("AMDGPU")
61+
Pkg.activate(joinpath(Pkg.devdir(), "AMDGPU"))
62+
Pkg.add("MIOpen_jll")
63+
Pkg.update()
6064
# Update test project.
6165
Pkg.activate(test_info.path)
6266
Pkg.update()
@@ -93,7 +97,6 @@ end
9397
if get(ENV, "NNLIB_TEST_AMDGPU", "false") == "true"
9498
import Pkg
9599
test_info = Pkg.project()
96-
97100
# Add MIOpen_jll to AMDGPU.
98101
Pkg.develop("AMDGPU")
99102
Pkg.activate(joinpath(Pkg.devdir(), "AMDGPU"))

0 commit comments

Comments
 (0)