Skip to content
This repository was archived by the owner on Mar 12, 2021. It is now read-only.

Commit 8dd5dfe

Browse files
authored
Merge pull request #609 from JuliaGPU/tb/clean_tests
Small test clean-ups.
2 parents cd171f6 + 519c532 commit 8dd5dfe

File tree

3 files changed

+122
-122
lines changed

3 files changed

+122
-122
lines changed

test/base.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,12 @@ end
9999
@test Array(Whatever{Int}.(CuArray([1]))) == Whatever{Int}.([1])
100100
end
101101

102-
@testset "Cufunc" begin
102+
@testset "cufunc" begin
103103
gelu1(x) = oftype(x, 0.5) * x * (1 + tanh(oftype(x, (2/π))*(x + oftype(x, 0.044715) * x^3)))
104104
sig(x) = one(x) / (one(x) + exp(-x))
105105
f(x) = gelu1(log(x)) * sig(x) * tanh(x)
106106
g(x) = x^7 - 2 * x^f(x^2) + 3
107107

108-
109108
CuArrays.@cufunc gelu1(x) = oftype(x, 0.5) * x * (1 + tanh(oftype(x, (2/π))*(x + oftype(x, 0.044715) * x^3)))
110109
CuArrays.@cufunc sig(x) = one(x) / (one(x) + exp(-x))
111110
CuArrays.@cufunc f(x) = gelu1(log(x)) * sig(x) * tanh(x)
@@ -115,10 +114,11 @@ end
115114
@test :sig CuArrays.cufuncs()
116115
@test :f CuArrays.cufuncs()
117116
@test :g CuArrays.cufuncs()
118-
@test testf((x) -> gelu1.(x), rand(3,3))
119-
@test testf((x) -> sig.(x), rand(3,3))
120-
@test testf((x) -> f.(x), rand(3,3))
121-
@test testf((x) -> g.(x), rand(3,3))
117+
118+
@test testf(x -> gelu1.(x), rand(3,3))
119+
@test testf(x -> sig.(x), rand(3,3))
120+
@test testf(x -> f.(x), rand(3,3))
121+
@test testf(x -> g.(x), rand(3,3))
122122
end
123123

124124
# https://github.com/JuliaGPU/CUDAnative.jl/issues/223

0 commit comments

Comments
 (0)