Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions source/adapters/hip/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
14 changes: 14 additions & 0 deletions source/adapters/hip/sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
10 changes: 5 additions & 5 deletions source/adapters/hip/ur_interface_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions test/conformance/platform/platform_adapter_hip.match
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
urPlatformGetTest.InvalidNumEntries
urPlatformGetNativeHandleTest.Success
urPlatformGetNativeHandleTest.InvalidNullHandlePlatform
urPlatformGetNativeHandleTest.InvalidNullPointerNativePlatform
3 changes: 0 additions & 3 deletions test/conformance/sampler/sampler_adapter_hip.match
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
urSamplerGetNativeHandleTest.Success/AMD_HIP_BACKEND___{{.*}}_
urSamplerGetNativeHandleTest.InvalidNullHandleSampler/AMD_HIP_BACKEND___{{.*}}_
urSamplerGetNativeHandleTest.InvalidNullPointerNativeHandle/AMD_HIP_BACKEND___{{.*}}_