Skip to content

Commit 44a050e

Browse files
committed
Do not apply caching allocator to exception holder
1 parent 9e6c5a5 commit 44a050e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AMDGPU"
22
uuid = "21141c5a-9bdb-4563-92ae-f87d6854732e"
33
authors = ["Julian P Samaroo <jpsamaroo@jpsamaroo.me>", "Valentin Churavy <v.churavy@gmail.com>", "Anton Smirnov <tonysmn97@gmail.com>"]
4-
version = "1.1.5"
4+
version = "1.1.6"
55

66
[deps]
77
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/exception_handler.jl

+7-5
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ struct ExceptionHolder
4040
n_str_buffers = 100
4141

4242
exception_flag = Mem.HostBuffer(sizeof(Int32), HIP.hipHostAllocDefault)
43-
gate = ROCArray(UInt64[0])
44-
buffers_counter = ROCArray(Int32[0])
45-
str_buffers_counter = ROCArray(Int32[0])
43+
gate = with_no_caching(() -> ROCArray(UInt64[0]))
44+
buffers_counter = with_no_caching(() -> ROCArray(Int32[0]))
45+
str_buffers_counter = with_no_caching(() -> ROCArray(Int32[0]))
4646

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

54-
errprintf_buffers_dev = ROCArray(Mem.device_ptr.(errprintf_buffers))
55-
str_buffers_dev = ROCArray(Mem.device_ptr.(str_buffers))
54+
errprintf_buffers_dev = with_no_caching(
55+
() -> ROCArray(Mem.device_ptr.(errprintf_buffers)))
56+
str_buffers_dev = with_no_caching(
57+
() -> ROCArray(Mem.device_ptr.(str_buffers)))
5658

5759
new(
5860
exception_flag, gate, buffers_counter, str_buffers_counter,

0 commit comments

Comments
 (0)