diff --git a/opencl/test/unit_test/gen12lp/dg1/excludes_ocl_dg1.cpp b/opencl/test/unit_test/gen12lp/dg1/excludes_ocl_dg1.cpp index c0b5fe253a..3f4f73b94c 100644 --- a/opencl/test/unit_test/gen12lp/dg1/excludes_ocl_dg1.cpp +++ b/opencl/test/unit_test/gen12lp/dg1/excludes_ocl_dg1.cpp @@ -9,3 +9,4 @@ HWTEST_EXCLUDE_PRODUCT(BufferSetSurfaceTests, givenBufferSetSurfaceThatMemoryIsUnalignedToCachelineButReadOnlyThenL3CacheShouldBeStillOn, IGFX_DG1) HWTEST_EXCLUDE_PRODUCT(BufferSetSurfaceTests, givenAlignedCacheableReadOnlyBufferThenChoseOclBufferPolicy, IGFX_DG1); +HWTEST_EXCLUDE_PRODUCT(GetDeviceInfoMemCapabilitiesTest, GivenValidParametersWhenGetDeviceInfoIsCalledForBdwAndLaterThenClSuccessIsReturned, IGFX_DG1); diff --git a/opencl/test/unit_test/gen12lp/dg1/test_cl_device_caps_dg1.cpp b/opencl/test/unit_test/gen12lp/dg1/test_cl_device_caps_dg1.cpp index 4dcfb14645..354397795c 100644 --- a/opencl/test/unit_test/gen12lp/dg1/test_cl_device_caps_dg1.cpp +++ b/opencl/test/unit_test/gen12lp/dg1/test_cl_device_caps_dg1.cpp @@ -12,6 +12,7 @@ #include "shared/test/common/test_macros/test.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" +#include "opencl/test/unit_test/fixtures/device_info_fixture.h" #include "opencl/test/unit_test/mocks/mock_cl_device.h" using namespace NEO; @@ -32,3 +33,18 @@ DG1TEST_F(Dg1ClDeviceCaps, givenDg1hpWhenInitializeCapsThenVmeIsNotSupported) { EXPECT_FALSE(pClDevice->getDeviceInfo().vmeAvcSupportsTextureSampler); EXPECT_FALSE(pDevice->getDeviceInfo().vmeAvcSupportsPreemption); } + +DG1TEST_F(GetDeviceInfoMemCapabilitiesTest, GivenValidParametersWhenGetDeviceInfoIsCalledForDg1ThenClSuccessIsReturned) { + + std::vector params = { + {CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL, + CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL}, + {CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL, + (CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL | CL_UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS_INTEL)}, + {CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL, + (CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL | CL_UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS_INTEL)}, + {CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL, 0}, + {CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL, 0}}; + + check(params); +} diff --git a/shared/source/gen12lp/dg1/os_agnostic_product_helper_dg1.inl b/shared/source/gen12lp/dg1/os_agnostic_product_helper_dg1.inl index 7966e440f2..7ee00da6f9 100644 --- a/shared/source/gen12lp/dg1/os_agnostic_product_helper_dg1.inl +++ b/shared/source/gen12lp/dg1/os_agnostic_product_helper_dg1.inl @@ -42,6 +42,11 @@ bool ProductHelperHw::pipeControlWARequired(const HardwareInfo &hwIn return GfxCoreHelper::isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo, *this); } +template <> +uint64_t ProductHelperHw::getHostMemCapabilitiesValue() const { + return UNIFIED_SHARED_MEMORY_ACCESS; +} + template <> bool ProductHelperHw::imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const { return GfxCoreHelper::isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo, *this);