From 25d2f83dc49727ae4bc8dff75eeeb9e769a60959 Mon Sep 17 00:00:00 2001 From: Michal Babej Date: Fri, 12 May 2023 14:11:18 +0300 Subject: [PATCH] disable USM memory allocation types other than Shared enabling Device/Host USM types make some Texture tests fail --- src/backend/OpenCL/SVMemoryRegion.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/OpenCL/SVMemoryRegion.cc b/src/backend/OpenCL/SVMemoryRegion.cc index aef4f0157..6b06e64b6 100644 --- a/src/backend/OpenCL/SVMemoryRegion.cc +++ b/src/backend/OpenCL/SVMemoryRegion.cc @@ -51,6 +51,10 @@ void *SVMemoryRegion::allocate(size_t Size, size_t Alignment, int Err; if (SupportsIntelUSM) { switch (MemType) { + + // TODO: investigate. Uncommenting this code makes + // a bunch of Unit_hipTexture tests fail with segfault. + /* case hipMemoryTypeHost: Ptr = USM.clHostMemAllocINTEL(Context_(), NULL, Size, Alignment, &Err); break; @@ -60,6 +64,7 @@ void *SVMemoryRegion::allocate(size_t Size, size_t Alignment, break; case hipMemoryTypeManaged: case hipMemoryTypeUnified: + */ default: Ptr = USM.clSharedMemAllocINTEL(Context_(), Device_(), NULL, Size, Alignment, &Err);