diff --git a/source/adapters/hip/kernel.cpp b/source/adapters/hip/kernel.cpp index 936589401e..3b4e512e99 100644 --- a/source/adapters/hip/kernel.cpp +++ b/source/adapters/hip/kernel.cpp @@ -321,3 +321,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urKernelCreateWithNativeHandle( const ur_kernel_native_properties_t *, ur_kernel_handle_t *) { return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } + +UR_APIEXPORT ur_result_t UR_APICALL urKernelSetSpecializationConstants( + [[maybe_unused]] ur_kernel_handle_t hKernel, + [[maybe_unused]] uint32_t count, + [[maybe_unused]] const ur_specialization_constant_info_t *pSpecConstants) { + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; +} diff --git a/source/adapters/hip/sampler.cpp b/source/adapters/hip/sampler.cpp index 840eb1a1b0..5a177d6a9f 100644 --- a/source/adapters/hip/sampler.cpp +++ b/source/adapters/hip/sampler.cpp @@ -80,3 +80,17 @@ ur_result_t urSamplerRelease(ur_sampler_handle_t hSampler) { return UR_RESULT_SUCCESS; } + +UR_APIEXPORT ur_result_t UR_APICALL urSamplerCreateWithNativeHandle( + [[maybe_unused]] ur_native_handle_t hNativeSampler, + [[maybe_unused]] ur_context_handle_t hContext, + [[maybe_unused]] const ur_sampler_native_properties_t *pProperties, + [[maybe_unused]] ur_sampler_handle_t *phSampler) { + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; +} + +UR_APIEXPORT ur_result_t UR_APICALL +urSamplerGetNativeHandle([[maybe_unused]] ur_sampler_handle_t hSampler, + [[maybe_unused]] ur_native_handle_t *phNativeSampler) { + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; +} diff --git a/source/adapters/hip/ur_interface_loader.cpp b/source/adapters/hip/ur_interface_loader.cpp index 0e8ad3c605..26292b9528 100644 --- a/source/adapters/hip/ur_interface_loader.cpp +++ b/source/adapters/hip/ur_interface_loader.cpp @@ -38,11 +38,11 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetPlatformProcAddrTable( if (UR_RESULT_SUCCESS != result) { return result; } - pDdiTable->pfnCreateWithNativeHandle = nullptr; + pDdiTable->pfnCreateWithNativeHandle = urPlatformCreateWithNativeHandle; pDdiTable->pfnGet = urPlatformGet; pDdiTable->pfnGetApiVersion = urPlatformGetApiVersion; pDdiTable->pfnGetInfo = urPlatformGetInfo; - pDdiTable->pfnGetNativeHandle = nullptr; + pDdiTable->pfnGetNativeHandle = urPlatformGetNativeHandle; pDdiTable->pfnGetBackendOption = urPlatformGetBackendOption; return UR_RESULT_SUCCESS; } @@ -123,7 +123,7 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetKernelProcAddrTable( pDdiTable->pfnSetArgSampler = urKernelSetArgSampler; pDdiTable->pfnSetArgValue = urKernelSetArgValue; pDdiTable->pfnSetExecInfo = urKernelSetExecInfo; - pDdiTable->pfnSetSpecializationConstants = nullptr; + pDdiTable->pfnSetSpecializationConstants = urKernelSetSpecializationConstants; return UR_RESULT_SUCCESS; } @@ -134,9 +134,9 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetSamplerProcAddrTable( return result; } pDdiTable->pfnCreate = urSamplerCreate; - pDdiTable->pfnCreateWithNativeHandle = nullptr; + pDdiTable->pfnCreateWithNativeHandle = urSamplerCreateWithNativeHandle; pDdiTable->pfnGetInfo = urSamplerGetInfo; - pDdiTable->pfnGetNativeHandle = nullptr; + pDdiTable->pfnGetNativeHandle = urSamplerGetNativeHandle; pDdiTable->pfnRelease = urSamplerRelease; pDdiTable->pfnRetain = urSamplerRetain; return UR_RESULT_SUCCESS; diff --git a/test/conformance/platform/platform_adapter_hip.match b/test/conformance/platform/platform_adapter_hip.match index efd19f8b27..df63fbef05 100644 --- a/test/conformance/platform/platform_adapter_hip.match +++ b/test/conformance/platform/platform_adapter_hip.match @@ -1,4 +1 @@ urPlatformGetTest.InvalidNumEntries -urPlatformGetNativeHandleTest.Success -urPlatformGetNativeHandleTest.InvalidNullHandlePlatform -urPlatformGetNativeHandleTest.InvalidNullPointerNativePlatform diff --git a/test/conformance/sampler/sampler_adapter_hip.match b/test/conformance/sampler/sampler_adapter_hip.match index c690ae416a..e69de29bb2 100644 --- a/test/conformance/sampler/sampler_adapter_hip.match +++ b/test/conformance/sampler/sampler_adapter_hip.match @@ -1,3 +0,0 @@ -urSamplerGetNativeHandleTest.Success/AMD_HIP_BACKEND___{{.*}}_ -urSamplerGetNativeHandleTest.InvalidNullHandleSampler/AMD_HIP_BACKEND___{{.*}}_ -urSamplerGetNativeHandleTest.InvalidNullPointerNativeHandle/AMD_HIP_BACKEND___{{.*}}_