diff --git a/Project.toml b/Project.toml index 1bc2384..41c0869 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TaylorDiff" uuid = "b36ab563-344f-407b-a36a-4f200bebf99c" authors = ["Songchen Tan "] -version = "0.2.5" +version = "0.3.0" [deps] ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" @@ -28,4 +28,4 @@ SpecialFunctions = "2" SymbolicUtils = "3" Symbolics = "6" Zygote = "0.6" -julia = "1.6" +julia = "1.10" diff --git a/benchmark/Manifest.toml b/benchmark/Manifest.toml index 7210a84..3a90546 100644 --- a/benchmark/Manifest.toml +++ b/benchmark/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.5" +julia_version = "1.11.1" manifest_format = "2.0" project_hash = "448f3cae2dea59422644934cbad9b5490d5dc6eb" @@ -57,9 +57,9 @@ version = "0.1.38" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099" +git-tree-sha1 = "d80af0733c99ea80575f612813fa6aa71022d33a" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.0.4" +version = "4.1.0" weakdeps = ["StaticArrays"] [deps.Adapt.extensions] @@ -78,7 +78,7 @@ version = "2.3.0" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra"] @@ -112,6 +112,7 @@ version = "7.16.0" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.Atomix]] deps = ["UnsafeAtomics"] @@ -121,6 +122,7 @@ version = "0.1.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.BenchmarkTools]] deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] @@ -280,6 +282,7 @@ version = "1.0.0" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -295,9 +298,9 @@ version = "1.15.1" [[deps.DispatchDoctor]] deps = ["MacroTools", "Preferences"] -git-tree-sha1 = "19eec8ee5cde1c10aa5e5e0f25d10a3b4c8f8f12" +git-tree-sha1 = "453df2ce2aef7de59c69a56d31dcd2ec3384dd77" uuid = "8d63f2c5-f18a-4cf2-ba9d-b3f60fc568c8" -version = "0.4.15" +version = "0.4.17" weakdeps = ["ChainRulesCore", "EnzymeCore"] [deps.DispatchDoctor.extensions] @@ -307,6 +310,7 @@ weakdeps = ["ChainRulesCore", "EnzymeCore"] [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" [[deps.Distributions]] deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] @@ -360,9 +364,9 @@ version = "1.0.4" [[deps.Enzyme]] deps = ["CEnum", "EnzymeCore", "Enzyme_jll", "GPUCompiler", "LLVM", "Libdl", "LinearAlgebra", "ObjectFile", "Preferences", "Printf", "Random", "SparseArrays"] -git-tree-sha1 = "3b189be858a37e338192107cfbf7f263a7e758ea" +git-tree-sha1 = "aba39bfce6e65ce740b29c8d9d0c8a6c5770e3c1" uuid = "7da242da-08ed-463a-9acd-ee780be4f1d9" -version = "0.13.6" +version = "0.13.12" [deps.Enzyme.extensions] EnzymeBFloat16sExt = "BFloat16s" @@ -389,9 +393,9 @@ weakdeps = ["Adapt"] [[deps.Enzyme_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] -git-tree-sha1 = "d62681af4449614972ab959a670b6ec68738e548" +git-tree-sha1 = "c180391e0a09fedb2934e5c44455e13c38f859e6" uuid = "7cc45869-7501-5eee-bdea-0790c847d4ef" -version = "0.0.153+0" +version = "0.0.157+0" [[deps.ExceptionUnwrapping]] deps = ["Test"] @@ -417,6 +421,7 @@ version = "0.3.2" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" [[deps.FillArrays]] deps = ["LinearAlgebra"] @@ -465,6 +470,7 @@ version = "0.4.12" [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" +version = "1.11.0" [[deps.GPUArrays]] deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] @@ -480,21 +486,15 @@ version = "0.1.6" [[deps.GPUCompiler]] deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "PrecompileTools", "Preferences", "Scratch", "Serialization", "TOML", "TimerOutputs", "UUIDs"] -git-tree-sha1 = "1d6f290a5eb1201cd63574fbc4440c788d5cb38f" +git-tree-sha1 = "72408a76694e87e735f515a499ba1e069d232d39" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "0.27.8" +version = "1.0.1" [[deps.HTTP]] deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "d1d712be3164d61d1fb98e7ce9bcbc6cc06b45ed" +git-tree-sha1 = "bc3f416a965ae61968c20d0ad867556367f2817d" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.8" - -[[deps.HostCPUFeatures]] -deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "8e070b599339d622e9a081d17230d74a5c473293" -uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.17" +version = "1.10.9" [[deps.Hwloc]] deps = ["CEnum", "Hwloc_jll", "Printf"] @@ -537,6 +537,7 @@ version = "0.1.2" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" [[deps.IntervalSets]] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" @@ -571,9 +572,9 @@ version = "1.0.0" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "f389674c99bfcde17dc57454011aa44d5a260a40" +git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.6.0" +version = "1.6.1" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -583,9 +584,9 @@ version = "0.21.4" [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "MacroTools", "PrecompileTools", "Requires", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] -git-tree-sha1 = "5126765c5847f74758c411c994312052eb7117ef" +git-tree-sha1 = "e73a077abc7fe798fe940deabe30ef6c66bdde52" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -version = "0.9.27" +version = "0.9.29" weakdeps = ["EnzymeCore", "LinearAlgebra", "SparseArrays"] [deps.KernelAbstractions.extensions] @@ -594,10 +595,10 @@ weakdeps = ["EnzymeCore", "LinearAlgebra", "SparseArrays"] SparseArraysExt = "SparseArrays" [[deps.LLVM]] -deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Requires", "Unicode"] -git-tree-sha1 = "4ad43cb0a4bb5e5b1506e1d1f48646d7e0c80363" +deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Unicode"] +git-tree-sha1 = "d422dfd9707bec6617335dc2ea3c5172a87d5908" uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "9.1.2" +version = "9.1.3" [deps.LLVM.extensions] BFloat16sExt = "BFloat16s" @@ -612,14 +613,9 @@ uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" version = "0.0.34+0" [[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" - -[[deps.LambertW]] -git-tree-sha1 = "c5ffc834de5d61d00d2b0e18c96267cffc21f648" -uuid = "984bce1d-4616-540c-a9ee-88d1112d94c9" -version = "0.4.6" +version = "1.4.0" [[deps.Latexify]] deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] @@ -646,6 +642,7 @@ version = "0.1.17" [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +version = "1.11.0" [[deps.LeftChildRightSiblingTrees]] deps = ["AbstractTrees"] @@ -661,16 +658,17 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "8.6.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -679,10 +677,12 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] @@ -702,49 +702,29 @@ version = "0.3.28" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.LoopVectorization]] -deps = ["ArrayInterface", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "8084c25a250e00ae427a379a5b607e7aed96a2dd" -uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.171" -weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] - - [deps.LoopVectorization.extensions] - ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] - SpecialFunctionsExt = "SpecialFunctions" - -[[deps.LossFunctions]] -deps = ["Markdown", "Requires", "Statistics"] -git-tree-sha1 = "8073538845227d3acf8a0c149bf0e150e60d0ced" -uuid = "30fc2ffe-d236-52d8-8643-a9d8f7c094a7" -version = "0.11.2" - - [deps.LossFunctions.extensions] - LossFunctionsCategoricalArraysExt = "CategoricalArrays" - - [deps.LossFunctions.weakdeps] - CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" +version = "1.1.0" [[deps.Lux]] -deps = ["ADTypes", "Adapt", "ArgCheck", "ArrayInterface", "ChainRulesCore", "Compat", "ConcreteStructs", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Functors", "GPUArraysCore", "LinearAlgebra", "LossFunctions", "LuxCore", "LuxLib", "MLDataDevices", "MacroTools", "Markdown", "NNlib", "Optimisers", "Preferences", "Random", "Reexport", "SIMDTypes", "Setfield", "Static", "StaticArraysCore", "Statistics", "VectorizationBase", "WeightInitializers"] -git-tree-sha1 = "bd1ad2abb5ba0c5b5ff3ce076c1434ccb4873939" +deps = ["ADTypes", "Adapt", "ArgCheck", "ArrayInterface", "ChainRulesCore", "Compat", "ConcreteStructs", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Functors", "GPUArraysCore", "LinearAlgebra", "LuxCore", "LuxLib", "MLDataDevices", "MacroTools", "Markdown", "NNlib", "Optimisers", "Preferences", "Random", "Reexport", "SIMDTypes", "Setfield", "Static", "StaticArraysCore", "Statistics", "WeightInitializers"] +git-tree-sha1 = "621331aebf488624e210b2602b720ecd3ca01c2a" uuid = "b2108857-7c20-44ae-9111-449ecde12c47" -version = "1.1.0" +version = "1.2.0" [deps.Lux.extensions] LuxComponentArraysExt = "ComponentArrays" LuxEnzymeExt = "Enzyme" LuxFluxExt = "Flux" + LuxLossFunctionsExt = "LossFunctions" LuxMLUtilsExt = "MLUtils" LuxMPIExt = "MPI" LuxMPINCCLExt = ["CUDA", "MPI", "NCCL"] + LuxReactantExt = ["Enzyme", "Reactant"] LuxReverseDiffExt = ["FunctionWrappers", "ReverseDiff"] LuxSimpleChainsExt = "SimpleChains" LuxTrackerExt = "Tracker" @@ -756,9 +736,11 @@ version = "1.1.0" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" + LossFunctions = "30fc2ffe-d236-52d8-8643-a9d8f7c094a7" MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" NCCL = "3fe64909-d7a1-4096-9b7d-7a0f12cf0f6b" + Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" SimpleChains = "de6bee2f-e2f4-4ec7-b6ed-219cc6f6e9e5" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" @@ -790,18 +772,21 @@ version = "1.0.1" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.LuxLib]] -deps = ["ArrayInterface", "ChainRulesCore", "Compat", "CpuId", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Hwloc", "KernelAbstractions", "LinearAlgebra", "LoopVectorization", "LuxCore", "MLDataDevices", "Markdown", "NNlib", "Octavian", "Polyester", "Random", "Reexport", "SLEEFPirates", "Static", "StaticArraysCore", "Statistics"] -git-tree-sha1 = "c0cf74b074f18e2958d6cfc91d230ee0caa0c099" +deps = ["ArrayInterface", "ChainRulesCore", "Compat", "CpuId", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Hwloc", "KernelAbstractions", "LinearAlgebra", "LuxCore", "MLDataDevices", "Markdown", "NNlib", "Polyester", "Preferences", "Random", "Reexport", "Static", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "81e3d311bd4a7c5c51c6a335f23a2cb6d3565c3f" uuid = "82251201-b29d-42c6-8e01-566dec8acb11" -version = "1.3.1" +version = "1.3.6" [deps.LuxLib.extensions] LuxLibAppleAccelerateExt = "AppleAccelerate" LuxLibBLISBLASExt = "BLISBLAS" LuxLibCUDAExt = "CUDA" LuxLibEnzymeExt = "Enzyme" + LuxLibLoopVectorizationExt = "LoopVectorization" LuxLibMKLExt = "MKL" + LuxLibOctavianExt = ["Octavian", "LoopVectorization"] LuxLibReverseDiffExt = "ReverseDiff" + LuxLibSLEEFPiratesExt = "SLEEFPirates" LuxLibTrackerAMDGPUExt = ["AMDGPU", "Tracker"] LuxLibTrackerExt = "Tracker" LuxLibcuDNNExt = ["CUDA", "cuDNN"] @@ -812,16 +797,19 @@ version = "1.3.1" BLISBLAS = "6f275bd8-fec0-4d39-945b-7e95a765fa1e" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890" MKL = "33e6dc65-8f57-5167-99aa-e5a354878fb2" + Octavian = "6fd5a793-0b7e-452c-907f-f8bfe9c57db4" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SLEEFPirates = "476501e8-09a2-5ece-8869-fb82de89a1fa" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd" [[deps.MLDataDevices]] -deps = ["Adapt", "Functors", "Preferences", "Random"] -git-tree-sha1 = "bf8bca6f9f9fa3fa984ba5d358595033f0aace2a" +deps = ["Adapt", "Compat", "Functors", "Preferences", "Random"] +git-tree-sha1 = "5cffc52b59227864b665459e1f7bcc4d3c4fb47b" uuid = "7e8f7934-dd98-4c1a-8fe8-92b47a384d40" -version = "1.1.1" +version = "1.4.2" [deps.MLDataDevices.extensions] MLDataDevicesAMDGPUExt = "AMDGPU" @@ -831,6 +819,7 @@ version = "1.1.1" MLDataDevicesGPUArraysExt = "GPUArrays" MLDataDevicesMLUtilsExt = "MLUtils" MLDataDevicesMetalExt = ["GPUArrays", "Metal"] + MLDataDevicesReactantExt = "Reactant" MLDataDevicesRecursiveArrayToolsExt = "RecursiveArrayTools" MLDataDevicesReverseDiffExt = "ReverseDiff" MLDataDevicesSparseArraysExt = "SparseArrays" @@ -847,6 +836,7 @@ version = "1.1.1" GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54" Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" @@ -874,6 +864,7 @@ version = "0.1.8" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MbedTLS]] deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] @@ -884,7 +875,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.6+0" [[deps.Missings]] deps = ["DataAPI"] @@ -894,22 +885,23 @@ version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2023.12.12" [[deps.MultivariatePolynomials]] deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] -git-tree-sha1 = "5c1d1d9361e1417e5a065e1f84dc3686cbdaea21" +git-tree-sha1 = "8d39779e29f80aa6c071e7ac17101c6e31f075d7" uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" -version = "0.5.6" +version = "0.5.7" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "3eba928678787843e504c153a9b8e80d7d73ab17" +git-tree-sha1 = "90077f1e79de8c9c7c8a90644494411111f4e07b" uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "1.5.0" +version = "1.5.2" [[deps.NNlib]] deps = ["Adapt", "Atomix", "ChainRulesCore", "GPUArraysCore", "KernelAbstractions", "LinearAlgebra", "Random", "Statistics"] @@ -949,33 +941,10 @@ git-tree-sha1 = "7249afa1c4dfd86bfbcc9b28939ab6ef844f4e11" uuid = "d8793406-e978-5875-9003-1fc021f44a92" version = "0.4.2" -[[deps.Octavian]] -deps = ["CPUSummary", "IfElse", "LoopVectorization", "ManualMemory", "PolyesterWeave", "PrecompileTools", "Static", "StaticArrayInterface", "ThreadingUtilities", "VectorizationBase"] -git-tree-sha1 = "92410e147bdcaf9e2f982a7cc9b1341fc5dd1a77" -uuid = "6fd5a793-0b7e-452c-907f-f8bfe9c57db4" -version = "0.3.28" - - [deps.Octavian.extensions] - ForwardDiffExt = "ForwardDiff" - HyperDualNumbersExt = "HyperDualNumbers" - - [deps.Octavian.weakdeps] - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - HyperDualNumbers = "50ceba7f-c3ee-5a84-a6e8-3ad40456ec97" - -[[deps.OffsetArrays]] -git-tree-sha1 = "1a27764e945a152f7ca7efa04de513d473e9542e" -uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.14.1" -weakdeps = ["Adapt"] - - [deps.OffsetArrays.extensions] - OffsetArraysAdaptExt = "Adapt" - [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.27+1" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] @@ -1024,9 +993,15 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.11.0" + + [deps.Pkg.extensions] + REPLExt = "REPL" + + [deps.Pkg.weakdeps] + REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.PkgBenchmark]] deps = ["BenchmarkTools", "Dates", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Pkg", "Printf", "TerminalLoggers", "UUIDs"] @@ -1067,10 +1042,11 @@ version = "0.5.6" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" [[deps.Profile]] -deps = ["Printf"] uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" +version = "1.11.0" [[deps.ProgressLogging]] deps = ["Logging", "SHA", "UUIDs"] @@ -1093,13 +1069,10 @@ weakdeps = ["Enzyme"] [deps.QuadGK.extensions] QuadGKEnzymeExt = "Enzyme" -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" [[deps.RealDot]] deps = ["LinearAlgebra"] @@ -1115,9 +1088,9 @@ version = "1.3.4" [[deps.RecursiveArrayTools]] deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "b034171b93aebc81b3e1890a036d13a9c4a9e3e0" +git-tree-sha1 = "43cdc0987135597867a37fc3e8e0fc9fdef6ac66" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.27.0" +version = "3.27.1" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" @@ -1177,17 +1150,11 @@ git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" uuid = "94e857df-77ce-4151-89e5-788b33177be4" version = "0.1.0" -[[deps.SLEEFPirates]] -deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "456f610ca2fbd1c14f5fcf31c6bfadc55e7d66e0" -uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.43" - [[deps.SciMLBase]] -deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "Expronicon", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "ce6fb9b0d756446d902e4495f2447fa2ebfbb1f4" +deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "Expronicon", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "86e1c491cddf233d77d8aadbe289005db44e8445" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.54.2" +version = "2.57.2" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -1210,9 +1177,9 @@ version = "2.54.2" [[deps.SciMLOperators]] deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] -git-tree-sha1 = "e39c5f217f9aca640c8e27ab21acf557a3967db5" +git-tree-sha1 = "ef388ca9e4921ec5614ce714f8aa59a5cd33d867" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.3.10" +version = "0.3.11" weakdeps = ["SparseArrays", "StaticArraysCore"] [deps.SciMLOperators.extensions] @@ -1233,6 +1200,7 @@ version = "1.2.1" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" [[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] @@ -1247,6 +1215,7 @@ version = "1.2.0" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" [[deps.SortingAlgorithms]] deps = ["DataStructures"] @@ -1257,7 +1226,7 @@ version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" +version = "1.11.0" [[deps.SparseInverseSubset]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] @@ -1286,17 +1255,20 @@ deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools" git-tree-sha1 = "96381d50f1ce85f2663584c8e886a6ca97e60554" uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" version = "1.8.0" -weakdeps = ["OffsetArrays", "StaticArrays"] [deps.StaticArrayInterface.extensions] StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" StaticArrayInterfaceStaticArraysExt = "StaticArrays" + [deps.StaticArrayInterface.weakdeps] + OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50" +git-tree-sha1 = "777657803913ffc7e8cc20f0fd04b634f871af8f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.7" +version = "1.9.8" weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] @@ -1309,9 +1281,14 @@ uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -1367,13 +1344,13 @@ uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" +version = "7.7.0+0" [[deps.SymbolicIndexingInterface]] deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "0225f7c62f5f78db35aae6abb2e5cabe38ce578f" +git-tree-sha1 = "20cf607cafb31f922bce84d60379203e7a126911" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.31" +version = "0.3.34" [[deps.SymbolicLimits]] deps = ["SymbolicUtils"] @@ -1383,9 +1360,9 @@ version = "0.2.2" [[deps.SymbolicUtils]] deps = ["AbstractTrees", "ArrayInterface", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "IfElse", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "TermInterface", "TimerOutputs", "Unityper"] -git-tree-sha1 = "3927e02dc7648a45ec6aa592bcd8374094a44740" +git-tree-sha1 = "04e9157537ba51dad58336976f8d04b9ab7122f0" uuid = "d1185830-fcd6-423d-90d6-eec64667417b" -version = "3.7.1" +version = "3.7.2" [deps.SymbolicUtils.extensions] SymbolicUtilsLabelledArraysExt = "LabelledArrays" @@ -1396,10 +1373,10 @@ version = "3.7.1" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" [[deps.Symbolics]] -deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "IfElse", "LaTeXStrings", "LambertW", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] -git-tree-sha1 = "6a7c7cd9bd8c051877a5a29fb597b18362dbc4e4" +deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "IfElse", "LaTeXStrings", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] +git-tree-sha1 = "ef7532b95fbd529e1252cabb36bba64803020840" uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "6.13.1" +version = "6.16.0" [deps.Symbolics.extensions] SymbolicsForwardDiffExt = "ForwardDiff" @@ -1440,10 +1417,10 @@ uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" [[deps.TaylorDiff]] -deps = ["ChainRules", "ChainRulesCore", "SymbolicUtils", "Symbolics"] +deps = ["ChainRules", "ChainRulesCore", "MacroTools", "SymbolicUtils", "Symbolics"] path = ".." uuid = "b36ab563-344f-407b-a36a-4f200bebf99c" -version = "0.2.4" +version = "0.3.0" weakdeps = ["NNlib", "SpecialFunctions", "Zygote"] [deps.TaylorDiff.extensions] @@ -1453,9 +1430,9 @@ weakdeps = ["NNlib", "SpecialFunctions", "Zygote"] [[deps.TaylorSeries]] deps = ["LinearAlgebra", "Markdown", "Requires", "SparseArrays"] -git-tree-sha1 = "bb212ead98022455eed514cff0adfa5de8645258" +git-tree-sha1 = "267e579c6aa0e1605bb5dc681996bb1e3a43c740" uuid = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea" -version = "0.18.1" +version = "0.18.2" [deps.TaylorSeries.extensions] TaylorSeriesIAExt = "IntervalArithmetic" @@ -1483,6 +1460,7 @@ version = "0.1.7" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +version = "1.11.0" [[deps.ThreadingUtilities]] deps = ["ManualMemory"] @@ -1492,14 +1470,14 @@ version = "0.5.2" [[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "5a13ae8a41237cff5ecf34f73eb1b8f42fff6531" +git-tree-sha1 = "3a6f063d690135f5c1ba351412c82bae4d1402bf" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.24" +version = "0.5.25" [[deps.TranscodingStreams]] -git-tree-sha1 = "e84b3a11b9bece70d14cce63406bbc79ed3464d2" +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.11.2" +version = "0.11.3" [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" @@ -1509,14 +1487,11 @@ version = "1.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[deps.UnPack]] -git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" -uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" -version = "1.0.2" +version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.Unityper]] deps = ["ConstructionBase"] @@ -1535,17 +1510,11 @@ git-tree-sha1 = "2d17fabcd17e67d7625ce9c531fb9f40b7c42ce4" uuid = "d80eeb9a-aca5-4d75-85e5-170c8b632249" version = "0.2.1" -[[deps.VectorizationBase]] -deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "e7f5b81c65eb858bed630fe006837b935518aca5" -uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -version = "0.21.70" - [[deps.WeightInitializers]] deps = ["ArgCheck", "ConcreteStructs", "GPUArraysCore", "LinearAlgebra", "Random", "SpecialFunctions", "Statistics"] -git-tree-sha1 = "ed1cfb44422eaa9804c8a596a8227a6e2baaeef7" +git-tree-sha1 = "0b935265795ccccf12bc89e693b6380934451780" uuid = "d49dbf32-c5c2-4618-8acc-27bb2598ef2d" -version = "1.0.3" +version = "1.0.4" [deps.WeightInitializers.extensions] WeightInitializersAMDGPUExt = ["AMDGPU", "GPUArrays"] @@ -1570,9 +1539,9 @@ version = "1.2.13+1" [[deps.Zygote]] deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArrays", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "Requires", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "f2f85ad73ca67b5d3c94239b0fde005e0fe2d900" +git-tree-sha1 = "f816633be6dc5c0ed9ffedda157ecfda0b3b6a69" uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.6.71" +version = "0.6.72" [deps.Zygote.extensions] ZygoteColorsExt = "Colors" @@ -1598,7 +1567,7 @@ version = "5.11.0+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] diff --git a/benchmark/groups/mlp.jl b/benchmark/groups/mlp.jl index aba9952..2b3bcd0 100644 --- a/benchmark/groups/mlp.jl +++ b/benchmark/groups/mlp.jl @@ -16,7 +16,7 @@ function create_benchmark_mlp(mlp_conf::Tuple{Int, Int}, x::Vector{T}, for (index, func) in enumerate(functions) forwarddiff[index] = @benchmarkable $func(0) end - Ns = [Val{order + 1}() for order in 1:7] + Ns = [Val(order) for order in 1:7] for (index, N) in enumerate(Ns) taylordiff[index] = @benchmarkable derivative($mlp, $x, $l, $N) end diff --git a/benchmark/groups/pinn.jl b/benchmark/groups/pinn.jl index 82bf760..d68dded 100644 --- a/benchmark/groups/pinn.jl +++ b/benchmark/groups/pinn.jl @@ -25,8 +25,8 @@ function loss_by_finitediff(model, x) end function loss_by_taylordiff(model, x) f(x) = trial(model, x) - error = derivative(f, x, Float32[1, 0], Val(3)) + - derivative(f, x, Float32[0, 1], Val(3)) + + error = derivative(f, x, Float32[1, 0], Val(2)) + + derivative(f, x, Float32[0, 1], Val(2)) + sin(π * x[1]) * sin(π * x[2]) abs2(error) end diff --git a/benchmark/groups/scalar.jl b/benchmark/groups/scalar.jl index 767f688..b44069e 100644 --- a/benchmark/groups/scalar.jl +++ b/benchmark/groups/scalar.jl @@ -12,7 +12,7 @@ function create_benchmark_scalar_function(f::F, x::T) where {F, T <: Number} forwarddiff_group = BenchmarkGroup([index => @benchmarkable $func($(Ref(x))[]) for (index, func) in enumerate(functions)]...) taylordiff_group = BenchmarkGroup() - Ns = [Val{order + 1}() for order in 1:9] + Ns = [Val(order) for order in 1:9] for (index, N) in enumerate(Ns) taylordiff_group[index] = @benchmarkable derivative($f, $x, one($x), $N) end diff --git a/benchmark/groups/taylor_expansion.jl b/benchmark/groups/taylor_expansion.jl index 68b5db1..b1a657a 100644 --- a/benchmark/groups/taylor_expansion.jl +++ b/benchmark/groups/taylor_expansion.jl @@ -11,7 +11,7 @@ N, m = 100, 20 p, α, s = rand(N), rand(N), rand() p ./= sum(p) t_ts = Taylor1(eltype(p), m) -t_td = TaylorScalar{eltype(p), m + 1}(0.0, 1.0) +t_td = TaylorScalar{m}(zero(eltype(p)), one(eltype(p))) taylor_expansion = BenchmarkGroup(["scalar", "very-high-order"], "taylorseries" => (@benchmarkable my_calculation($t_ts, $p, $α, diff --git a/benchmark/runbenchmarks.jl b/benchmark/runbenchmarks.jl index bbc3fbc..f05dc6b 100644 --- a/benchmark/runbenchmarks.jl +++ b/benchmark/runbenchmarks.jl @@ -7,6 +7,7 @@ using BenchmarkTools: Trial, TrialEstimate, Parameters import JSON: lower, json using Dates using HTTP: put +using Random dict(x) = Dict(name => lower(getfield(x, name)) for name in fieldnames(typeof(x))) lower(results::BenchmarkResults) = dict(results) @@ -26,7 +27,7 @@ if "BUILDKITE" in keys(ENV) body["branch"] = getenv("BUILDKITE_BRANCH") body["tag"] = getenv("BUILDKITE_TAG") else - body["commit"] = "abcdef123456" + body["commit"] = randstring("abcdef0123456789", 40) body["branch"] = "dummy" end diff --git a/src/derivative.jl b/src/derivative.jl index 8494132..bf933aa 100644 --- a/src/derivative.jl +++ b/src/derivative.jl @@ -2,8 +2,7 @@ export derivative, derivative!, derivatives # Added to help Zygote infer types @inline make_seed(x::T, l::T, ::Val{P}) where {T <: Real, P} = TaylorScalar{P}(x, l) -@inline make_seed(x::A, l::A, ::Val{P}) where {A <: AbstractArray, P} = broadcast( - make_seed, x, l, Val{P}()) +@inline make_seed(x::A, l::A, p) where {A <: AbstractArray} = broadcast(make_seed, x, l, p) """ derivative(f, x, ::Val{P}) @@ -14,12 +13,9 @@ Computes `P`-th directional derivative of `f` w.r.t. vector `x` in direction `l` """ function derivative end -@inline derivative(f, x::Number, p::Val{P}) where {P} = extract_derivative( - derivatives(f, x, one(x), p), p) -@inline derivative(f, x, l, p::Val{P}) where {P} = extract_derivative( - derivatives(f, x, l, p), p) -@inline derivative(f!, y, x, l, p::Val{P}) where {P} = extract_derivative( - derivatives(f!, y, x, l, p), p) +@inline derivative(f, x::Number, p) = extract_derivative(derivatives(f, x, one(x), p), p) +@inline derivative(f, x, l, p) = extract_derivative(derivatives(f, x, l, p), p) +@inline derivative(f!, y, x, l, p) = extract_derivative(derivatives(f!, y, x, l, p), p) """ derivative!(result, f, x, l, ::Val{P}) @@ -29,9 +25,9 @@ In-place derivative calculation APIs. `result` is expected to be pre-allocated a """ function derivative! end -@inline derivative!(result, f, x, l, p::Val{P}) where {P} = extract_derivative!( +@inline derivative!(result, f, x, l, p) = extract_derivative!( result, derivatives(f, x, l, p), p) -@inline derivative!(result, f!, y, x, l, p::Val{P}) where {P} = extract_derivative!( +@inline derivative!(result, f!, y, x, l, p) = extract_derivative!( result, derivatives(f!, y, x, l, p), p) """ @@ -42,7 +38,7 @@ Computes all derivatives of `f` at `x` up to order `P`. """ function derivatives end -@inline derivatives(f, x, l, p::Val{P}) where {P} = f(make_seed(x, l, p)) +@inline derivatives(f, x, l, p) = f(make_seed(x, l, p)) @inline function derivatives(f!, y, x, l, p::Val{P}) where {P} buffer = similar(y, TaylorScalar{eltype(y), P}) f!(buffer, make_seed(x, l, p))