Skip to content

Commit

Permalink
Fix CxxWrap warning (#42)
Browse files Browse the repository at this point in the history
The obejct passed to the `@wrapmodule` macro has now to be a function rather
than a variable.
  • Loading branch information
giordano authored Mar 14, 2024
1 parent 853a85d commit 22c2eb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/poplar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using CxxWrap
using Scratch

const libpoplar_dir = joinpath(@get_scratch!("libpoplar"), "v$(Base.thispatch(VERSION))")
const libpoplar = joinpath(libpoplar_dir, "libpoplar_julia.so")
get_libpoplar_path() = joinpath(libpoplar_dir, "libpoplar_julia.so")

export @graph

Expand Down Expand Up @@ -74,11 +74,12 @@ struct VertexPerfEstimate
new(UInt64(cycles), UInt64(flops))
end

@wrapmodule(libpoplar)
@wrapmodule(get_libpoplar_path)

const SDK_VERSION = VersionNumber(match(r"[\d.]+", String(Poplar.getVersionString())).match)

function __init__()
libpoplar = get_libpoplar_path()
if !isfile(libpoplar)
error("""
`$(basename(libpoplar))` expected to exist at path `$(libpoplar)`, but could not be found.
Expand Down

2 comments on commit 22c2eb9

@giordano
Copy link
Collaborator 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/102886

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 v1.3.0 -m "<description of version>" 22c2eb934ea2ada4747f126b372557dc05b23c8c
git push origin v1.3.0

Please sign in to comment.