From b914979c50641b26530e68a46c4a2da7467d84c3 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Fri, 12 Jul 2024 20:47:48 -0700 Subject: [PATCH] fix: extend get_device for nothing --- Project.toml | 2 +- src/LuxDeviceUtils.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 11719aa..78889f7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LuxDeviceUtils" uuid = "34f89e08-e1d5-43b4-8944-0b49ac560553" authors = ["Avik Pal and contributors"] -version = "0.1.25" +version = "0.1.26" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/LuxDeviceUtils.jl b/src/LuxDeviceUtils.jl index 2c3059b..f362ef0 100644 --- a/src/LuxDeviceUtils.jl +++ b/src/LuxDeviceUtils.jl @@ -399,7 +399,7 @@ for op in (:get_device, :get_device_type) end end - for T in (Number, AbstractRNG, Val, Symbol, String) + for T in (Number, AbstractRNG, Val, Symbol, String, Nothing) @eval $(_op)(::$(T)) = $(op == :get_device ? nothing : Nothing) end end