Skip to content

Commit

Permalink
Add CUDA.functional guard
Browse files Browse the repository at this point in the history
  • Loading branch information
mfherbst committed Nov 19, 2023
1 parent e5f211f commit 528756b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.16
current_version = 0.3.17
commit = True
tag = False

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
authors = ["Jason Eu <[email protected]>", "Michael F. Herbst <[email protected]>"]
name = "Libxc"
uuid = "66e17ffc-8502-11e9-23b5-c9248d0eb96d"
version = "0.3.16"
version = "0.3.17"

[compat]
CUDA = "5"
Expand Down
9 changes: 6 additions & 3 deletions ext/LibxcCudaExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ else
end

function __init__()
if !Libxc_GPU_jll.is_available() && CUDA.runtime_version() v"12"
@warn("Libxc_GPU_jll currently not available for CUDA 12. " *
"""Please use CUDA 11 for GPU support (i.e. `CUDA.set_runtime_version!(v"11.8")`)""")
if CUDA.functional()
if !Libxc_GPU_jll.is_available() && CUDA.runtime_version() v"12"
@warn("Libxc_GPU_jll currently not available for CUDA 12. " *
"Please use CUDA 11 for GPU support " *
"""(i.e. `CUDA.set_runtime_version!(v"11.8")`)""")
end
end
end

Expand Down

2 comments on commit 528756b

@mfherbst
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/95591

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.3.17 -m "<description of version>" 528756b30b3e9791b07316e962fcd158f57a3964
git push origin v0.3.17

Please sign in to comment.