Skip to content

Commit 5a13f3f

Browse files
committed
move occurences of using
Moved most occurences of `using` to the main source file
1 parent ea76be7 commit 5a13f3f

File tree

7 files changed

+5
-11
lines changed

7 files changed

+5
-11
lines changed

src/NNlib.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ using Requires
55
using ChainRulesCore
66
import ChainRulesCore: rrule
77
using Base.Broadcast: broadcasted
8+
using Base.Threads
9+
using Statistics
810
using Statistics: mean
11+
using LinearAlgebra
12+
using LinearAlgebra: BlasFloat, Transpose, Adjoint, AdjOrTransAbsMat
13+
using LinearAlgebra.BLAS: libblas, BlasInt, @blasfunc
914

1015
const IntOrIntTuple = Union{Integer, NTuple{N,<:Integer} where N}
1116
const Numeric = Union{AbstractArray{<:T}, T} where {T<:Number}

src/batched/batchedadjtrans.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using LinearAlgebra
2-
31
import Base: -
42
import Adapt: adapt_structure, adapt
53

src/batched/batchedmul.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using LinearAlgebra: BlasFloat, Transpose, Adjoint, AdjOrTransAbsMat
2-
31
_unbatch(A) = A
42
_unbatch(A::BatchedAdjOrTrans) = parent(A)
53

src/functions.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using NNlib: sigmoid
21
"""
32
glu(x, dim = 1)
43

src/gemm.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
## Low level gemm! call with pointers
22
## Borrowed from Knet.jl, adapted for compile-time constants
33

4-
using LinearAlgebra
5-
using LinearAlgebra.BLAS: libblas, BlasInt, @blasfunc
6-
74
using Compat: get_num_threads, set_num_threads # needs Compat 3.13, for any Julia < 1.6
85

96
"""

src/impl/conv_direct.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
## This file contains direct Julia implementations of 2d and 3d convolutions
2-
using Base.Threads
32

43
# Helper functions for restricting x/w overreach
54
function clamp_lo(x, w)

src/impl/pooling_direct.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using Statistics
2-
31
# Pooling is so similar, we abstract over meanpooling and maxpooling, simply replacing
42
# the inner loop operation and a few initialization parameters.
53
for name in (:max, :mean)

0 commit comments

Comments
 (0)