diff --git a/Project.toml b/Project.toml index 01ab63ea..d6f79c5d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LuxLib" uuid = "82251201-b29d-42c6-8e01-566dec8acb11" authors = ["Avik Pal and contributors"] -version = "0.3.30" +version = "0.3.31-DEV" [deps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" diff --git a/src/utils.jl b/src/utils.jl index 12eeae4f..e5519d7c 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -5,9 +5,8 @@ return ntuple(i -> i == N - 1 ? ly : 1, N) elseif N > 2 && ly == sx[N - 1] * sx[N - 2] return ntuple(i -> i == (N - 1) || i == (N - 2) ? sx[i] : 1, N) - else - throw(ArgumentError("Invalid Dimensions!")) end + throw(ArgumentError("Invalid Dimensions!")) end CRC.@non_differentiable _get_reshape_dims(::Any...) @@ -194,6 +193,8 @@ __value(::Type{T}) where {T <: Number} = T __value(x::ForwardDiff.Dual) = ForwardDiff.value(x) __value(x::AbstractArray{<:ForwardDiff.Dual}) = ForwardDiff.value.(x) -__value(::Type{<:ForwardDiff.Dual{Tag, T}}) where {Tag, T} = LuxLib.__value(T) +__value(::Type{<:ForwardDiff.Dual{Tag, T}}) where {Tag, T} = __value(T) + +__value(::Nothing) = nothing __aos_to_soa(x::AbstractArray) = x # FIXME: Upstream this to ArrayInterface.jl diff --git a/test/others/qa_tests.jl b/test/others/qa_tests.jl index f49ea740..c975375b 100644 --- a/test/others/qa_tests.jl +++ b/test/others/qa_tests.jl @@ -1,7 +1,10 @@ @testitem "Aqua: Quality Assurance" tags=[:others] begin using Aqua - Aqua.test_all(LuxLib) + Aqua.test_all(LuxLib; ambiguities=false, piracies=false) + Aqua.test_ambiguities( + LuxLib; recursive=false, exclude=[conv, ∇conv_data, ∇conv_filter, depthwiseconv]) + Aqua.test_piracies(LuxLib; treat_as_own=[conv, ∇conv_data, ∇conv_filter, depthwiseconv]) end @testitem "Explicit Imports" tags=[:others] begin