Skip to content

Commit 3da5eff

Browse files
committed
Add attribution.
[ci skip]
1 parent 16d4dd6 commit 3da5eff

File tree

2 files changed

+37
-5
lines changed

2 files changed

+37
-5
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The CUDA.jl package is licensed under the MIT "Expat" License:
22

3-
> Copyright (c) 2019-2020: Julia Computing and other contributors
3+
> Copyright (c) 2019-present: Julia Computing and other contributors
44
> Copyright (c) 2014-2018: Tim Besard
55
> Copyright (c) 2013: Dahua Lin
66
>

src/nnlib.jl

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,43 @@ Base.unsafe_convert(::Type{CuPtr{T}}, A::NNlib.BatchedAdjOrTrans{T}) where {T} =
3535
# Upsampling
3636
#
3737

38-
# An implementation for GPU based bilinear upsampling including its gradient
38+
# GPU based bilinear upsampling including its gradient
39+
#
40+
# Based on the Caffe2 implementation at:
3941
# The code is a translation from the following files:
40-
# https://github.com/pytorch/pytorch/blob/master/caffe2/operators/upsample_op.cu
41-
# https://github.com/pytorch/pytorch/blob/master/caffe2/core/common_gpu.h
42+
# - https://github.com/pytorch/pytorch/blob/v1.8.0-rc1/caffe2/operators/upsample_op.cu
43+
# - https://github.com/pytorch/pytorch/blob/v1.8.0-rc1/caffe2/core/common_gpu.h
44+
#
45+
# Copyright (c) 2016-2021 Facebook Inc.
46+
# Copyright (c) 2015 Google Inc.
47+
# Copyright (c) 2015 Yangqing Jia
48+
# Copyright 2019-2020 Kakao Brain
49+
#
50+
# All rights reserved.
51+
#
52+
# Redistribution and use in source and binary forms, with or without modification, are
53+
# permitted provided that the following conditions are met:
54+
#
55+
# 1. Redistributions of source code must retain the above copyright notice, this list of
56+
# conditions and the following disclaimer.
57+
#
58+
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of
59+
# conditions and the following disclaimer in the documentation and/or other materials
60+
# provided with the distribution.
61+
#
62+
# 3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America and
63+
# IDIAP Research Institute nor the names of its contributors may be used to endorse or
64+
# promote products derived from this software without specific prior written permission.
65+
#
66+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
67+
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
68+
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
69+
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
70+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
71+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
72+
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
73+
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
74+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4275

4376
# Forward and backward pass have been tested to produce the same output
4477
# as pytorch with align_corners=True - it works modulo bit noise.
@@ -124,7 +157,6 @@ function ∇upsample_bilinear_whcn_kernel!(n_elem, rheight, rwidth, Δ, dx)
124157
return nothing
125158
end
126159

127-
128160
function NNlib.upsample_bilinear_whcn!(y::CuArray{T,4}, x::CuArray{T,4}) where T
129161
w,h,c,n = size(x)
130162
out_w, out_h = (size(y,1), size(y,2))

0 commit comments

Comments
 (0)