SWDEV-545259 - Adds clang-cl support and missing dispatch table entries (#760)

This commit is contained in:
Sourabh U Betigeri
2025-08-27 09:35:58 -07:00
committed by GitHub
parent cfd3fee0e2
commit 5201efe050
2 changed files with 56 additions and 1 deletions
+7 -1
View File
@@ -24,7 +24,8 @@ project(clr)
##########
# Defaults
##########
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"
OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
add_compile_options("/wd4267" "/wd4244" "/wd4996")
string(REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE "/W3" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
@@ -32,6 +33,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/MTd)
add_compile_options(-D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Unlike when targeting MSFT's MSVC, when targeting clang-cl,
# CMake does not add these automatically. Add them ourselves.
add_compile_options("/DWIN32" "/D_WINDOWS" "/EHsc")
endif()
endif()
if (AMD_COMPUTE_WIN)
@@ -1961,4 +1961,53 @@ hipError_t hipMemcpy3DPeer(hipMemcpy3DPeerParms* p) {
}
hipError_t hipMemcpy3DPeerAsync(hipMemcpy3DPeerParms* p, hipStream_t stream) {
return hip::GetHipDispatchTable()->hipMemcpy3DPeerAsync_fn(p, stream);
}
hipError_t hipDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements,
const hipChannelFormatDesc* fmtDesc, int device) {
return hip::GetHipDispatchTable()->hipDeviceGetTexture1DLinearMaxWidth_fn(maxWidthInElements,
fmtDesc, device);
}
hipError_t hipGraphAddExternalSemaphoresSignalNode(
hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies,
size_t numDependencies, const hipExternalSemaphoreSignalNodeParams* nodeParams) {
return hip::GetHipDispatchTable()->hipGraphAddExternalSemaphoresSignalNode_fn(
pGraphNode, graph, pDependencies, numDependencies, nodeParams);
}
hipError_t hipGraphAddExternalSemaphoresWaitNode(
hipGraphNode_t* pGraphNode, hipGraph_t graph, const hipGraphNode_t* pDependencies,
size_t numDependencies, const hipExternalSemaphoreWaitNodeParams* nodeParams) {
return hip::GetHipDispatchTable()->hipGraphAddExternalSemaphoresWaitNode_fn(
pGraphNode, graph, pDependencies, numDependencies, nodeParams);
}
hipError_t hipGraphExternalSemaphoresSignalNodeSetParams(
hipGraphNode_t hNode, const hipExternalSemaphoreSignalNodeParams* nodeParams) {
return hip::GetHipDispatchTable()->hipGraphExternalSemaphoresSignalNodeSetParams_fn(hNode,
nodeParams);
}
hipError_t hipGraphExternalSemaphoresSignalNodeGetParams(
hipGraphNode_t hNode, hipExternalSemaphoreSignalNodeParams* params_out) {
return hip::GetHipDispatchTable()->hipGraphExternalSemaphoresSignalNodeGetParams_fn(hNode,
params_out);
}
hipError_t hipGraphExternalSemaphoresWaitNodeGetParams(
hipGraphNode_t hNode, hipExternalSemaphoreWaitNodeParams* params_out) {
return hip::GetHipDispatchTable()->hipGraphExternalSemaphoresWaitNodeGetParams_fn(hNode,
params_out);
}
hipError_t hipGraphExternalSemaphoresWaitNodeSetParams(
hipGraphNode_t hNode, const hipExternalSemaphoreWaitNodeParams* nodeParams) {
return hip::GetHipDispatchTable()->hipGraphExternalSemaphoresWaitNodeSetParams_fn(hNode,
nodeParams);
}
hipError_t hipGraphExecExternalSemaphoresSignalNodeSetParams(
hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
const hipExternalSemaphoreSignalNodeParams* nodeParams) {
return hip::GetHipDispatchTable()->hipGraphExecExternalSemaphoresSignalNodeSetParams_fn(
hGraphExec, hNode, nodeParams);
}
hipError_t hipGraphExecExternalSemaphoresWaitNodeSetParams(
hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
const hipExternalSemaphoreWaitNodeParams* nodeParams) {
return hip::GetHipDispatchTable()->hipGraphExecExternalSemaphoresWaitNodeSetParams_fn(
hGraphExec, hNode, nodeParams);
}