Skip to content

Commit df70552

Browse files
authored
Merge pull request #45 from FluxML/ap/patch
Missing Identity Activation Import
2 parents f84c02c + 4002114 commit df70552

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

ext/NNlibCUDA/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "NNlibCUDA"
22
uuid = "a00861dc-f156-4864-bf3c-e6376f28a68d"
3-
version = "0.2.4"
3+
version = "0.2.5"
44

55
[deps]
66
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

ext/NNlibCUDA/src/cudnn/activations.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
using Base.Broadcast
55
using CUDA.CUDNN: cudnnActivationForward!, cudnnOpTensor!,
66
CUDNN_ACTIVATION_TANH,CUDNN_ACTIVATION_SIGMOID,CUDNN_ACTIVATION_ELU,
7-
CUDNN_ACTIVATION_RELU,CUDNN_ACTIVATION_CLIPPED_RELU,CUDNN_OP_TENSOR_MAX
7+
CUDNN_ACTIVATION_RELU,CUDNN_ACTIVATION_CLIPPED_RELU,CUDNN_OP_TENSOR_MAX,
8+
CUDNN_ACTIVATION_IDENTITY
89

910
for (f, op) in [
1011
CUDA.tanh => (src,dst)->cudnnActivationForward!(dst, src, mode=CUDNN_ACTIVATION_TANH),

ext/NNlibCUDA/test/conv.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ using NNlib: DenseConvDims
88
@test ∇conv_data(c, b, cdims) collect(∇conv_data(dc, db, cdims))
99
@test ∇conv_filter(a, c, cdims) collect(∇conv_filter(da, dc, cdims))
1010

11+
# Test Conv Bias Activation
12+
bias = rand(Float64, 1, 1, 4, 1)
13+
dbias = CuArray(bias)
14+
@test conv_bias_act(a, b, cdims, bias, NNlib.relu) collect(conv_bias_act(da, db, cdims, dbias, NNlib.relu))
15+
@test conv_bias_act(a, b, cdims, bias, identity) collect(conv_bias_act(da, db, cdims, dbias, identity))
16+
1117
# Test for agreement between CPU NNlib and CuDNN versions, across a variety of kwargs
1218
options = Dict{Any, Any}.((
1319
(), (:dilation => 2), (:flipkernel => true), (:stride => 2),

0 commit comments

Comments
 (0)