Skip to content

Commit

Permalink
Merge pull request #45 from LuxDL/ap/logging
Browse files Browse the repository at this point in the history
Bug in logging code
  • Loading branch information
avik-pal authored Jun 11, 2024
2 parents ffc360d + 46f0965 commit b11c97b
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
return $dev()
end
end
Expand Down

2 comments on commit b11c97b

@avik-pal
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/108701

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.22 -m "<description of version>" b11c97b2c2128b4e4652e7aed91ab572a46d3acb
git push origin v0.1.22

Please sign in to comment.