MCPcopy Create free account
hub / github.com/ROCm/clr / submit

Method submit

hipamd/src/hip_mempool.cpp:130–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 : amd::Command(queue, 1, amd::Event::nullWaitList), ptr_(ptr), event_(event) {}
129
130 virtual void submit(device::VirtualDevice& device) final {
131 size_t offset = 0;
132 auto memory = getMemoryObject(ptr_, offset);
133 if (memory != nullptr) {
134 auto id = memory->getUserData().deviceId;
135 if (!g_devices[id]->FreeMemory(memory, static_cast<hip::Stream*>(queue()), event_)) {
136 // @note It's not the most optimal logic.
137 // The current implementation has unconditional waits
138 if (ihipFree(ptr_) != hipSuccess) {
139 setStatus(CL_INVALID_OPERATION);
140 }
141 }
142 }
143 }
144};
145
146// ================================================================================================

Callers

nothing calls this directly

Calls 3

getMemoryObjectFunction · 0.85
ihipFreeFunction · 0.85
FreeMemoryMethod · 0.45

Tested by

no test coverage detected