P4 to Git Change 1439905 by cpaquot@cpaquot-ocl-lc-lnx on 2017/07/26 15:57:06

SWDEV-121486 - Clean up sampler list if we run out of memory.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#42 edit


[ROCm/clr commit: 3a805c96cc]
此提交包含在:
foreman
2017-07-26 16:14:35 -04:00
父節點 afb1ee54cf
當前提交 8d6240ee4e
+12 -2
查看文件
@@ -1664,8 +1664,18 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const
hsa_status_t status =
hsa_ext_sampler_create(dev().getBackendDevice(), &samplerDescriptor, &hsa_sampler);
if (status != HSA_STATUS_SUCCESS) {
LogError("Error creating device sampler object!");
return false;
// Wait on a kernel if one is outstanding
releaseGpuMemoryFence();
// Release the sampler handles allocated for the various
// on one or more kernel submissions
std::for_each(samplerList_.begin(), samplerList_.end(),
std::bind2nd<DestroySampler>(DestroySampler(), gpu_device_));
samplerList_.clear();
status = hsa_ext_sampler_create(dev().getBackendDevice(), &samplerDescriptor, &hsa_sampler);
if (status != HSA_STATUS_SUCCESS) {
LogError("Error creating device sampler object!");
return false;
}
}
if (dev().settings().enableImageHandle_) {