P4 to Git Change 1710935 by jatang@jatang_win_pal_lc on 2018/11/22 16:51:02
SWDEV-168522 - Move VirtualGPU::terminate() code into VirtualGPU::~VirtualGPU().
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#70 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.hpp#20 edit
[ROCm/clr commit: 8d717e2de0]
Этот коммит содержится в:
@@ -611,6 +611,19 @@ VirtualGPU::VirtualGPU(Device& device)
|
||||
}
|
||||
|
||||
VirtualGPU::~VirtualGPU() {
|
||||
delete blitMgr_;
|
||||
|
||||
// Release the resources of signal
|
||||
releaseGpuMemoryFence();
|
||||
|
||||
hsa_status_t err = hsa_queue_destroy(gpu_queue_);
|
||||
|
||||
if (barrier_signal_.handle != 0) {
|
||||
hsa_signal_destroy(barrier_signal_);
|
||||
}
|
||||
|
||||
destroyPool();
|
||||
|
||||
releasePinnedMem();
|
||||
|
||||
if (timestamp_ != nullptr) {
|
||||
@@ -712,25 +725,6 @@ bool VirtualGPU::create(bool profilingEna) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VirtualGPU::terminate() {
|
||||
delete blitMgr_;
|
||||
|
||||
// Release the resources of signal
|
||||
releaseGpuMemoryFence();
|
||||
hsa_status_t err = hsa_queue_destroy(gpu_queue_);
|
||||
if (err != HSA_STATUS_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (barrier_signal_.handle != 0) {
|
||||
hsa_signal_destroy(barrier_signal_);
|
||||
}
|
||||
|
||||
destroyPool();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool VirtualGPU::initPool(size_t kernarg_pool_size, uint signal_pool_count) {
|
||||
kernarg_pool_size_ = kernarg_pool_size;
|
||||
kernarg_pool_base_ = reinterpret_cast<char*>(roc_device_.hostAlloc(kernarg_pool_size_, 1, true));
|
||||
|
||||
@@ -148,7 +148,7 @@ class VirtualGPU : public device::VirtualDevice {
|
||||
~VirtualGPU();
|
||||
|
||||
bool create(bool profilingEna);
|
||||
bool terminate();
|
||||
bool terminate() { return true; }
|
||||
const Device& dev() const { return roc_device_; }
|
||||
|
||||
void profilingBegin(amd::Command& command, bool drmProfiling = false);
|
||||
|
||||
Ссылка в новой задаче
Block a user