SWDEV-412393 - Force alloc memory to avoid another hsa image creation.

Change-Id: Ia3cd99eb736231e6dfe013ebae6c41fd4cc657bc


[ROCm/clr commit: 289535e805]
이 커밋은 다음에 포함됨:
Jaydeep Patel가 2023-08-17 05:18:43 +00:00를 커밋했습니다
1 부모 10e2958197
커밋 86bac29b0a
3 파일이 변경됨
+12 -9

검색과 일치하는 파일 없음

+3 -2
파일 보기
@@ -1195,7 +1195,8 @@ bool Image::Format::isSupported(const Context& context, cl_mem_object_type image
// ================================================================================================
Image* Image::createView(const Context& context, const Format& format, device::VirtualDevice* vDev,
uint baseMipLevel, cl_mem_flags flags, bool createMipmapView) {
uint baseMipLevel, cl_mem_flags flags, bool createMipmapView,
bool forceAlloc) {
// Find the image dimensions and create a corresponding object
Image* view = new (context) Image(format, *this, baseMipLevel, flags, createMipmapView);
@@ -1210,7 +1211,7 @@ Image* Image::createView(const Context& context, const Format& format, device::V
view->initDeviceMemory();
// Check if runtime has to allocate memory
if ((context.devices().size() == 1) || DISABLE_DEFERRED_ALLOC) {
if ((context.devices().size() == 1) || DISABLE_DEFERRED_ALLOC || forceAlloc) {
for (uint i = 0; i < numDevices_; ++i) {
// Make sure the parent's device memory is avaialbe
if ((deviceMemories_[i].ref_ != nullptr) &&