From 44a050e22f5bd3d1238ce25ed9ce612f58aabc33 Mon Sep 17 00:00:00 2001 From: Anton Smirnov Date: Mon, 9 Dec 2024 22:46:48 +0200 Subject: [PATCH] Do not apply caching allocator to exception holder --- Project.toml | 2 +- src/exception_handler.jl | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index db3afc9b2..64603547f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "AMDGPU" uuid = "21141c5a-9bdb-4563-92ae-f87d6854732e" authors = ["Julian P Samaroo ", "Valentin Churavy ", "Anton Smirnov "] -version = "1.1.5" +version = "1.1.6" [deps] AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" diff --git a/src/exception_handler.jl b/src/exception_handler.jl index 35cdbb7f2..fd6429414 100644 --- a/src/exception_handler.jl +++ b/src/exception_handler.jl @@ -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) @@ -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,