Skip to content

Commit e69e779

Browse files
authored
[AsyncAlloc][SYCL][Exp] Remove unused handler members (#17831)
This patch removes unused handler_impl members.
1 parent 92da52d commit e69e779

File tree

4 files changed

+5
-28
lines changed

4 files changed

+5
-28
lines changed

sycl/source/detail/async_alloc.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ void *async_malloc(sycl::handler &h, sycl::usm::alloc kind, size_t size) {
6565
// Async malloc must return a void* immediately.
6666
// Set up CommandGroup which is a no-op and pass the
6767
// event from the alloc.
68-
h.impl->MAllocSize = size;
6968
h.impl->MAsyncAllocEvent = Event;
7069
h.setType(detail::CGType::AsyncAlloc);
7170

@@ -112,8 +111,6 @@ __SYCL_EXPORT void *async_malloc_from_pool(sycl::handler &h, size_t size,
112111

113112
// Async malloc must return a void* immediately.
114113
// Set up CommandGroup which is a no-op and pass the event from the alloc.
115-
h.impl->MAllocSize = size;
116-
h.impl->MMemPool = memPoolImpl;
117114
h.impl->MAsyncAllocEvent = Event;
118115
h.setType(detail::CGType::AsyncAlloc);
119116

sycl/source/detail/cg.hpp

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -671,29 +671,14 @@ class CGSemaphoreSignal : public CG {
671671
/// "Async Alloc" command group class.
672672
class CGAsyncAlloc : public CG {
673673

674-
// These members are unused but kept in case of logging.
675-
size_t MSize;
676-
std::shared_ptr<ext::oneapi::experimental::detail::memory_pool_impl> MMemPool;
677-
678674
// Resulting event carried from async alloc execution.
679675
ur_event_handle_t MEvent;
680676

681677
public:
682-
CGAsyncAlloc(
683-
size_t size,
684-
std::shared_ptr<ext::oneapi::experimental::detail::memory_pool_impl>
685-
MemPool,
686-
ur_event_handle_t event, CG::StorageInitHelper CGData,
687-
detail::code_location loc = {})
688-
: CG(CGType::AsyncAlloc, std::move(CGData), std::move(loc)), MSize(size),
689-
MMemPool(std::move(MemPool)), MEvent(event) {}
690-
691-
std::shared_ptr<ext::oneapi::experimental::detail::memory_pool_impl>
692-
getMemPool() const {
693-
return MMemPool;
694-
}
695-
696-
size_t getSize() const { return MSize; }
678+
CGAsyncAlloc(ur_event_handle_t event, CG::StorageInitHelper CGData,
679+
detail::code_location loc = {})
680+
: CG(CGType::AsyncAlloc, std::move(CGData), std::move(loc)),
681+
MEvent(event) {}
697682

698683
ur_event_handle_t getEvent() const { return MEvent; }
699684
};

sycl/source/detail/handler_impl.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,7 @@ class handler_impl {
203203
ext::oneapi::experimental::event_mode_enum MEventMode =
204204
ext::oneapi::experimental::event_mode_enum::none;
205205

206-
/// Memory pool and allocation size for asynchronous allocation - held for
207-
/// potential logging.
208206
/// Event computed from async alloc which is passed through for processing.
209-
std::shared_ptr<ext::oneapi::experimental::detail::memory_pool_impl> MMemPool;
210-
size_t MAllocSize = 0;
211207
ur_event_handle_t MAsyncAllocEvent = nullptr;
212208

213209
// Allocation ptr to be freed asynchronously.

sycl/source/handler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,7 @@ event handler::finalize() {
725725
break;
726726
case detail::CGType::AsyncAlloc:
727727
CommandGroup.reset(new detail::CGAsyncAlloc(
728-
impl->MAllocSize, impl->MMemPool, impl->MAsyncAllocEvent,
729-
std::move(impl->CGData), MCodeLoc));
728+
impl->MAsyncAllocEvent, std::move(impl->CGData), MCodeLoc));
730729
break;
731730
case detail::CGType::AsyncFree:
732731
CommandGroup.reset(new detail::CGAsyncFree(

0 commit comments

Comments
 (0)