Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Bug in logging code
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Jun 11, 2024
1 parent ffc360d commit 46f0965
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LuxDeviceUtils"
uuid = "34f89e08-e1d5-43b4-8944-0b49ac560553"
authors = ["Avik Pal <[email protected]> and contributors"]
version = "0.1.21"
version = "0.1.22"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
3 changes: 2 additions & 1 deletion src/LuxDeviceUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ struct LuxMetalDevice <: AbstractLuxGPUDevice end
struct LuxoneAPIDevice <: AbstractLuxGPUDevice end

for dev in (LuxCPUDevice, LuxMetalDevice, LuxoneAPIDevice)
msg = "`device_id` is not applicable for `$dev`."
@eval begin
_with_device(::Type{$dev}, ::Nothing) = $dev()
function _with_device(::Type{$dev}, device_id)
@warn "`device_id` is not applicable for `$dev`." maxlog=1
@warn $(msg) maxlog=1

Check warning on line 69 in src/LuxDeviceUtils.jl

View check run for this annotation

Codecov / codecov/patch

src/LuxDeviceUtils.jl#L69

Added line #L69 was not covered by tests
return $dev()
end
end
Expand Down

0 comments on commit 46f0965

Please sign in to comment.