Skip to content

Commit

Permalink
Do not apply caching allocator to exception holder
Browse files Browse the repository at this point in the history
  • Loading branch information
pxl-th committed Dec 9, 2024
1 parent 9e6c5a5 commit 44a050e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AMDGPU"
uuid = "21141c5a-9bdb-4563-92ae-f87d6854732e"
authors = ["Julian P Samaroo <[email protected]>", "Valentin Churavy <[email protected]>", "Anton Smirnov <[email protected]>"]
version = "1.1.5"
version = "1.1.6"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand Down
12 changes: 7 additions & 5 deletions src/exception_handler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ struct ExceptionHolder
n_str_buffers = 100

exception_flag = Mem.HostBuffer(sizeof(Int32), HIP.hipHostAllocDefault)
gate = ROCArray(UInt64[0])
buffers_counter = ROCArray(Int32[0])
str_buffers_counter = ROCArray(Int32[0])
gate = with_no_caching(() -> ROCArray(UInt64[0]))
buffers_counter = with_no_caching(() -> ROCArray(Int32[0]))
str_buffers_counter = with_no_caching(() -> ROCArray(Int32[0]))

errprintf_buffers = [
Mem.HostBuffer(buf_len, HIP.hipHostAllocDefault)
Expand All @@ -51,8 +51,10 @@ struct ExceptionHolder
Mem.HostBuffer(str_len, HIP.hipHostAllocDefault)
for _ in 1:n_str_buffers]

errprintf_buffers_dev = ROCArray(Mem.device_ptr.(errprintf_buffers))
str_buffers_dev = ROCArray(Mem.device_ptr.(str_buffers))
errprintf_buffers_dev = with_no_caching(
() -> ROCArray(Mem.device_ptr.(errprintf_buffers)))
str_buffers_dev = with_no_caching(
() -> ROCArray(Mem.device_ptr.(str_buffers)))

new(
exception_flag, gate, buffers_counter, str_buffers_counter,
Expand Down

2 comments on commit 44a050e

@pxl-th
Copy link
Member Author

@pxl-th pxl-th commented on 44a050e Dec 9, 2024

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/121058

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.1.6 -m "<description of version>" 44a050e22f5bd3d1238ce25ed9ce612f58aabc33
git push origin v1.1.6

Please sign in to comment.