2022-02-24 16:40:14 +05:30
|
|
|
# Copyright (c) 2022 Advanced Micro Devices, Inc. All Rights Reserved.
|
2021-11-26 04:45:45 +05:30
|
|
|
#
|
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
# furnished to do so, subject to the following conditions:
|
|
|
|
|
#
|
|
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
|
# all copies or substantial portions of the Software.
|
|
|
|
|
#
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
# THE SOFTWARE.
|
|
|
|
|
|
2023-07-04 06:19:19 +01:00
|
|
|
# FIXME: cjatin
|
|
|
|
|
# This is a temp hack to pass it on windows since it has a char limit for
|
|
|
|
|
# command line. Eventually we need to use rsp files with ninja on windows.
|
|
|
|
|
# But this exposes several problems with hipcc and build system on windows.
|
|
|
|
|
# While those are fixed, this hack should allow us to pass windows CI.
|
2021-11-26 04:45:45 +05:30
|
|
|
set(TEST_SRC
|
2021-11-26 07:19:49 +05:30
|
|
|
hipGraphAddEmptyNode.cc
|
2021-11-26 07:19:12 +05:30
|
|
|
hipGraphAddDependencies.cc
|
2023-11-16 13:04:32 +00:00
|
|
|
hipGraphAddDependencies_old.cc
|
2022-05-13 22:45:31 +05:30
|
|
|
hipGraphAddEventRecordNode.cc
|
2022-11-02 08:30:06 +05:30
|
|
|
hipGraphAddEventWaitNode.cc
|
2021-11-26 07:18:18 +05:30
|
|
|
hipGraph.cc
|
|
|
|
|
hipSimpleGraphWithKernel.cc
|
|
|
|
|
hipGraphAddMemcpyNode.cc
|
2023-12-28 19:34:33 +01:00
|
|
|
hipGraphAddMemcpyNode_old.cc
|
2022-02-24 16:40:14 +05:30
|
|
|
hipGraphClone.cc
|
2022-02-24 16:41:35 +05:30
|
|
|
hipGraphInstantiateWithFlags.cc
|
2024-02-05 23:04:20 +00:00
|
|
|
hipGraphInstantiateWithParams.cc
|
2022-02-24 16:54:07 +05:30
|
|
|
hipGraphAddHostNode.cc
|
2023-03-06 04:30:35 +01:00
|
|
|
hipGraphAddMemcpyNodeFromSymbol_old.cc
|
2022-02-24 20:43:14 +05:30
|
|
|
hipGraphAddMemcpyNodeFromSymbol.cc
|
2022-02-24 20:43:51 +05:30
|
|
|
hipGraphChildGraphNodeGetGraph.cc
|
2022-02-24 20:44:23 +05:30
|
|
|
hipGraphNodeFindInClone.cc
|
2022-02-24 20:44:54 +05:30
|
|
|
hipGraphExecHostNodeSetParams.cc
|
2023-03-06 04:30:35 +01:00
|
|
|
hipGraphAddMemcpyNodeToSymbol_old.cc
|
2022-02-24 20:45:30 +05:30
|
|
|
hipGraphAddMemcpyNodeToSymbol.cc
|
2022-02-24 20:46:30 +05:30
|
|
|
hipGraphExecMemsetNodeSetParams.cc
|
2023-03-06 04:30:35 +01:00
|
|
|
hipGraphMemcpyNodeSetParamsToSymbol_old.cc
|
2022-02-24 20:47:07 +05:30
|
|
|
hipGraphMemcpyNodeSetParamsToSymbol.cc
|
2022-02-25 14:04:23 +05:30
|
|
|
hipGraphDestroyNode.cc
|
2022-02-25 14:07:38 +05:30
|
|
|
hipGraphGetNodes.cc
|
2023-11-16 13:04:32 +00:00
|
|
|
hipGraphGetNodes_old.cc
|
2022-02-25 14:07:38 +05:30
|
|
|
hipGraphGetRootNodes.cc
|
2023-11-16 13:04:32 +00:00
|
|
|
hipGraphGetRootNodes_old.cc
|
2022-02-25 18:53:36 +05:30
|
|
|
hipGraphHostNodeSetParams.cc
|
2022-02-25 18:54:14 +05:30
|
|
|
hipGraphAddMemcpyNode1D.cc
|
2022-02-25 18:54:55 +05:30
|
|
|
hipGraphAddChildGraphNode.cc
|
2022-03-11 15:26:55 +05:30
|
|
|
hipGraphNodeGetType.cc
|
2023-12-28 22:12:09 +01:00
|
|
|
hipGraphExecMemcpyNodeSetParams1D_old.cc
|
2022-03-31 10:35:21 +05:30
|
|
|
hipGraphExecMemcpyNodeSetParams1D.cc
|
2022-03-31 10:36:13 +05:30
|
|
|
hipGraphGetEdges.cc
|
2023-11-16 13:04:32 +00:00
|
|
|
hipGraphGetEdges_old.cc
|
2022-03-31 13:13:15 +05:30
|
|
|
hipGraphRemoveDependencies.cc
|
2023-11-16 13:04:32 +00:00
|
|
|
hipGraphRemoveDependencies_old.cc
|
2022-03-31 15:34:33 +05:30
|
|
|
hipGraphInstantiate.cc
|
2022-03-31 21:32:41 +05:30
|
|
|
hipGraphExecUpdate.cc
|
2022-03-31 21:41:58 +05:30
|
|
|
hipGraphExecEventRecordNodeSetEvent.cc
|
2022-06-17 05:39:11 +05:30
|
|
|
hipGraphEventWaitNodeSetEvent.cc
|
2022-04-01 05:36:26 +05:30
|
|
|
hipGraphMemsetNodeGetParams.cc
|
|
|
|
|
hipGraphMemsetNodeSetParams.cc
|
2023-03-06 04:30:35 +01:00
|
|
|
hipGraphExecMemcpyNodeSetParamsFromSymbol_old.cc
|
2022-04-01 05:37:12 +05:30
|
|
|
hipGraphExecMemcpyNodeSetParamsFromSymbol.cc
|
2022-05-17 16:00:53 +05:30
|
|
|
hipGraphEventRecordNodeGetEvent.cc
|
2022-05-17 16:01:43 +05:30
|
|
|
hipGraphEventRecordNodeSetEvent.cc
|
2022-05-13 23:38:01 +05:30
|
|
|
hipGraphEventWaitNodeGetEvent.cc
|
2022-05-13 21:34:13 +05:30
|
|
|
hipGraphExecMemcpyNodeSetParams.cc
|
2023-12-28 19:34:33 +01:00
|
|
|
hipGraphExecMemcpyNodeSetParams_old.cc
|
2022-06-02 19:31:48 +05:30
|
|
|
hipStreamBeginCapture.cc
|
2023-12-28 22:12:09 +01:00
|
|
|
hipGraphAddMemcpyNode1D_old.cc
|
2023-03-06 09:11:54 +01:00
|
|
|
hipStreamBeginCapture_old.cc
|
2022-06-15 01:52:10 +05:30
|
|
|
hipStreamIsCapturing.cc
|
2024-02-21 11:26:37 +01:00
|
|
|
hipStreamIsCapturing_old.cc
|
2024-08-07 12:45:54 +05:30
|
|
|
hipGraphMemFreeNodeGetParams.cc
|
2024-11-28 16:47:50 +05:30
|
|
|
hipGraphAsyncUserObj.cc
|
2024-11-27 23:12:00 +05:30
|
|
|
hipGraphExecBatchMemOpNodeSetParams.cc
|
2024-11-28 20:11:09 +05:30
|
|
|
hipGraphAddBatchMemOpNode.cc
|
2024-12-09 13:14:37 +05:30
|
|
|
hipGraphBatchMemOpNodeSetParams.cc
|
|
|
|
|
hipDrvGraphExecMemcpyNodeSetParams.cc
|
|
|
|
|
hipDrvGraphAddMemFreeNode.cc)
|
2023-07-04 06:19:19 +01:00
|
|
|
|
|
|
|
|
if(HIP_PLATFORM MATCHES "amd")
|
|
|
|
|
set(AMD_SRC
|
|
|
|
|
hipStreamCaptureExtModuleLaunchKernel.cc
|
2024-03-15 16:42:20 +05:30
|
|
|
hipStreamBeginCaptureToGraph.cc
|
2024-07-12 20:55:55 +05:30
|
|
|
hipGetProcAddressGraphApis.cc
|
2024-12-09 13:14:37 +05:30
|
|
|
# Below files are disbled in NVIDIA as PSDB builds are failing due to lower CUDA version.
|
|
|
|
|
hipGraphExecNodeSetParams.cc
|
|
|
|
|
hipGraphNodeSetParams.cc
|
|
|
|
|
hipGraphExecGetFlags.cc
|
2023-07-04 06:19:19 +01:00
|
|
|
)
|
|
|
|
|
set(TEST_SRC ${TEST_SRC} ${AMD_SRC})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
hip_add_exe_to_target(NAME GraphsTest1
|
|
|
|
|
TEST_SRC ${TEST_SRC}
|
|
|
|
|
TEST_TARGET_NAME build_tests)
|
|
|
|
|
|
|
|
|
|
set(TEST_SRC
|
2022-06-13 15:33:49 +05:30
|
|
|
hipStreamGetCaptureInfo.cc
|
2023-03-06 09:09:35 +01:00
|
|
|
hipStreamGetCaptureInfo_old.cc
|
2022-06-13 15:34:29 +05:30
|
|
|
hipStreamEndCapture.cc
|
2023-03-06 09:11:54 +01:00
|
|
|
hipStreamEndCapture_old.cc
|
2023-03-06 04:30:35 +01:00
|
|
|
hipGraphMemcpyNodeSetParamsFromSymbol_old.cc
|
2022-06-24 06:10:50 +05:30
|
|
|
hipGraphMemcpyNodeSetParamsFromSymbol.cc
|
2022-06-23 04:03:09 +05:30
|
|
|
hipGraphExecEventWaitNodeSetEvent.cc
|
2022-07-08 13:35:50 +05:30
|
|
|
hipGraphAddMemsetNode.cc
|
2022-07-08 15:18:09 +05:30
|
|
|
hipGraphAddKernelNode.cc
|
2022-07-08 15:19:02 +05:30
|
|
|
hipGraphMemcpyNodeGetParams.cc
|
2023-12-28 19:34:33 +01:00
|
|
|
hipGraphMemcpyNodeGetParams_old.cc
|
2022-07-08 15:19:02 +05:30
|
|
|
hipGraphMemcpyNodeSetParams.cc
|
2023-12-28 19:34:33 +01:00
|
|
|
hipGraphMemcpyNodeSetParams_old.cc
|
2022-07-19 19:27:29 +05:30
|
|
|
hipGraphKernelNodeGetParams.cc
|
|
|
|
|
hipGraphKernelNodeSetParams.cc
|
|
|
|
|
hipGraphExecKernelNodeSetParams.cc
|
2022-07-19 19:29:00 +05:30
|
|
|
hipGraphLaunch.cc
|
2023-11-16 10:53:38 +00:00
|
|
|
hipGraphLaunch_old.cc
|
2022-07-19 19:30:42 +05:30
|
|
|
hipGraphMemcpyNodeSetParams1D.cc
|
2023-12-28 22:12:09 +01:00
|
|
|
hipGraphMemcpyNodeSetParams1D_old.cc
|
2023-03-06 04:30:35 +01:00
|
|
|
hipGraphExecMemcpyNodeSetParamsToSymbol_old.cc
|
2022-07-26 10:47:49 +05:30
|
|
|
hipGraphExecMemcpyNodeSetParamsToSymbol.cc
|
2022-07-26 15:08:04 +05:30
|
|
|
hipGraphNodeGetDependentNodes.cc
|
2023-11-16 13:04:32 +00:00
|
|
|
hipGraphNodeGetDependentNodes_old.cc
|
2022-07-26 15:09:35 +05:30
|
|
|
hipGraphNodeGetDependencies.cc
|
2023-11-16 13:04:32 +00:00
|
|
|
hipGraphNodeGetDependencies_old.cc
|
2022-09-23 12:35:27 +05:30
|
|
|
hipGraphHostNodeGetParams.cc
|
2022-09-23 12:36:45 +05:30
|
|
|
hipGraphExecChildGraphNodeSetParams.cc
|
2022-11-02 11:50:51 +05:30
|
|
|
hipStreamGetCaptureInfo_v2.cc
|
2023-03-06 12:26:24 +01:00
|
|
|
hipGraphCreate.cc
|
|
|
|
|
hipGraphDestroy.cc
|
2023-03-06 09:11:54 +01:00
|
|
|
hipStreamUpdateCaptureDependencies.cc
|
|
|
|
|
hipThreadExchangeStreamCaptureMode.cc
|
|
|
|
|
hipLaunchHostFunc.cc
|
2023-03-06 09:09:35 +01:00
|
|
|
hipStreamGetCaptureInfo_v2_old.cc
|
2022-11-28 20:15:49 +05:30
|
|
|
hipUserObjectCreate.cc
|
2023-06-21 08:22:14 +02:00
|
|
|
hipUserObjectRelease.cc
|
|
|
|
|
hipUserObjectRetain.cc
|
|
|
|
|
hipGraphReleaseUserObject.cc
|
|
|
|
|
hipGraphRetainUserObject.cc
|
2023-01-05 08:02:24 +05:30
|
|
|
hipGraphDebugDotPrint.cc
|
2023-01-05 06:56:28 +05:30
|
|
|
hipGraphCloneComplx.cc
|
2023-02-23 22:31:16 +05:30
|
|
|
hipGraphNodeSetEnabled.cc
|
2023-02-28 11:37:49 +05:30
|
|
|
hipGraphNodeGetEnabled.cc
|
2023-01-16 16:31:04 +05:30
|
|
|
hipGraphExecDestroy.cc
|
2023-01-16 16:31:47 +05:30
|
|
|
hipGraphUpload.cc
|
2023-03-24 15:59:08 +05:30
|
|
|
hipGraphKernelNodeCopyAttributes.cc
|
2023-08-14 20:59:59 +05:30
|
|
|
hipGraphAddNodeBeginCapture.cc
|
2023-06-29 08:57:20 +05:30
|
|
|
hipGraphCycle.cc
|
2023-09-01 16:30:46 +05:30
|
|
|
hipGraphPerf.cc
|
2023-06-21 15:57:52 +05:30
|
|
|
hipGraphKernelNodeGetAttribute.cc
|
2023-09-04 16:06:29 +05:30
|
|
|
hipGraphKernelNodeSetAttribute.cc
|
|
|
|
|
hipGraphMemAllocNodeGetParams.cc
|
2023-12-15 15:41:32 +05:30
|
|
|
hipGraphAddMemAllocNode.cc
|
2023-10-30 16:26:51 +00:00
|
|
|
hipGraphAddMemFreeNode.cc
|
2023-12-22 15:47:34 +00:00
|
|
|
hipDrvGraphMemcpyNodeGetParams.cc
|
|
|
|
|
hipDrvGraphMemcpyNodeSetParams.cc
|
2023-12-28 18:29:54 +01:00
|
|
|
hipDeviceSetGraphMemAttribute.cc
|
|
|
|
|
hipDeviceGetGraphMemAttribute.cc
|
|
|
|
|
hipDeviceGraphMemTrim.cc
|
2024-12-06 18:19:40 +05:30
|
|
|
hipDrvGraphExecMemsetNodeSetParams.cc
|
2023-09-04 16:06:29 +05:30
|
|
|
)
|
2023-06-21 15:56:36 +05:30
|
|
|
|
2024-03-04 11:51:34 +05:30
|
|
|
if(HIP_PLATFORM MATCHES "amd")
|
|
|
|
|
set(AMD_SRC
|
|
|
|
|
# hipGraphAddNode, hipGraphNodeParams, hipMemcpyNodeParams are not mapped to Nvidia
|
|
|
|
|
hipGraphAddNode.cc
|
|
|
|
|
# hipDrvGraphAddMemsetNode, HIP_MEMSET_NODE_PARAMS are not mapped to Nvidia
|
|
|
|
|
hipDrvGraphAddMemsetNode.cc
|
|
|
|
|
# hipDrvGraphAddMemcpyNode not mapped to Nvidia
|
|
|
|
|
hipDrvGraphAddMemcpyNode.cc
|
|
|
|
|
)
|
|
|
|
|
set(TEST_SRC ${TEST_SRC} ${AMD_SRC})
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-06-24 21:42:11 -07:00
|
|
|
add_custom_target(add_Kernel.code COMMAND ${CMAKE_CXX_COMPILER} --genco ${OFFLOAD_ARCH_STR} ${CMAKE_CURRENT_SOURCE_DIR}/add_Kernel.cpp -o ${CMAKE_CURRENT_BINARY_DIR}/../graph/add_Kernel.code -I${HIP_PATH}/include/ -I${CMAKE_CURRENT_SOURCE_DIR}/../../include --hip-path=${HIP_PATH})
|
2024-10-23 16:14:59 -07:00
|
|
|
set_property(GLOBAL APPEND PROPERTY
|
|
|
|
|
G_INSTALL_CUSTOM_TARGETS ${CMAKE_CURRENT_BINARY_DIR}/add_Kernel.code)
|
2023-07-08 20:54:08 +05:30
|
|
|
|
2023-07-04 06:19:19 +01:00
|
|
|
hip_add_exe_to_target(NAME GraphsTest2
|
2021-12-15 20:41:13 -08:00
|
|
|
TEST_SRC ${TEST_SRC}
|
|
|
|
|
TEST_TARGET_NAME build_tests)
|
2023-06-21 15:56:36 +05:30
|
|
|
|
|
|
|
|
if(HIP_PLATFORM MATCHES "amd")
|
2025-06-24 21:42:11 -07:00
|
|
|
add_custom_target(hipMatMul COMMAND ${CMAKE_CXX_COMPILER} --genco ${OFFLOAD_ARCH_STR} ${CMAKE_CURRENT_SOURCE_DIR}/hipMatMul.cc -o ${CMAKE_CURRENT_BINARY_DIR}/../../unit/graph/hipMatMul.code -I${CMAKE_CURRENT_SOURCE_DIR}/../../../../include/ -I${CMAKE_CURRENT_SOURCE_DIR}/../../include --hip-path=${HIP_PATH})
|
2023-06-21 15:56:36 +05:30
|
|
|
add_dependencies(build_tests hipMatMul)
|
2024-10-23 16:14:59 -07:00
|
|
|
set_property(GLOBAL APPEND PROPERTY
|
|
|
|
|
G_INSTALL_CUSTOM_TARGETS ${CMAKE_CURRENT_BINARY_DIR}/hipMatMul.code)
|
2023-06-21 15:56:36 +05:30
|
|
|
endif()
|
2023-07-08 20:54:08 +05:30
|
|
|
|
|
|
|
|
add_dependencies(build_tests add_Kernel.code)
|