diff --git a/MAINTAINERS.md b/MAINTAINERS.md --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -3,3 +3,6 @@ - Jacek Jagosz - IRC: JacekJagosz - Email: jacek.jagosz@outlook.com +- Gavin Zhao + - Email: me@gzgz.dev + - Matrix: @gzgavinzhao:matrix.org diff --git a/abi_libs b/abi_libs --- a/abi_libs +++ b/abi_libs @@ -1,2 +1,3 @@ libamdhip64.so.5 libhiprtc-builtins.so.5 +libhiprtc.so.5 diff --git a/abi_symbols b/abi_symbols --- a/abi_symbols +++ b/abi_symbols @@ -55,12 +55,17 @@ libamdhip64.so.5:hipDeviceGetAttribute libamdhip64.so.5:hipDeviceGetByPCIBusId libamdhip64.so.5:hipDeviceGetCacheConfig +libamdhip64.so.5:hipDeviceGetDefaultMemPool +libamdhip64.so.5:hipDeviceGetGraphMemAttribute libamdhip64.so.5:hipDeviceGetLimit +libamdhip64.so.5:hipDeviceGetMemPool libamdhip64.so.5:hipDeviceGetName libamdhip64.so.5:hipDeviceGetP2PAttribute libamdhip64.so.5:hipDeviceGetPCIBusId libamdhip64.so.5:hipDeviceGetSharedMemConfig libamdhip64.so.5:hipDeviceGetStreamPriorityRange +libamdhip64.so.5:hipDeviceGetUuid +libamdhip64.so.5:hipDeviceGraphMemTrim libamdhip64.so.5:hipDevicePrimaryCtxGetState libamdhip64.so.5:hipDevicePrimaryCtxRelease libamdhip64.so.5:hipDevicePrimaryCtxReset @@ -68,6 +73,9 @@ libamdhip64.so.5:hipDevicePrimaryCtxSetFlags libamdhip64.so.5:hipDeviceReset libamdhip64.so.5:hipDeviceSetCacheConfig +libamdhip64.so.5:hipDeviceSetGraphMemAttribute +libamdhip64.so.5:hipDeviceSetLimit +libamdhip64.so.5:hipDeviceSetMemPool libamdhip64.so.5:hipDeviceSetSharedMemConfig libamdhip64.so.5:hipDeviceSynchronize libamdhip64.so.5:hipDeviceTotalMem @@ -76,13 +84,13 @@ libamdhip64.so.5:hipDrvMemcpy3D libamdhip64.so.5:hipDrvMemcpy3DAsync libamdhip64.so.5:hipDrvPointerGetAttributes -libamdhip64.so.5:hipEnableActivityCallback libamdhip64.so.5:hipEventCreate libamdhip64.so.5:hipEventCreateWithFlags libamdhip64.so.5:hipEventDestroy libamdhip64.so.5:hipEventElapsedTime libamdhip64.so.5:hipEventQuery libamdhip64.so.5:hipEventRecord +libamdhip64.so.5:hipEventRecord_spt libamdhip64.so.5:hipEventSynchronize libamdhip64.so.5:hipExtGetLinkTypeAndHopCount libamdhip64.so.5:hipExtLaunchKernel @@ -93,6 +101,7 @@ libamdhip64.so.5:hipExternalMemoryGetMappedBuffer libamdhip64.so.5:hipFree libamdhip64.so.5:hipFreeArray +libamdhip64.so.5:hipFreeAsync libamdhip64.so.5:hipFreeHost libamdhip64.so.5:hipFreeMipmappedArray libamdhip64.so.5:hipFuncGetAttribute @@ -159,9 +168,12 @@ libamdhip64.so.5:hipGraphHostNodeSetParams libamdhip64.so.5:hipGraphInstantiate libamdhip64.so.5:hipGraphInstantiateWithFlags +libamdhip64.so.5:hipGraphKernelNodeGetAttribute libamdhip64.so.5:hipGraphKernelNodeGetParams +libamdhip64.so.5:hipGraphKernelNodeSetAttribute libamdhip64.so.5:hipGraphKernelNodeSetParams libamdhip64.so.5:hipGraphLaunch +libamdhip64.so.5:hipGraphLaunch_spt libamdhip64.so.5:hipGraphMemcpyNodeGetParams libamdhip64.so.5:hipGraphMemcpyNodeSetParams libamdhip64.so.5:hipGraphMemcpyNodeSetParams1D @@ -173,7 +185,9 @@ libamdhip64.so.5:hipGraphNodeGetDependencies libamdhip64.so.5:hipGraphNodeGetDependentNodes libamdhip64.so.5:hipGraphNodeGetType +libamdhip64.so.5:hipGraphReleaseUserObject libamdhip64.so.5:hipGraphRemoveDependencies +libamdhip64.so.5:hipGraphRetainUserObject libamdhip64.so.5:hipGraphicsGLRegisterBuffer libamdhip64.so.5:hipGraphicsGLRegisterImage libamdhip64.so.5:hipGraphicsMapResources @@ -191,7 +205,6 @@ libamdhip64.so.5:hipImportExternalMemory libamdhip64.so.5:hipImportExternalSemaphore libamdhip64.so.5:hipInit -libamdhip64.so.5:hipInitActivityCallback libamdhip64.so.5:hipIpcCloseMemHandle libamdhip64.so.5:hipIpcGetEventHandle libamdhip64.so.5:hipIpcGetMemHandle @@ -202,42 +215,83 @@ libamdhip64.so.5:hipLaunchByPtr libamdhip64.so.5:hipLaunchCooperativeKernel libamdhip64.so.5:hipLaunchCooperativeKernelMultiDevice +libamdhip64.so.5:hipLaunchCooperativeKernel_spt libamdhip64.so.5:hipLaunchKernel +libamdhip64.so.5:hipLaunchKernel_spt libamdhip64.so.5:hipMalloc libamdhip64.so.5:hipMalloc3D libamdhip64.so.5:hipMalloc3DArray libamdhip64.so.5:hipMallocArray +libamdhip64.so.5:hipMallocAsync +libamdhip64.so.5:hipMallocFromPoolAsync libamdhip64.so.5:hipMallocHost libamdhip64.so.5:hipMallocManaged libamdhip64.so.5:hipMallocMipmappedArray libamdhip64.so.5:hipMallocPitch +libamdhip64.so.5:hipMemAddressFree +libamdhip64.so.5:hipMemAddressReserve libamdhip64.so.5:hipMemAdvise libamdhip64.so.5:hipMemAllocHost libamdhip64.so.5:hipMemAllocPitch +libamdhip64.so.5:hipMemCreate +libamdhip64.so.5:hipMemExportToShareableHandle +libamdhip64.so.5:hipMemGetAccess libamdhip64.so.5:hipMemGetAddressRange +libamdhip64.so.5:hipMemGetAllocationGranularity +libamdhip64.so.5:hipMemGetAllocationPropertiesFromHandle libamdhip64.so.5:hipMemGetInfo +libamdhip64.so.5:hipMemImportFromShareableHandle +libamdhip64.so.5:hipMemMap +libamdhip64.so.5:hipMemMapArrayAsync +libamdhip64.so.5:hipMemPoolCreate +libamdhip64.so.5:hipMemPoolDestroy +libamdhip64.so.5:hipMemPoolExportPointer +libamdhip64.so.5:hipMemPoolExportToShareableHandle +libamdhip64.so.5:hipMemPoolGetAccess +libamdhip64.so.5:hipMemPoolGetAttribute +libamdhip64.so.5:hipMemPoolImportFromShareableHandle +libamdhip64.so.5:hipMemPoolImportPointer +libamdhip64.so.5:hipMemPoolSetAccess +libamdhip64.so.5:hipMemPoolSetAttribute +libamdhip64.so.5:hipMemPoolTrimTo libamdhip64.so.5:hipMemPrefetchAsync libamdhip64.so.5:hipMemPtrGetInfo libamdhip64.so.5:hipMemRangeGetAttribute libamdhip64.so.5:hipMemRangeGetAttributes +libamdhip64.so.5:hipMemRelease +libamdhip64.so.5:hipMemRetainAllocationHandle +libamdhip64.so.5:hipMemSetAccess +libamdhip64.so.5:hipMemUnmap libamdhip64.so.5:hipMemcpy libamdhip64.so.5:hipMemcpy2D libamdhip64.so.5:hipMemcpy2DAsync +libamdhip64.so.5:hipMemcpy2DAsync_spt libamdhip64.so.5:hipMemcpy2DFromArray libamdhip64.so.5:hipMemcpy2DFromArrayAsync +libamdhip64.so.5:hipMemcpy2DFromArrayAsync_spt +libamdhip64.so.5:hipMemcpy2DFromArray_spt libamdhip64.so.5:hipMemcpy2DToArray libamdhip64.so.5:hipMemcpy2DToArrayAsync +libamdhip64.so.5:hipMemcpy2DToArrayAsync_spt +libamdhip64.so.5:hipMemcpy2DToArray_spt +libamdhip64.so.5:hipMemcpy2D_spt libamdhip64.so.5:hipMemcpy3D libamdhip64.so.5:hipMemcpy3DAsync +libamdhip64.so.5:hipMemcpy3DAsync_spt +libamdhip64.so.5:hipMemcpy3D_spt libamdhip64.so.5:hipMemcpyAsync +libamdhip64.so.5:hipMemcpyAsync_spt libamdhip64.so.5:hipMemcpyAtoH libamdhip64.so.5:hipMemcpyDtoD libamdhip64.so.5:hipMemcpyDtoDAsync libamdhip64.so.5:hipMemcpyDtoH libamdhip64.so.5:hipMemcpyDtoHAsync libamdhip64.so.5:hipMemcpyFromArray +libamdhip64.so.5:hipMemcpyFromArray_spt libamdhip64.so.5:hipMemcpyFromSymbol libamdhip64.so.5:hipMemcpyFromSymbolAsync +libamdhip64.so.5:hipMemcpyFromSymbolAsync_spt +libamdhip64.so.5:hipMemcpyFromSymbol_spt libamdhip64.so.5:hipMemcpyHtoA libamdhip64.so.5:hipMemcpyHtoD libamdhip64.so.5:hipMemcpyHtoDAsync @@ -248,19 +302,28 @@ libamdhip64.so.5:hipMemcpyToArray libamdhip64.so.5:hipMemcpyToSymbol libamdhip64.so.5:hipMemcpyToSymbolAsync +libamdhip64.so.5:hipMemcpyToSymbolAsync_spt +libamdhip64.so.5:hipMemcpyToSymbol_spt libamdhip64.so.5:hipMemcpyWithStream +libamdhip64.so.5:hipMemcpy_spt libamdhip64.so.5:hipMemset libamdhip64.so.5:hipMemset2D libamdhip64.so.5:hipMemset2DAsync +libamdhip64.so.5:hipMemset2DAsync_spt +libamdhip64.so.5:hipMemset2D_spt libamdhip64.so.5:hipMemset3D libamdhip64.so.5:hipMemset3DAsync +libamdhip64.so.5:hipMemset3DAsync_spt +libamdhip64.so.5:hipMemset3D_spt libamdhip64.so.5:hipMemsetAsync +libamdhip64.so.5:hipMemsetAsync_spt libamdhip64.so.5:hipMemsetD16 libamdhip64.so.5:hipMemsetD16Async libamdhip64.so.5:hipMemsetD32 libamdhip64.so.5:hipMemsetD32Async libamdhip64.so.5:hipMemsetD8 libamdhip64.so.5:hipMemsetD8Async +libamdhip64.so.5:hipMemset_spt libamdhip64.so.5:hipMipmappedArrayCreate libamdhip64.so.5:hipMipmappedArrayDestroy libamdhip64.so.5:hipMipmappedArrayGetLevel @@ -284,32 +347,40 @@ libamdhip64.so.5:hipPointerGetAttributes libamdhip64.so.5:hipProfilerStart libamdhip64.so.5:hipProfilerStop -libamdhip64.so.5:hipRegisterActivityCallback -libamdhip64.so.5:hipRegisterApiCallback -libamdhip64.so.5:hipRemoveActivityCallback -libamdhip64.so.5:hipRemoveApiCallback +libamdhip64.so.5:hipRegisterTracerCallback libamdhip64.so.5:hipRuntimeGetVersion libamdhip64.so.5:hipSetDevice libamdhip64.so.5:hipSetDeviceFlags libamdhip64.so.5:hipSetupArgument libamdhip64.so.5:hipSignalExternalSemaphoresAsync libamdhip64.so.5:hipStreamAddCallback +libamdhip64.so.5:hipStreamAddCallback_spt libamdhip64.so.5:hipStreamAttachMemAsync libamdhip64.so.5:hipStreamBeginCapture +libamdhip64.so.5:hipStreamBeginCapture_spt libamdhip64.so.5:hipStreamCreate libamdhip64.so.5:hipStreamCreateWithFlags libamdhip64.so.5:hipStreamCreateWithPriority libamdhip64.so.5:hipStreamDestroy libamdhip64.so.5:hipStreamEndCapture +libamdhip64.so.5:hipStreamEndCapture_spt libamdhip64.so.5:hipStreamGetCaptureInfo +libamdhip64.so.5:hipStreamGetCaptureInfo_spt libamdhip64.so.5:hipStreamGetCaptureInfo_v2 +libamdhip64.so.5:hipStreamGetCaptureInfo_v2_spt libamdhip64.so.5:hipStreamGetFlags +libamdhip64.so.5:hipStreamGetFlags_spt libamdhip64.so.5:hipStreamGetPriority +libamdhip64.so.5:hipStreamGetPriority_spt libamdhip64.so.5:hipStreamIsCapturing +libamdhip64.so.5:hipStreamIsCapturing_spt libamdhip64.so.5:hipStreamQuery +libamdhip64.so.5:hipStreamQuery_spt libamdhip64.so.5:hipStreamSynchronize +libamdhip64.so.5:hipStreamSynchronize_spt libamdhip64.so.5:hipStreamUpdateCaptureDependencies libamdhip64.so.5:hipStreamWaitEvent +libamdhip64.so.5:hipStreamWaitEvent_spt libamdhip64.so.5:hipStreamWaitValue32 libamdhip64.so.5:hipStreamWaitValue64 libamdhip64.so.5:hipStreamWriteValue32 @@ -341,18 +412,47 @@ libamdhip64.so.5:hipTexRefSetMipmapLevelBias libamdhip64.so.5:hipTexRefSetMipmapLevelClamp libamdhip64.so.5:hipTexRefSetMipmappedArray +libamdhip64.so.5:hipThreadExchangeStreamCaptureMode libamdhip64.so.5:hipUnbindTexture +libamdhip64.so.5:hipUserObjectCreate +libamdhip64.so.5:hipUserObjectRelease +libamdhip64.so.5:hipUserObjectRetain libamdhip64.so.5:hipWaitExternalSemaphoresAsync libamdhip64.so.5:hiprtcAddNameExpression libamdhip64.so.5:hiprtcCompileProgram libamdhip64.so.5:hiprtcCreateProgram libamdhip64.so.5:hiprtcDestroyProgram +libamdhip64.so.5:hiprtcGetBitcode +libamdhip64.so.5:hiprtcGetBitcodeSize libamdhip64.so.5:hiprtcGetCode libamdhip64.so.5:hiprtcGetCodeSize libamdhip64.so.5:hiprtcGetErrorString libamdhip64.so.5:hiprtcGetLoweredName libamdhip64.so.5:hiprtcGetProgramLog libamdhip64.so.5:hiprtcGetProgramLogSize +libamdhip64.so.5:hiprtcLinkAddData +libamdhip64.so.5:hiprtcLinkAddFile +libamdhip64.so.5:hiprtcLinkComplete +libamdhip64.so.5:hiprtcLinkCreate +libamdhip64.so.5:hiprtcLinkDestroy libamdhip64.so.5:hiprtcVersion libhiprtc-builtins.so.5:__hipRTC_header libhiprtc-builtins.so.5:__hipRTC_header_size +libhiprtc.so.5:hiprtcAddNameExpression +libhiprtc.so.5:hiprtcCompileProgram +libhiprtc.so.5:hiprtcCreateProgram +libhiprtc.so.5:hiprtcDestroyProgram +libhiprtc.so.5:hiprtcGetBitcode +libhiprtc.so.5:hiprtcGetBitcodeSize +libhiprtc.so.5:hiprtcGetCode +libhiprtc.so.5:hiprtcGetCodeSize +libhiprtc.so.5:hiprtcGetErrorString +libhiprtc.so.5:hiprtcGetLoweredName +libhiprtc.so.5:hiprtcGetProgramLog +libhiprtc.so.5:hiprtcGetProgramLogSize +libhiprtc.so.5:hiprtcLinkAddData +libhiprtc.so.5:hiprtcLinkAddFile +libhiprtc.so.5:hiprtcLinkComplete +libhiprtc.so.5:hiprtcLinkCreate +libhiprtc.so.5:hiprtcLinkDestroy +libhiprtc.so.5:hiprtcVersion diff --git a/abi_used_libs b/abi_used_libs --- a/abi_used_libs +++ b/abi_used_libs @@ -3,4 +3,5 @@ libgcc_s.so.1 libhsa-runtime64.so.1 libm.so.6 +libnuma.so.1 libstdc++.so.6 diff --git a/abi_used_symbols b/abi_used_symbols --- a/abi_used_symbols +++ b/abi_used_symbols @@ -68,6 +68,7 @@ libc.so.6:pthread_sigmask libc.so.6:puts libc.so.6:readlink +libc.so.6:realloc libc.so.6:remove libc.so.6:rmdir libc.so.6:sched_yield @@ -119,6 +120,7 @@ libhsa-runtime64.so.1:hsa_amd_ipc_memory_detach libhsa-runtime64.so.1:hsa_amd_memory_async_copy libhsa-runtime64.so.1:hsa_amd_memory_async_copy_rect +libhsa-runtime64.so.1:hsa_amd_memory_fill libhsa-runtime64.so.1:hsa_amd_memory_lock_to_pool libhsa-runtime64.so.1:hsa_amd_memory_pool_allocate libhsa-runtime64.so.1:hsa_amd_memory_pool_free @@ -181,6 +183,14 @@ libhsa-runtime64.so.1:hsa_system_get_info libhsa-runtime64.so.1:hsa_system_get_major_extension_table libm.so.6:pow +libnuma.so.1:get_mempolicy +libnuma.so.1:numa_allocate_cpumask +libnuma.so.1:numa_available +libnuma.so.1:numa_bitmask_alloc +libnuma.so.1:numa_bitmask_free +libnuma.so.1:numa_node_to_cpus +libnuma.so.1:numa_num_possible_nodes +libnuma.so.1:numa_sched_setaffinity libstdc++.so.6:_ZNKSt12__basic_fileIcE7is_openEv libstdc++.so.6:_ZNKSt5ctypeIcE13_M_widen_initEv libstdc++.so.6:_ZNKSt6locale2id5_M_idEv @@ -217,13 +227,11 @@ libstdc++.so.6:_ZNSo9_M_insertImEERSoT_ libstdc++.so.6:_ZNSo9_M_insertIyEERSoT_ libstdc++.so.6:_ZNSolsEi -libstdc++.so.6:_ZNSolsEj libstdc++.so.6:_ZNSt11regex_errorD1Ev libstdc++.so.6:_ZNSt13basic_filebufIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode libstdc++.so.6:_ZNSt13basic_filebufIcSt11char_traitsIcEE5closeEv -libstdc++.so.6:_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev libstdc++.so.6:_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev -libstdc++.so.6:_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev +libstdc++.so.6:_ZNSt13basic_fstreamIcSt11char_traitsIcEED2Ev libstdc++.so.6:_ZNSt13random_device7_M_finiEv libstdc++.so.6:_ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE libstdc++.so.6:_ZNSt13random_device9_M_getvalEv @@ -231,7 +239,7 @@ libstdc++.so.6:_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode libstdc++.so.6:_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode libstdc++.so.6:_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev -libstdc++.so.6:_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev +libstdc++.so.6:_ZNSt14basic_ifstreamIcSt11char_traitsIcEED2Ev libstdc++.so.6:_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv libstdc++.so.6:_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode libstdc++.so.6:_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode @@ -254,6 +262,7 @@ libstdc++.so.6:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_ libstdc++.so.6:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm libstdc++.so.6:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm +libstdc++.so.6:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_ libstdc++.so.6:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev libstdc++.so.6:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_ libstdc++.so.6:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc @@ -299,7 +308,6 @@ libstdc++.so.6:_ZSt2wsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_ libstdc++.so.6:_ZSt4cerr libstdc++.so.6:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ -libstdc++.so.6:_ZSt5flushIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ libstdc++.so.6:_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_ libstdc++.so.6:_ZSt7nothrow libstdc++.so.6:_ZSt9terminatev @@ -317,7 +325,6 @@ libstdc++.so.6:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE libstdc++.so.6:_ZTTSt13basic_fstreamIcSt11char_traitsIcEE libstdc++.so.6:_ZTTSt14basic_ifstreamIcSt11char_traitsIcEE -libstdc++.so.6:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE libstdc++.so.6:_ZTVN10__cxxabiv117__class_type_infoE libstdc++.so.6:_ZTVN10__cxxabiv120__si_class_type_infoE libstdc++.so.6:_ZTVN10__cxxabiv121__vmi_class_type_infoE diff --git a/files/0001-Fix-hipcc.pl-paths-for-Solus.patch b/files/0001-Fix-hipcc.pl-paths-for-Solus.patch new file mode 100644 --- /dev/null +++ b/files/0001-Fix-hipcc.pl-paths-for-Solus.patch @@ -0,0 +1,39 @@ +From a2f8d2d498990cbde80599f75d5935f06504f178 Mon Sep 17 00:00:00 2001 +From: Jacek Jagosz +Date: Mon, 1 May 2023 01:18:12 +0200 +Subject: [PATCH] Fix hipcc.pl paths for Solus + +--- + bin/hipcc.pl | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/bin/hipcc.pl b/bin/hipcc.pl +index 645ae62d..0543c1fb 100755 +--- a/bin/hipcc.pl ++++ b/bin/hipcc.pl +@@ -612,7 +612,7 @@ if($HIP_PLATFORM eq "amd"){ + $targetsStr = $ENV{HCC_AMDGPU_TARGET}; + } elsif (not $isWindows) { + # Else try using rocm_agent_enumerator +- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator"; ++ $ROCM_AGENT_ENUM = "/usr/bin/rocm_agent_enumerator"; + $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`; + $targetsStr =~ s/\n/,/g; + } +@@ -716,12 +716,7 @@ if ($HIP_PLATFORM eq "amd") { + $toolArgs = ${toolArgs} . " -Wl,--enable-new-dtags -Wl,-rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 "; + } + # To support __fp16 and _Float16, explicitly link with compiler-rt +- $HIP_CLANG_BUILTIN_LIB="$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET/libclang_rt.builtins.a"; +- if (-e $HIP_CLANG_BUILTIN_LIB) { +- $toolArgs .= " -L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET -lclang_rt.builtins " +- } else { +- $toolArgs .= " -L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/linux -lclang_rt.builtins-x86_64 " +- } ++ $toolArgs .= " -L/usr/lib64/clang/15.0.7/lib/x86_64-solus-linux/ " + } + } + +-- +2.40.1 + diff --git a/files/0001-Revert-hip-Fix-and-install-cmake-targets-for-hip-pac.patch b/files/0001-Revert-hip-Fix-and-install-cmake-targets-for-hip-pac.patch deleted file mode 100644 --- a/files/0001-Revert-hip-Fix-and-install-cmake-targets-for-hip-pac.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 79ccef826de969c9639d4f12d0145356d32d418d Mon Sep 17 00:00:00 2001 -From: Jeremy Newton -Date: Mon, 4 Apr 2022 10:39:16 -0400 -Subject: [PATCH 1/2] Revert "hip:Fix and install cmake targets for hip - package" - -This reverts commit 5532a4a8155c5413ed6162cc7db7c61709c1ca46. ---- - packaging/CMakeLists.txt | 21 ++++++++++++++++----- - 1 file changed, 16 insertions(+), 5 deletions(-) - -diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt -index 58ba3341..ca368f9d 100644 ---- a/packaging/CMakeLists.txt -+++ b/packaging/CMakeLists.txt -@@ -53,15 +53,26 @@ if(HIP_PLATFORM STREQUAL "amd" ) - install(FILES ${CMAKE_BINARY_DIR}/lib/libamdhip64.a DESTINATION lib COMPONENT binary) - endif()#End BUILD_SHARED_LIBS - --#TODO:This do not belong in BINARY package. -+#TODO:This do not belog in BINARY package. - #Keeping it as is for now - install(FILES ${CMAKE_BINARY_DIR}/.hipInfo DESTINATION lib COMPONENT binary) - install(FILES ${CMAKE_BINARY_DIR}/hip-config.cmake ${CMAKE_BINARY_DIR}/hip-config-version.cmake DESTINATION lib/cmake/hip COMPONENT binary) --install ( EXPORT hip-targets FILE hip-targets.cmake NAMESPACE hip:: DESTINATION lib/cmake/hip COMPONENT binary) -- - install(FILES ${CMAKE_BINARY_DIR}/src/hip-lang-config.cmake ${CMAKE_BINARY_DIR}/src/hip-lang-config-version.cmake DESTINATION lib/cmake/hip-lang COMPONENT binary) -- --install ( EXPORT hip-lang-targets FILE hip-lang-targets.cmake NAMESPACE hip-lang:: DESTINATION lib/cmake/hip-lang COMPONENT binary) -+## cmake generated target files contains IMPORTED_LOCATION_RELEASE etc. which -+## is installation path when building the project, which may be different from -+## the intallation path for packaging. These paths have to be replaced by -+## the package installation path, otherwise apps using pkg-config will fail. -+file(GLOB _target_files ${CONFIG_PACKAGE_INSTALL_DIR}/hip-targets*.cmake) -+foreach(_target_file ${_target_files}) -+ execute_process(COMMAND sed -i s:${CMAKE_INSTALL_PREFIX}:${CPACK_INSTALL_PREFIX}:g ${_target_file}) -+endforeach() -+install(FILES ${_target_files} DESTINATION lib/cmake/hip COMPONENT BINARY) -+ -+file(GLOB _target_files ${CONFIG_LANG_PACKAGE_INSTALL_DIR}/hip-lang-targets*.cmake) -+foreach(_target_file ${_target_files}) -+ execute_process(COMMAND sed -i s:{CMAKE_INSTALL_PREFIX}:${CPACK_INSTALL_PREFIX}:g ${_target_file}) -+endforeach() -+install(FILES ${_target_files} DESTINATION lib/cmake/hip-lang COMPONENT BINARY) - - endif()#End HIP_PLATFORM = "amd" - #End bianry files install --- -2.34.1 - diff --git a/files/0001-SWDEV-321118-Use-GNUInstallDirs.patch b/files/0001-SWDEV-321118-Use-GNUInstallDirs.patch deleted file mode 100644 --- a/files/0001-SWDEV-321118-Use-GNUInstallDirs.patch +++ /dev/null @@ -1,126 +0,0 @@ -From f86726945b821939a2d4620094f4f5f0a866a564 Mon Sep 17 00:00:00 2001 -From: Jeremy Newton -Date: Mon, 31 Jan 2022 17:54:14 -0500 -Subject: [PATCH 1/3] SWDEV-321118 - Use GNUInstallDirs - -Use GNUInstallDirs variables to determine the location of BINDIR, -LIBDIR, DOCDIR, and SYSCONFDIR. - -Signed-off-by: Jeremy Newton -Change-Id: Ifb38263dce80d80c5ebb4eacd8e49c76bb013a44 ---- - CMakeLists.txt | 2 +- - packaging/CMakeLists.txt | 12 ++++++------ - packaging/rocm-ocl-icd.postinst | 4 ++-- - packaging/rocm-ocl-icd.prerm | 4 ++-- - packaging/rocm-ocl-icd.rpm_post | 4 ++-- - packaging/rocm-ocl-icd.rpm_postun | 4 ++-- - 6 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e5c4537..0612fa2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -5,7 +5,7 @@ if (POLICY CMP0048) - set(PROJ_VERSION VERSION 1.5.0) - endif() - --project(opencl) -+project(rocm-opencl) - - include(GNUInstallDirs) - -diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt -index 13a2185..2b6fa77 100644 ---- a/packaging/CMakeLists.txt -+++ b/packaging/CMakeLists.txt -@@ -1,13 +1,13 @@ - cmake_minimum_required(VERSION 3.5.1) --project(rocm-opencl) -+include(GNUInstallDirs) - - set(CPACK_COMPONENTS_ALL binary dev icd) - set(CPACK_DEB_COMPONENT_INSTALL ON) - set(CPACK_RPM_COMPONENT_INSTALL ON) - --install(TARGETS clinfo DESTINATION bin COMPONENT binary) --install(TARGETS amdocl DESTINATION lib COMPONENT binary) --install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt DESTINATION share/doc/${CMAKE_PROJECT_NAME} COMPONENT binary) -+install(TARGETS clinfo DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT binary) -+install(TARGETS amdocl DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary) -+install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary) - - install(DIRECTORY ${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2/CL - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT dev -@@ -17,8 +17,8 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2/CL - PATTERN cl_dx9_media_sharing.h EXCLUDE - PATTERN cl_egl.h EXCLUDE ) - --install(TARGETS OpenCL DESTINATION lib COMPONENT icd ) --install(FILES ${CMAKE_SOURCE_DIR}/khronos/icd/LICENSE DESTINATION share/doc/rocm-ocl-icd COMPONENT icd) -+install(TARGETS OpenCL DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT icd ) -+install(FILES ${CMAKE_SOURCE_DIR}/khronos/icd/LICENSE DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/rocm-ocl-icd COMPONENT icd) - - - # Generic CPACK variables -diff --git a/packaging/rocm-ocl-icd.postinst b/packaging/rocm-ocl-icd.postinst -index 0780970..7c46ade 100644 ---- a/packaging/rocm-ocl-icd.postinst -+++ b/packaging/rocm-ocl-icd.postinst -@@ -6,8 +6,8 @@ INSTALL_PATH=@CPACK_PACKAGING_INSTALL_PREFIX@ - ROCM_LIBPATH=@ROCM_PATH@/lib - - do_ldconfig() { -- echo ${INSTALL_PATH}/lib > /etc/ld.so.conf.d/10-rocm-opencl.conf && ldconfig -- mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@) -+ echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig -+ mkdir -p /@CMAKE_INSTALL_SYSCONFDIR@/OpenCL/vendors && (echo libamdocl64.so > /@CMAKE_INSTALL_SYSCONFDIR@/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@) - } - - case "$1" in -diff --git a/packaging/rocm-ocl-icd.prerm b/packaging/rocm-ocl-icd.prerm -index 9fc6c8d..e0b5417 100644 ---- a/packaging/rocm-ocl-icd.prerm -+++ b/packaging/rocm-ocl-icd.prerm -@@ -3,8 +3,8 @@ - set -e - - rm_ldconfig() { -- rm -f /etc/ld.so.conf.d/10-rocm-opencl.conf && ldconfig -- rm -f /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@ -+ rm -f /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig -+ rm -f /@CMAKE_INSTALL_SYSCONFDIR@/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@ - } - - case "$1" in -diff --git a/packaging/rocm-ocl-icd.rpm_post b/packaging/rocm-ocl-icd.rpm_post -index 7ce5d97..49129ce 100644 ---- a/packaging/rocm-ocl-icd.rpm_post -+++ b/packaging/rocm-ocl-icd.rpm_post -@@ -1,8 +1,8 @@ - INSTALL_PATH=@CPACK_PACKAGING_INSTALL_PREFIX@ - ROCM_LIBPATH=@ROCM_PATH@/lib - --echo ${INSTALL_PATH}/lib > /etc/ld.so.conf.d/10-rocm-opencl.conf && ldconfig --mkdir -p /etc/OpenCL/vendors && (echo libamdocl64.so > /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@) -+echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig -+mkdir -p /@CMAKE_INSTALL_SYSCONFDIR@/OpenCL/vendors && (echo libamdocl64.so > /@CMAKE_INSTALL_SYSCONFDIR@/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@) - - mkdir -p ${ROCM_LIBPATH} - ln -s -f -r ${INSTALL_PATH}/lib/libOpenCL.so ${ROCM_LIBPATH}/libOpenCL.so -diff --git a/packaging/rocm-ocl-icd.rpm_postun b/packaging/rocm-ocl-icd.rpm_postun -index 356c7af..44bbce3 100644 ---- a/packaging/rocm-ocl-icd.rpm_postun -+++ b/packaging/rocm-ocl-icd.rpm_postun -@@ -1,6 +1,6 @@ - if [ $1 -eq 0 ]; then -- rm -f /etc/ld.so.conf.d/10-rocm-opencl.conf && ldconfig -- rm -f /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@ -+ rm -f /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig -+ rm -f /@CMAKE_INSTALL_SYSCONFDIR@/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@ - rm -f @ROCM_PATH@/lib/libOpenCL.so - rm -f @ROCM_PATH@/lib/libOpenCL.so.@OPENCL_LIB_VERSION_MAJOR@ - rm -f @ROCM_PATH@/lib/libOpenCL.so.@OPENCL_LIB_VERSION_STRING@ --- -2.35.1 - diff --git a/files/0001-SWDEV-323669-Fix-linux-arch-detection.patch b/files/0001-SWDEV-323669-Fix-linux-arch-detection.patch deleted file mode 100644 --- a/files/0001-SWDEV-323669-Fix-linux-arch-detection.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 211c1c4d8c7f6dac48ba6c73256da60955f9dbd1 Mon Sep 17 00:00:00 2001 -From: Jeremy Newton -Date: Thu, 17 Feb 2022 09:05:56 -0500 -Subject: [PATCH] SWDEV-323669 - Fix linux arch detection - -CMake assumes we're bundling on x86, but for GNU compatible compilers, -we should rely on the compiler target to set the build arch. - -For non-gnu compilers, just fall back to assuming x86 (no change). - -Signed-off-by: Jeremy Newton -Change-Id: Iee9794e6f7c3973c781ddaf740ded77f34712c4f ---- - cmake/ROCclr.cmake | 1 - - include/top.hpp | 10 ++++++++++ - 2 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/cmake/ROCclr.cmake b/cmake/ROCclr.cmake -index 2f6ff8c1..e4d0cdc1 100644 ---- a/cmake/ROCclr.cmake -+++ b/cmake/ROCclr.cmake -@@ -100,7 +100,6 @@ if(NOT CMAKE_CL_64) - endif() - - target_compile_definitions(rocclr PUBLIC -- ATI_ARCH_X86 - LITTLEENDIAN_CPU - WITH_LIQUID_FLASH=0 - ${AMD_OPENCL_DEFS}) -diff --git a/include/top.hpp b/include/top.hpp -index f51db7d1..70273510 100644 ---- a/include/top.hpp -+++ b/include/top.hpp -@@ -21,6 +21,16 @@ - #ifndef TOP_HPP_ - #define TOP_HPP_ - -+#if defined(__GNUC__) -+#if defined(__arm__) || defined(__aarch64__) -+#define ATI_ARCH_ARM -+#elif defined(__x86__) || defined(__x86_64__) -+#define ATI_ARCH_X86 -+#endif -+#else /*!__GNUC__*/ -+#define ATI_ARCH_X86 -+#endif /*!__GNUC__*/ -+ - #if defined(ATI_ARCH_ARM) - #define __EXPORTED_HEADERS__ 1 - #endif /*ATI_ARCH_ARM*/ --- -2.34.1 - diff --git a/files/0001-Use-GNUInstallDirs.patch b/files/0001-Use-GNUInstallDirs.patch deleted file mode 100644 --- a/files/0001-Use-GNUInstallDirs.patch +++ /dev/null @@ -1,142 +0,0 @@ -From 26c33f505713a4cebf638988346fc62ff85e7732 Mon Sep 17 00:00:00 2001 -From: Jeremy Newton -Date: Sat, 7 May 2022 14:23:21 -0400 -Subject: [PATCH] Use GNUInstallDirs - ---- - CMakeLists.txt | 31 ++++++++++++++++++------------- - src/CMakeLists.txt | 6 +++--- - 2 files changed, 21 insertions(+), 16 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1c5a2e7f..546925b2 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -20,6 +20,11 @@ - cmake_minimum_required(VERSION 3.16.8) - project(hip) - -+# Set default libdir to be "lib" for ROCm, distros will override this anyway: -+set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory") -+ -+include(GNUInstallDirs) -+ - # sample command for hip-rocclr runtime, you'll need to have rocclr built - # ROCM_PATH is the path where ROCM is installed - # For shared lib of hip-rocclr runtime -@@ -39,7 +44,7 @@ list(APPEND CMAKE_MODULE_PATH ${HIP_COMMON_DIR}/cmake) - - # required to add the right link to libhsa-runtime in install/lib path - # CMAKE_PREFIX_PATH is used as rpath to search for libs outside HIP --set(CMAKE_INSTALL_RPATH "${CMAKE_PREFIX_PATH}/lib") -+set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}") - set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - - ############################# -@@ -275,9 +280,9 @@ endif (NOT CPACK_SET_DESTDIR) - ############################# - # Build steps - ############################# --set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) --set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib) --set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include) -+set(BIN_INSTALL_DIR ${CMAKE_INSTALL_FULL_BINDIR}) -+set(LIB_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR}) -+set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_FULL_INCLUDEDIR}) - set(CONFIG_PACKAGE_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/hip) - set(CONFIG_LANG_PACKAGE_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/hip-lang) - -@@ -325,10 +330,10 @@ endif() - ############################# - - # Install .hipInfo --install(FILES ${PROJECT_BINARY_DIR}/.hipInfo DESTINATION lib) -+install(FILES ${PROJECT_BINARY_DIR}/.hipInfo DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - # Install .hipVersion --install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION bin) -+install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR}) - - # Install src, bin, include & cmake if necessary - execute_process(COMMAND test ${CMAKE_INSTALL_PREFIX} -ef ${CMAKE_CURRENT_SOURCE_DIR} -@@ -337,7 +342,7 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0) - if(WIN32) - install(DIRECTORY ${HIP_COMMON_BIN_DIR} DESTINATION . USE_SOURCE_PERMISSIONS) - if (CMAKE_BUILD_TYPE STREQUAL "Debug") -- install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/src/" DESTINATION bin -+ install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/src/" DESTINATION ${CMAKE_INSTALL_BINDIR} - FILES_MATCHING PATTERN "*.pdb" - PATTERN "*.ilk" - PATTERN "CMakeFiles" EXCLUDE -@@ -354,11 +359,11 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0) - endif() - - # The following two lines will be removed after upstream updation -- install(CODE "MESSAGE(\"Removing ${CMAKE_INSTALL_PREFIX}/include\")") -- install(CODE "file(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/include)") -+ install(CODE "MESSAGE(\"Removing ${CMAKE_INSTALL_FULL_INCLUDEDIR}\")") -+ install(CODE "file(REMOVE_RECURSE ${CMAKE_INSTALL_FULL_INCLUDEDIR})") - - install(DIRECTORY include DESTINATION .) -- install(DIRECTORY ${HIP_COMMON_INCLUDE_DIR}/hip/ DESTINATION include/hip/) -+ install(DIRECTORY ${HIP_COMMON_INCLUDE_DIR}/hip/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip/) - install(DIRECTORY ${HIP_COMMON_DIR}/cmake DESTINATION .) - endif() - -@@ -366,11 +371,11 @@ endif() - # FIXME: Associate with individual targets. - if(HIP_PLATFORM STREQUAL "amd") - install(FILES ${PROJECT_BINARY_DIR}/include/hip/amd_detail/hip_prof_str.h -- DESTINATION include/hip/amd_detail) -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip/amd_detail) - install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin DESTINATION . USE_SOURCE_PERMISSIONS) - endif() - install(FILES ${PROJECT_BINARY_DIR}/include/hip/hip_version.h -- DESTINATION include/hip) -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip) - - ############################# - # hip-config -@@ -548,7 +553,7 @@ endif() - # Target: clang - if(HIP_HIPCC_EXECUTABLE) - add_custom_target(analyze -- COMMAND ${HIP_HIPCC_EXECUTABLE} -fvisibility=hidden -fvisibility-inlines-hidden --analyze --analyzer-outputtext -isystem ${ROCM_PATH}/include -Wno-unused-command-line-argument -I${ROCM_PATH}/include -c src/*.cpp -Iinclude/ -I./ -+ COMMAND ${HIP_HIPCC_EXECUTABLE} -fvisibility=hidden -fvisibility-inlines-hidden --analyze --analyzer-outputtext -isystem ${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR} -Wno-unused-command-line-argument -I${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR} -c src/*.cpp -Iinclude/ -I./ - WORKING_DIRECTORY ${HIP_SRC_PATH}) - if(CPPCHECK_EXE) - add_dependencies(analyze cppcheck) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index ac88ddf5..2ce748d1 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -257,7 +257,7 @@ if(__HIP_ENABLE_RTC) - add_dependencies(amdhip64 hiprtc-builtins) - install(TARGETS hiprtc-builtins - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -- LIBRARY DESTINATION lib -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - -@@ -325,7 +325,7 @@ target_link_libraries(device INTERFACE host) - INSTALL(TARGETS amdhip64 host device - EXPORT hip-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -- LIBRARY DESTINATION lib -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - INSTALL(EXPORT hip-targets DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} NAMESPACE hip::) -@@ -333,7 +333,7 @@ INSTALL(EXPORT hip-targets DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} NAMESPACE h - INSTALL(TARGETS amdhip64 host device - EXPORT hip-lang-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -- LIBRARY DESTINATION lib -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - INSTALL(EXPORT hip-lang-targets DESTINATION ${CONFIG_LANG_PACKAGE_INSTALL_DIR} NAMESPACE hip-lang::) --- -2.34.1 - diff --git a/files/0002-Fix-CL-icd-header-include.patch b/files/0002-Fix-CL-icd-header-include.patch deleted file mode 100644 --- a/files/0002-Fix-CL-icd-header-include.patch +++ /dev/null @@ -1,28 +0,0 @@ -From cd50df60787f98847a27fb223dc13d73613a17fa Mon Sep 17 00:00:00 2001 -From: Jeremy Newton -Date: Sat, 7 May 2022 00:03:48 -0400 -Subject: [PATCH 2/2] Fix CL icd header include - -Use CL public headers, not the the private header in the ICD loader source. - -Fixes issues when building with ROCclr standalone package. ---- - src/fixme.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/fixme.cpp b/src/fixme.cpp -index 3b6b55bc..9f5d4cc4 100644 ---- a/src/fixme.cpp -+++ b/src/fixme.cpp -@@ -19,7 +19,7 @@ - THE SOFTWARE. */ - - #include "vdi_common.hpp" --#include -+#include - - cl_icd_dispatch amd::ICDDispatchedObject::icdVendorDispatch_[] = {0}; - amd::PlatformIDS amd::PlatformID::Platform = {amd::ICDDispatchedObject::icdVendorDispatch_}; --- -2.34.1 - diff --git a/files/0002-Revert-hip-Switch-to-component-based-packaging.patch b/files/0002-Revert-hip-Switch-to-component-based-packaging.patch deleted file mode 100644 --- a/files/0002-Revert-hip-Switch-to-component-based-packaging.patch +++ /dev/null @@ -1,910 +0,0 @@ -From bb9696386e92fb38d023f1223ee67cfbd8fa0fa4 Mon Sep 17 00:00:00 2001 -From: Jeremy Newton -Date: Mon, 4 Apr 2022 10:39:26 -0400 -Subject: [PATCH 2/2] Revert "hip:Switch to component based packaging." - -This reverts commit d15357479a32597a8e762796e10dfd1e8afba332. ---- - CMakeLists.txt | 103 ++++++++++- - packaging/CMakeLists.txt | 297 ------------------------------- - packaging/hip-devel.txt | 98 ++++++++++ - packaging/hip-doc.txt | 87 +++++++++ - packaging/hip-runtime-amd.txt | 109 ++++++++++++ - packaging/hip-runtime-nvidia.txt | 74 ++++++++ - packaging/hip-samples.txt | 69 +++++++ - 7 files changed, 538 insertions(+), 299 deletions(-) - delete mode 100644 packaging/CMakeLists.txt - create mode 100644 packaging/hip-devel.txt - create mode 100644 packaging/hip-doc.txt - create mode 100644 packaging/hip-runtime-amd.txt - create mode 100644 packaging/hip-runtime-nvidia.txt - create mode 100644 packaging/hip-samples.txt - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3ce1fc10..1c5a2e7f 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -397,9 +397,108 @@ install( - ${CONFIG_PACKAGE_INSTALL_DIR} - ) - # Packaging invokes UNIX commands, which are not available on Windows. -- - if(NOT WIN32) -- add_subdirectory(packaging) -+############################# -+# Packaging steps -+############################# -+# Package: hip_devel -+set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip-devel) -+configure_file(packaging/hip-devel.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -+configure_file(packaging/hip-devel.postinst ${BUILD_DIR}/postinst @ONLY) -+configure_file(packaging/hip-devel.prerm ${BUILD_DIR}/prerm @ONLY) -+ -+add_custom_target(pkg_hip_base COMMAND ${CMAKE_COMMAND} . -+ COMMAND rm -rf *.deb *.rpm *.tar.gz -+ COMMAND make package -+ COMMAND cp *.deb ${PROJECT_BINARY_DIR} -+ COMMAND cp *.rpm ${PROJECT_BINARY_DIR} -+ COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} -+ WORKING_DIRECTORY ${BUILD_DIR} ) -+ -+# Packaging needs to wait for hipify-clang to build if it's enabled... -+if (BUILD_HIPIFY_CLANG) -+ add_dependencies(pkg_hip_base hipify-clang) -+endif() -+ -+if(HIP_RUNTIME STREQUAL "rocclr") -+ set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/rocclr) -+ configure_file(packaging/hip-runtime-amd.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -+ configure_file(packaging/hip-runtime-amd.postinst ${BUILD_DIR}/postinst @ONLY) -+ configure_file(packaging/hip-runtime-amd.prerm ${BUILD_DIR}/prerm @ONLY) -+ add_custom_target(hip_on_rocclr COMMAND ${CMAKE_COMMAND} . -+ COMMAND rm -rf *.deb *.rpm *.tar.gz -+ COMMAND make package -+ COMMAND cp *.deb ${PROJECT_BINARY_DIR} -+ COMMAND cp *.rpm ${PROJECT_BINARY_DIR} -+ COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} -+ WORKING_DIRECTORY ${BUILD_DIR} ) -+endif() -+ -+# Package: hip_runtime_nvidia -+set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip-runtime-nvidia) -+configure_file(packaging/hip-runtime-nvidia.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -+configure_file(packaging/hip-runtime-nvidia.postinst ${BUILD_DIR}/postinst @ONLY) -+configure_file(packaging/hip-runtime-nvidia.prerm ${BUILD_DIR}/prerm @ONLY) -+add_custom_target(pkg_hip_nvcc COMMAND ${CMAKE_COMMAND} . -+ COMMAND rm -rf *.deb *.rpm *.tar.gz -+ COMMAND make package -+ COMMAND cp *.deb ${PROJECT_BINARY_DIR} -+ COMMAND cp *.rpm ${PROJECT_BINARY_DIR} -+ COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} -+ WORKING_DIRECTORY ${BUILD_DIR}) -+ -+# Package: hip_doc -+set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip-doc) -+configure_file(packaging/hip-doc.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -+add_custom_target(pkg_hip_doc COMMAND ${CMAKE_COMMAND} . -+ COMMAND rm -rf *.deb *.rpm *.tar.gz -+ COMMAND make package -+ COMMAND cp *.deb ${PROJECT_BINARY_DIR} -+ COMMAND cp *.rpm ${PROJECT_BINARY_DIR} -+ COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} -+ WORKING_DIRECTORY ${BUILD_DIR}) -+ -+# Package: hip_catch_tests -+set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_catch_tests) -+configure_file(packaging/hip-tests.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -+add_custom_target(pkg_hip_catch_tests COMMAND ${CMAKE_COMMAND} . -+ COMMAND rm -rf *.deb *.rpm *.tar.gz -+ COMMAND make package -+ COMMAND cp *.deb ${PROJECT_BINARY_DIR} -+ COMMAND cp *.rpm ${PROJECT_BINARY_DIR} -+ COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} -+ WORKING_DIRECTORY ${BUILD_DIR}) -+ -+# Package: hip_samples -+set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip_samples) -+configure_file(packaging/hip-samples.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) -+add_custom_target(pkg_hip_samples COMMAND ${CMAKE_COMMAND} . -+ COMMAND rm -rf *.deb *.rpm *.tar.gz -+ COMMAND make package -+ COMMAND cp *.deb ${PROJECT_BINARY_DIR} -+ COMMAND cp *.rpm ${PROJECT_BINARY_DIR} -+ COMMAND cp *.tar.gz ${PROJECT_BINARY_DIR} -+ WORKING_DIRECTORY ${BUILD_DIR}) -+ -+# Package: all -+if(POLICY CMP0037) -+ cmake_policy(PUSH) -+ cmake_policy(SET CMP0037 OLD) -+endif() -+ -+if(HIP_RUNTIME STREQUAL "rocclr") -+ set(package_list pkg_hip_base hip_on_rocclr pkg_hip_nvcc pkg_hip_doc pkg_hip_samples) -+ if(HIP_CATCH_TEST EQUAL "1") -+ set(package_list ${package_list} pkg_hip_catch_tests) -+ endif() -+ add_custom_target(package -+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR} -+ DEPENDS ${package_list}) -+endif() -+ -+if(POLICY CMP0037) -+ cmake_policy(POP) -+endif() - endif() - - ############################# -diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt -deleted file mode 100644 -index ca368f9d..00000000 ---- a/packaging/CMakeLists.txt -+++ /dev/null -@@ -1,297 +0,0 @@ --# Copyright (c) 2020 - 2022 Advanced Micro Devices, Inc. All rights reserved. --# --# 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. -- --cmake_minimum_required(VERSION 2.8.3) -- --#set components for HIP --if(HIP_CATCH_TEST EQUAL "1") -- set(CPACK_COMPONENTS_ALL binary dev doc samples runtime-nvidia test) --else() -- set(CPACK_COMPONENTS_ALL binary dev doc samples runtime-nvidia) --endif() -- --###############Install Required files for all compnents######## -- --#Enable Component Install --set(CPACK_RPM_COMPONENT_INSTALL ON) --set(CPACK_DEB_COMPONENT_INSTALL ON) -- --###Set License#### --set(CPACK_RESOURCE_FILE_LICENSE ${hip_SOURCE_DIR}/LICENSE.txt) --install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/${PROJECT_NAME} COMPONENT binary) --set(CPACK_RPM_PACKAGE_LICENSE "MIT") -- --#Begin binary files install --if(HIP_PLATFORM STREQUAL "amd" ) -- if(BUILD_SHARED_LIBS) -- install(FILES ${CMAKE_BINARY_DIR}/lib/libamdhip64.so DESTINATION lib COMPONENT binary) -- install(FILES ${CMAKE_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_MAJOR} DESTINATION lib COMPONENT binary) -- install(FILES ${CMAKE_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_STRING} DESTINATION lib COMPONENT binary) -- if(__HIP_ENABLE_RTC) -- install(FILES ${CMAKE_BINARY_DIR}/lib/libhiprtc-builtins.so DESTINATION lib COMPONENT binary) -- install(FILES ${CMAKE_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_MAJOR} DESTINATION lib COMPONENT binary) -- install(FILES ${CMAKE_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_STRING} DESTINATION lib COMPONENT binary) -- endif() -- else() -- install(FILES ${CMAKE_BINARY_DIR}/lib/libamdhip64.a DESTINATION lib COMPONENT binary) -- endif()#End BUILD_SHARED_LIBS -- --#TODO:This do not belog in BINARY package. --#Keeping it as is for now --install(FILES ${CMAKE_BINARY_DIR}/.hipInfo DESTINATION lib COMPONENT binary) --install(FILES ${CMAKE_BINARY_DIR}/hip-config.cmake ${CMAKE_BINARY_DIR}/hip-config-version.cmake DESTINATION lib/cmake/hip COMPONENT binary) --install(FILES ${CMAKE_BINARY_DIR}/src/hip-lang-config.cmake ${CMAKE_BINARY_DIR}/src/hip-lang-config-version.cmake DESTINATION lib/cmake/hip-lang COMPONENT binary) --## cmake generated target files contains IMPORTED_LOCATION_RELEASE etc. which --## is installation path when building the project, which may be different from --## the intallation path for packaging. These paths have to be replaced by --## the package installation path, otherwise apps using pkg-config will fail. --file(GLOB _target_files ${CONFIG_PACKAGE_INSTALL_DIR}/hip-targets*.cmake) --foreach(_target_file ${_target_files}) -- execute_process(COMMAND sed -i s:${CMAKE_INSTALL_PREFIX}:${CPACK_INSTALL_PREFIX}:g ${_target_file}) --endforeach() --install(FILES ${_target_files} DESTINATION lib/cmake/hip COMPONENT BINARY) -- --file(GLOB _target_files ${CONFIG_LANG_PACKAGE_INSTALL_DIR}/hip-lang-targets*.cmake) --foreach(_target_file ${_target_files}) -- execute_process(COMMAND sed -i s:{CMAKE_INSTALL_PREFIX}:${CPACK_INSTALL_PREFIX}:g ${_target_file}) --endforeach() --install(FILES ${_target_files} DESTINATION lib/cmake/hip-lang COMPONENT BINARY) -- --endif()#End HIP_PLATFORM = "amd" --#End bianry files install -- --#Begin dev files install --if(WIN32) -- install(DIRECTORY ${HIP_COMMON_DIR}/bin DESTINATION . COMPONENT dev -- USE_SOURCE_PERMISSIONS) --else() -- install(DIRECTORY ${HIP_COMMON_DIR}/bin DESTINATION . COMPONENT dev -- USE_SOURCE_PERMISSIONS PATTERN *.bat EXCLUDE) --endif() -- --if (NOT ${HIPCC_BIN_DIR} STREQUAL "") -- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bin DESTINATION bin) -- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bin DESTINATION bin) --endif() -- --install(DIRECTORY ${hip_SOURCE_DIR}/bin DESTINATION . COMPONENT dev -- USE_SOURCE_PERMISSIONS) --install(DIRECTORY ${HIP_COMMON_DIR}/include DESTINATION . COMPONENT dev) --install(DIRECTORY ${hip_SOURCE_DIR}/include/hip/amd_detail -- DESTINATION include/hip COMPONENT dev) --install(DIRECTORY ${hip_SOURCE_DIR}/include/hip/nvidia_detail -- DESTINATION include/hip COMPONENT dev) --install(FILES ${CMAKE_BINARY_DIR}/include/hip/amd_detail/hip_prof_str.h -- DESTINATION include/hip/amd_detail COMPONENT dev) --install(FILES ${CMAKE_BINARY_DIR}/include/hip/hip_version.h -- DESTINATION include/hip COMPONENT dev) --install(FILES ${CMAKE_BINARY_DIR}/.hipVersion DESTINATION bin COMPONENT dev) --install(DIRECTORY ${HIP_COMMON_DIR}/cmake DESTINATION . COMPONENT dev) --#End dev files install -- --#Begin doc files install --find_program(DOXYGEN_EXE doxygen) --if(DOXYGEN_EXE) -- add_custom_target(build_doxygen ALL -- COMMAND HIP_PATH=${HIP_COMMON_DIR} doxygen ${HIP_COMMON_DIR}/docs/doxygen-input/doxy.cfg) -- install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/RuntimeAPI/html -- DESTINATION docs/RuntimeAPI COMPONENT doc) --endif() --#End doc files install -- --#Begin samples files install --install(DIRECTORY ${HIP_COMMON_DIR}/samples DESTINATION . COMPONENT samples) --#End samples files install -- --#Begin test files install --if(HIP_CATCH_TEST EQUAL "1") --install(DIRECTORY ${CMAKE_BINARY_DIR}/catch -- DESTINATION . COMPONENT test -- USE_SOURCE_PERMISSIONS) --endif() --#End test files install -- -- --################################## --# Packaging steps COMMON Variables --################################## --set(CPACK_SET_DESTDIR TRUE) -- --set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.") --set(CPACK_PACKAGE_CONTACT "HIP Support ") --set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP:Heterogenous-computing Interface for Portability") --set(CPACK_PACKAGE_VERSION_MAJOR ${HIP_VERSION_MAJOR}) --set(CPACK_PACKAGE_VERSION_MINOR ${HIP_VERSION_MINOR}) --set(CPACK_PACKAGE_VERSION_PATCH ${HIP_VERSION_PATCH}) --set(CPACK_PACKAGE_VERSION ${HIP_VERSION_MAJOR}.${HIP_VERSION_MINOR}.${HIP_PACKAGING_VERSION_PATCH}) --set(CPACK_GENERATOR "TGZ:DEB;RPM" CACHE STRING "Package types to build") -- --set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt") --if (CPACK_RPM_PACKAGE_RELEASE MATCHES "local" ) -- #If building locally default value will cause build failure -- #DEBUG SYMBOL pacaking require SOURCE_DIR to be small -- set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX ${CPACK_INSTALL_PREFIX}) --endif() --set(CPACK_RPM_PACKAGE_AUTOREQPROV " no") --set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") -- --set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") -- --set(CPACK_SOURCE_GENERATOR "TGZ") -- -- --#Begin Binary Packaging setting -- --set(CPACK_BINARY_DEB "ON") --set(CPACK_BINARY_RPM "ON") -- --set(CPACK_DEBIAN_BINARY_PACKAGE_NAME "hip-runtime-amd") --set(CPACK_RPM_BINARY_PACKAGE_NAME "hip-runtime-amd") -- --set(CPACK_COMPONENT_BINARY_DESCRIPTION "HIP:Heterogenous-computing Interface for Portability [RUNTIME - AMD]") -- --configure_file(hip-runtime-amd.postinst ${CMAKE_CURRENT_BINARY_DIR}/binary/postinst @ONLY) --configure_file(hip-runtime-amd.prerm ${CMAKE_CURRENT_BINARY_DIR}/binary/prerm @ONLY) -- --set(CPACK_DEBIAN_BINARY_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_BINARY_DIR}/binary/postinst;${CMAKE_CURRENT_BINARY_DIR}/binary/prerm") --set(CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS "hsa-rocr-dev (>= 1.3), rocminfo, comgr (>= 2.0), rocm-llvm, libc6, rocm-core") --set(CPACK_DEBIAN_BINARY_PACKAGE_PROVIDES "hip-rocclr (= ${CPACK_PACKAGE_VERSION})") --set(CPACK_DEBIAN_BINARY_PACKAGE_REPLACES "hip-rocclr (= ${CPACK_PACKAGE_VERSION})") -- --set(CPACK_RPM_BINARY_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") --set(CPACK_RPM_BINARY_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/binary/postinst") --set(CPACK_RPM_BINARY_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/binary/prerm") --string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION}) --set(CPACK_RPM_BINARY_PACKAGE_REQUIRES "hsa-rocr-dev >= 1.3, rocminfo, comgr >= 2.0, rocm-llvm, rocm-core") --set(CPACK_RPM_BINARY_PACKAGE_PROVIDES "hip-rocclr = ${HIP_BASE_VERSION}") --set(CPACK_RPM_BINARY_PACKAGE_OBSOLETES "hip-rocclr = ${HIP_BASE_VERSION}") --#End Binary Packaging setting -- --#Begin dev Packaging setting --set(CPACK_DEV_DEB "ON") --set(CPACK_DEV_RPM "ON") -- --set(CPACK_DEBIAN_DEV_PACKAGE_NAME "hip-dev") --set(CPACK_RPM_DEV_PACKAGE_NAME "hip-devel") -- --set(CPACK_COMPONENT_DEV_DESCRIPTION "HIP: Heterogenous-computing Interface for Portability [DEVELOPMENT]") -- --configure_file(hip-devel.postinst ${CMAKE_CURRENT_BINARY_DIR}/dev/postinst @ONLY) --configure_file(hip-devel.prerm ${CMAKE_CURRENT_BINARY_DIR}/dev/prerm @ONLY) --set(CPACK_DEBIAN_DEV_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_BINARY_DIR}/dev/postinst;${CMAKE_CURRENT_BINARY_DIR}/dev/prerm") -- --set(CPACK_DEBIAN_DEV_PACKAGE_DEPENDS "perl (>= 5.0), liburi-encode-perl, libfile-basedir-perl, libfile-copy-recursive-perl, libfile-listing-perl, libfile-which-perl, libc6, file, rocm-core") --set(CPACK_DEBIAN_DEV_PACKAGE_PROVIDES "hip-base") --set(CPACK_DEBIAN_DEV_PACKAGE_REPLACES "hip-base") -- --set(CPACK_RPM_DEV_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/dev/postinst") --set(CPACK_RPM_DEV_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/dev/prerm") --set(CPACK_RPM_DEV_PACKAGE_REQUIRES "perl >= 5.0, perl-File-Which, perl-File-Listing, perl-File-BaseDir, perl-URI-Encode, file, rocm-core") -- --set(CPACK_RPM_DEV_PACKAGE_PROVIDES "hip-base") --set(CPACK_RPM_DEV_PACKAGE_OBSOLETES "hip-base") --#End dev Packaging setting -- --#Begin test Packaging setting --if(HIP_CATCH_TEST EQUAL "1") --set(CPACK_TEST_DEB "ON") --set(CPACK_TEST_RPM "ON") --set(CPACK_DEBIAN_TEST_PACKAGE_NAME "hip-catch-tests") --set(CPACK_RPM_TEST_PACKAGE_NAME "hip-catch-tests") --set(CPACK_COMPONENT_TEST_DESCRIPTION "HIP: Heterogenous-computing Interface for Portability [TESTS]") -- --set(CPACK_DEBIAN_TEST_PACKAGE_DEPENDS "hip-dev (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), rocm-core") --set(CPACK_DEBIAN_TEST_PACKAGE_PROVIDES "hip-catch-tests") -- --string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION}) --set(CPACK_RPM_TEST_PACKAGE_REQUIRES "hip-devel = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}, rocm-core") --endif() --#End test Packaging setting -- --#Begin doc Packaging setting --set(CPACK_DOC_DEB "ON") --set(CPACK_DOC_RPM "ON") --set(CPACK_DEBIAN_DOC_PACKAGE_NAME "hip-doc") --set(CPACK_RPM_DOC_PACKAGE_NAME "hip-doc") --set(CPACK_COMPONENT_DOC_DESCRIPTION "HIP: Heterogenous-computing Interface for Portability [DOCUMENTATION]") -- --set(CPACK_DEBIAN_DOC_PACKAGE_DEPENDS "hip-dev (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), rocm-core") --set(CPACK_DEBIAN_DOC_PACKAGE_PROVIDES "hip-doc") -- --string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION}) --set(CPACK_RPM_DOC_PACKAGE_REQUIRES "hip-devel = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}, rocm-core") -- --#End doc Packaging setting -- --#Begin samples Packaging setting --set(CPACK_SAMPLES_DEB "ON") --set(CPACK_SAMPLES_RPM "ON") --set(CPACK_DEBIAN_SAMPLES_PACKAGE_NAME "hip-samples") --set(CPACK_RPM_SAMPLES_PACKAGE_NAME "hip-samples") --set(CPACK_COMPONENT_SAMPLES_DESCRIPTION "HIP: Heterogenous-computing Interface for Portability [SAMPLES]") --set(CPACK_DEBIAN_SAMPLES_PACKAGE_DEPENDS "hip-dev (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), rocm-core") --set(CPACK_DEBIAN_SAMPLES_PACKAGE_PROVIDES "hip-samples") -- --set(CPACK_RPM_SAMPLES_PACKAGE_REQUIRES "hip-devel = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}, rocm-core") --#End samples Packaging setting -- --#Begin runtime-nvidia Packaging setting --set(CPACK_RUNTIME-NVIDIA_DEB "ON") --set(CPACK_RUNTIME-NVIDIA_RPM "ON") --set(CPACK_DEBIAN_RUNTIME-NVIDIA_PACKAGE_NAME "hip-runtime-nvidia") --set(CPACK_RPM_RUNTIME-NVIDIA_PACKAGE_NAME "hip-runtime-nvidia") --set(CPACK_COMPONENT_RUNTIME-NVIDIA_DESCRIPTION "HIP: Heterogenous-computing Interface for Portability [RUNTIME-NVIDIA]") -- --configure_file(hip-runtime-nvidia.postinst ${CMAKE_CURRENT_BINARY_DIR}/runtime-nvidia/postinst @ONLY) --configure_file(hip-runtime-nvidia.prerm ${CMAKE_CURRENT_BINARY_DIR}/runtime-nvidia/prerm @ONLY) --set(CPACK_DEBIAN_RUNTIME-NVIDIA_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_BINARY_DIR}/runtime-nvidia/postinst;${CMAKE_CURRENT_BINARY_DIR}/runtime-nvidia/prerm") -- --set(CPACK_DEBIAN_RUNTIME-NVIDIA_PACKAGE_DEPENDS "cuda (>= 7.5), rocm-core") --set(CPACK_DEBIAN_RUNTIME-NVIDIA_PACKAGE_PROVIDES "hip-nvcc") --set(CPACK_DEBIAN_RUNTIME-NVIDIA_PACKAGE_REPLACES "hip-nvcc") -- --set(CPACK_RPM_RUNTIME-NVIDIA_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/runtime-nvidia/postinst") --set(CPACK_RPM_RUNTIME-NVIDIA_PRE_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/runtime-nvidia/prerm") --set(CPACK_RPM_RUNTIME-NVIDIA_PACKAGE_PROVIDES "hip-nvcc") --set(CPACK_RPM_RUNTIME-NVIDIA_PACKAGE_OBSOLETES "hip-nvcc") --set(CPACK_RPM_RUNTIME-NVIDIA_PACKAGE_REQUIRES "cuda >= 7.5, rocm-core") -- --# Remove dependency on rocm-core if -DROCM_DEP_ROCMCORE=ON not given to cmake --if(NOT ROCM_DEP_ROCMCORE) -- -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_BINARY_PACKAGE_REQUIRES ${CPACK_RPM_BINARY_PACKAGE_REQUIRES}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS ${CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_DEV_PACKAGE_REQUIRES ${CPACK_RPM_DEV_PACKAGE_REQUIRES}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_DEV_PACKAGE_DEPENDS ${CPACK_DEBIAN_DEV_PACKAGE_DEPENDS}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_DOC_PACKAGE_REQUIRES ${CPACK_RPM_DOC_PACKAGE_REQUIRES}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_DOC_PACKAGE_DEPENDS ${CPACK_DEBIAN_DOC_PACKAGE_DEPENDS}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_SAMPLES_PACKAGE_REQUIRES ${CPACK_RPM_SAMPLES_PACKAGE_REQUIRES}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_SAMPLES_PACKAGE_DEPENDS ${CPACK_DEBIAN_SAMPLES_PACKAGE_DEPENDS}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_RUNTIME-NVIDIA_PACKAGE_REQUIRES ${CPACK_RPM_RUNTIME-NVIDIA_PACKAGE_REQUIRES}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_RUNTIME-NVIDIA_PACKAGE_DEPENDS ${CPACK_DEBIAN_RUNTIME-NVIDIA_PACKAGE_DEPENDS}) -- --if(HIP_CATCH_TEST EQUAL "1") -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_TEST_PACKAGE_REQUIRES ${CPACK_RPM_TEST_PACKAGE_REQUIRES}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_TEST_PACKAGE_DEPENDS ${CPACK_DEBIAN_TEST_PACKAGE_DEPENDS}) --endif()#HIPC_CATCH_TEST -- --endif() -- --include(CPack) -diff --git a/packaging/hip-devel.txt b/packaging/hip-devel.txt -new file mode 100644 -index 00000000..04018d0c ---- /dev/null -+++ b/packaging/hip-devel.txt -@@ -0,0 +1,98 @@ -+# Copyright (c) 2016 - 2021 Advanced Micro Devices, Inc. All rights reserved. -+# -+# 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. -+ -+cmake_minimum_required(VERSION 3.16.8) -+project(hip_dev) -+ -+if(WIN32) -+ install(DIRECTORY @HIP_COMMON_DIR@/bin DESTINATION . USE_SOURCE_PERMISSIONS) -+else() -+ install(DIRECTORY @HIP_COMMON_DIR@/bin DESTINATION . USE_SOURCE_PERMISSIONS -+ PATTERN *.bat EXCLUDE) -+endif() -+ -+if (NOT @HIPCC_BIN_DIR@ STREQUAL "") -+ install(PROGRAMS @HIPCC_BIN_DIR@/hipcc.bin DESTINATION bin) -+ install(PROGRAMS @HIPCC_BIN_DIR@/hipconfig.bin DESTINATION bin) -+endif() -+ -+install(DIRECTORY @hip_SOURCE_DIR@/bin DESTINATION . USE_SOURCE_PERMISSIONS) -+install(DIRECTORY @HIP_COMMON_DIR@/include DESTINATION .) -+install(DIRECTORY @hip_SOURCE_DIR@/include/hip/amd_detail DESTINATION include/hip) -+install(DIRECTORY @hip_SOURCE_DIR@/include/hip/nvidia_detail DESTINATION include/hip) -+install(FILES @PROJECT_BINARY_DIR@/include/hip/amd_detail/hip_prof_str.h -+ DESTINATION include/hip/amd_detail) -+install(FILES @PROJECT_BINARY_DIR@/include/hip/hip_version.h -+ DESTINATION include/hip) -+install(FILES @PROJECT_BINARY_DIR@/.hipVersion DESTINATION bin) -+install(DIRECTORY @HIP_COMMON_DIR@/cmake DESTINATION .) -+ -+############################# -+# Packaging steps -+############################# -+set(CPACK_SET_DESTDIR TRUE) -+set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@ ) -+set(CPACK_PACKAGE_NAME "hip-dev") -+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP Heterogenous-computing Interface for Portability [DEVELOPMENT]") -+set(CPACK_PACKAGE_DESCRIPTION "HIP: -+ Heterogenous-computing Interface for Portability [DEVELOPMENT]") -+set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.") -+set(CPACK_PACKAGE_CONTACT "HIP Support ") -+set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@) -+set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@) -+set(CPACK_PACKAGE_VERSION_PATCH @HIP_PACKAGING_VERSION_PATCH@) -+set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@) -+set(CPACK_GENERATOR "TGZ;DEB;RPM") -+ -+set(CPACK_BINARY_DEB "ON") -+set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@) -+set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") -+set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${PROJECT_BINARY_DIR}/postinst;${PROJECT_BINARY_DIR}/prerm") -+set(CPACK_DEBIAN_PACKAGE_DEPENDS "perl (>= 5.0), liburi-encode-perl, libfile-basedir-perl, libfile-copy-recursive-perl, libfile-listing-perl, libfile-which-perl, libc6, file, rocm-core") -+set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-base") -+set(CPACK_DEBIAN_PACKAGE_REPLACES "hip-base") -+ -+set(CPACK_BINARY_RPM "ON") -+set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@) -+set(CPACK_RPM_PACKAGE_NAME "hip-devel") -+set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") -+set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") -+set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/postinst") -+set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/prerm") -+set(CPACK_RPM_PACKAGE_AUTOREQPROV " no") -+set(CPACK_RPM_PACKAGE_REQUIRES "perl >= 5.0, perl-File-Which, perl-File-Listing, perl-File-BaseDir, perl-URI-Encode, file, rocm-core") -+set(CPACK_RPM_PACKAGE_PROVIDES "hip-base") -+set(CPACK_RPM_PACKAGE_OBSOLETES "hip-base") -+set(CPACK_BINARY_RPM "ON") -+set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt") -+set(CPACK_SOURCE_GENERATOR "TGZ") -+# Remove dependency on rocm-core if -DROCM_DEP_ROCMCORE=ON not given to cmake -+set(ROCM_DEP_ROCMCORE "@ROCM_DEP_ROCMCORE@") -+if(NOT ROCM_DEP_ROCMCORE) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES}) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS}) -+endif() -+ -+set ( CPACK_RESOURCE_FILE_LICENSE "@hip_SOURCE_DIR@/LICENSE.txt" ) -+# Install license file -+install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/${CPACK_PACKAGE_NAME}) -+set(CPACK_RPM_PACKAGE_LICENSE "MIT") -+ -+include(CPack) -diff --git a/packaging/hip-doc.txt b/packaging/hip-doc.txt -new file mode 100644 -index 00000000..262ec401 ---- /dev/null -+++ b/packaging/hip-doc.txt -@@ -0,0 +1,87 @@ -+# Copyright (c) 2016 - 2021 Advanced Micro Devices, Inc. All rights reserved. -+# -+# 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. -+ -+cmake_minimum_required(VERSION 2.8.3) -+project(hip_doc) -+ -+find_program(DOXYGEN_EXE doxygen) -+if(DOXYGEN_EXE) -+ add_custom_target(build_doxygen ALL -+ COMMAND HIP_PATH=@HIP_COMMON_DIR@ doxygen @HIP_COMMON_DIR@/docs/doxygen-input/doxy.cfg) -+ install(DIRECTORY RuntimeAPI/html DESTINATION docs/docs/RuntimeAPI) -+endif() -+ -+#find_program(GRIP_EXE grip) -+#if(GRIP_EXE) -+# add_custom_target(convert_md_to_html ALL -+# COMMAND @hip_SOURCE_DIR@/packaging/convert_md_to_html.sh @hip_SOURCE_DIR@ ${PROJECT_BINARY_DIR}/md2html) -+# install(DIRECTORY md2html/ DESTINATION docs) -+#endif() -+ -+############################# -+# Packaging steps -+############################# -+set(CPACK_SET_DESTDIR TRUE) -+set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@ ) -+set(CPACK_PACKAGE_NAME "hip-doc") -+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [DOCUMENTATION]") -+set(CPACK_PACKAGE_DESCRIPTION "HIP: -+ Heterogenous-computing Interface for Portability [DOCUMENTATION]") -+set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.") -+set(CPACK_PACKAGE_CONTACT "HIP Support ") -+set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@) -+set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@) -+set(CPACK_PACKAGE_VERSION_PATCH @HIP_PACKAGING_VERSION_PATCH@) -+set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@) -+set(CPACK_GENERATOR "TGZ;DEB;RPM") -+ -+set(CPACK_BINARY_DEB "ON") -+set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@) -+set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") -+set(CPACK_DEBIAN_PACKAGE_DEPENDS "hip-dev (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), rocm-core") -+set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-doc") -+ -+set(CPACK_BINARY_RPM "ON") -+set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@) -+set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") -+set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") -+set(CPACK_RPM_PACKAGE_AUTOREQPROV " no") -+string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION}) -+set(CPACK_RPM_PACKAGE_REQUIRES "hip-devel = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}, rocm-core") -+set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt") -+set(CPACK_SOURCE_GENERATOR "TGZ") -+ -+# Remove depenency on rocm-core if not wanted. Add a -DROCM_DEP_ROCMCORE=ON -+# to the cmake invocation. Do it this way so we can have the same code -+# in all the packages, and don't need to worry if we need commas or not -+# because there are other dependencies. Code is slightly fragile as we are -+# using regular expressions to edit strings. -+set(ROCM_DEP_ROCMCORE "@ROCM_DEP_ROCMCORE@") -+if(NOT ROCM_DEP_ROCMCORE) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES}) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS}) -+endif() -+ -+set ( CPACK_RESOURCE_FILE_LICENSE "@hip_SOURCE_DIR@/LICENSE.txt" ) -+# Install license file -+install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/${CPACK_PACKAGE_NAME}) -+set(CPACK_RPM_PACKAGE_LICENSE "MIT") -+ -+include(CPack) -diff --git a/packaging/hip-runtime-amd.txt b/packaging/hip-runtime-amd.txt -new file mode 100644 -index 00000000..6eea5694 ---- /dev/null -+++ b/packaging/hip-runtime-amd.txt -@@ -0,0 +1,109 @@ -+# Copyright (c) 2020 - 2021 Advanced Micro Devices, Inc. All rights reserved. -+# -+# 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. -+ -+cmake_minimum_required(VERSION 2.8.3) -+project(hip_runtime_amd) -+ -+if(@BUILD_SHARED_LIBS@) -+ install(FILES @PROJECT_BINARY_DIR@/lib/libamdhip64.so DESTINATION lib) -+ install(FILES @PROJECT_BINARY_DIR@/lib/libamdhip64.so.@HIP_LIB_VERSION_MAJOR@ DESTINATION lib) -+ install(FILES @PROJECT_BINARY_DIR@/lib/libamdhip64.so.@HIP_LIB_VERSION_STRING@ DESTINATION lib) -+ if(@__HIP_ENABLE_RTC@) -+ install(FILES @PROJECT_BINARY_DIR@/lib/libhiprtc-builtins.so DESTINATION lib) -+ install(FILES @PROJECT_BINARY_DIR@/lib/libhiprtc-builtins.so.@HIP_LIB_VERSION_MAJOR@ DESTINATION lib) -+ install(FILES @PROJECT_BINARY_DIR@/lib/libhiprtc-builtins.so.@HIP_LIB_VERSION_STRING@ DESTINATION lib) -+ endif() -+else() -+ install(FILES @PROJECT_BINARY_DIR@/lib/libamdhip64.a DESTINATION lib) -+endif() -+ -+install(FILES @PROJECT_BINARY_DIR@/.hipInfo DESTINATION lib) -+install(FILES @PROJECT_BINARY_DIR@/hip-config.cmake @PROJECT_BINARY_DIR@/hip-config-version.cmake DESTINATION lib/cmake/hip) -+install(FILES @PROJECT_BINARY_DIR@/src/hip-lang-config.cmake @PROJECT_BINARY_DIR@/src/hip-lang-config-version.cmake DESTINATION lib/cmake/hip-lang) -+ -+############################# -+# Packaging steps -+############################# -+set(CPACK_SET_DESTDIR TRUE) -+set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@) -+ -+## cmake generated target files contains IMPORTED_LOCATION_RELEASE etc. which -+## is installation path when building the project, which may be different from -+## the intallation path for packaging. These paths have to be replaced by -+## the package installation path, otherwise apps using pkg-config will fail. -+file(GLOB _target_files @CONFIG_PACKAGE_INSTALL_DIR@/hip-targets*.cmake) -+foreach(_target_file ${_target_files}) -+ execute_process(COMMAND sed -i s:@CMAKE_INSTALL_PREFIX@:${CPACK_INSTALL_PREFIX}:g ${_target_file}) -+endforeach() -+install(FILES ${_target_files} DESTINATION lib/cmake/hip) -+ -+file(GLOB _target_files @CONFIG_LANG_PACKAGE_INSTALL_DIR@/hip-lang-targets*.cmake) -+foreach(_target_file ${_target_files}) -+ execute_process(COMMAND sed -i s:@CMAKE_INSTALL_PREFIX@:${CPACK_INSTALL_PREFIX}:g ${_target_file}) -+endforeach() -+install(FILES ${_target_files} DESTINATION lib/cmake/hip-lang) -+ -+set(CPACK_PACKAGE_NAME "hip-runtime-amd") -+set(HCC_PACKAGE_NAME "rocclr") -+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [RUNTIME - AMD]") -+set(CPACK_PACKAGE_DESCRIPTION "HIP: -+ Heterogenous-computing Interface for Portability [RUNTIME - AMD]") -+set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.") -+set(CPACK_PACKAGE_CONTACT "HIP Support ") -+set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@) -+set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@) -+set(CPACK_PACKAGE_VERSION_PATCH @HIP_VERSION_PATCH@) -+set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@) -+set(CPACK_GENERATOR "TGZ;DEB;RPM") -+ -+set(CPACK_BINARY_DEB "ON") -+set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@) -+set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") -+set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${PROJECT_BINARY_DIR}/postinst;${PROJECT_BINARY_DIR}/prerm") -+set(CPACK_DEBIAN_PACKAGE_DEPENDS "hsa-rocr-dev (>= 1.3), rocminfo, comgr (>= 2.0), rocm-llvm, libc6, rocm-core") -+set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-rocclr (= ${CPACK_PACKAGE_VERSION})") -+set(CPACK_DEBIAN_PACKAGE_REPLACES "hip-rocclr (= ${CPACK_PACKAGE_VERSION})") -+ -+set(CPACK_BINARY_RPM "ON") -+set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@) -+set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") -+set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") -+set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/postinst") -+set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/prerm") -+set(CPACK_RPM_PACKAGE_AUTOREQPROV " no") -+string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION}) -+set(CPACK_RPM_PACKAGE_REQUIRES "hsa-rocr-dev >= 1.3, rocminfo, comgr >= 2.0, rocm-llvm, rocm-core") -+set(CPACK_RPM_PACKAGE_PROVIDES "hip-rocclr = ${HIP_BASE_VERSION}") -+set(CPACK_RPM_PACKAGE_OBSOLETES "hip-rocclr = ${HIP_BASE_VERSION}") -+set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt") -+set(CPACK_SOURCE_GENERATOR "TGZ") -+# Remove dependency on rocm-core if -DROCM_DEP_ROCMCORE=ON not given to cmake -+set(ROCM_DEP_ROCMCORE "@ROCM_DEP_ROCMCORE@") -+if(NOT ROCM_DEP_ROCMCORE) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES}) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS}) -+endif() -+ -+set ( CPACK_RESOURCE_FILE_LICENSE "@hip_SOURCE_DIR@/LICENSE.txt" ) -+# Install license file -+install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/${CPACK_PACKAGE_NAME}) -+set(CPACK_RPM_PACKAGE_LICENSE "MIT") -+ -+include(CPack) -diff --git a/packaging/hip-runtime-nvidia.txt b/packaging/hip-runtime-nvidia.txt -new file mode 100644 -index 00000000..3c7ea963 ---- /dev/null -+++ b/packaging/hip-runtime-nvidia.txt -@@ -0,0 +1,74 @@ -+# Copyright (c) 2016 - 2021 Advanced Micro Devices, Inc. All rights reserved. -+# -+# 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. -+ -+cmake_minimum_required(VERSION 2.8.3) -+project(hip_runtime_nvidia) -+ -+############################# -+# Packaging steps -+############################# -+set(CPACK_SET_DESTDIR TRUE) -+set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@ ) -+set(CPACK_PACKAGE_NAME "hip-runtime-nvidia") -+set(CPACK_PACKAGE_DESCRIPTION "HIP: -+ Heterogenous-computing Interface for Portability [RUNTIME - NVIDIA]") -+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [RUNTIME - NVIDIA]") -+set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.") -+set(CPACK_PACKAGE_CONTACT "HIP Support ") -+set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@) -+set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@) -+set(CPACK_PACKAGE_VERSION_PATCH @HIP_VERSION_PATCH@) -+set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@) -+set(CPACK_GENERATOR "TGZ;DEB;RPM") -+ -+set(CPACK_BINARY_DEB "ON") -+set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@) -+set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") -+set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${PROJECT_BINARY_DIR}/postinst;${PROJECT_BINARY_DIR}/prerm") -+set(CPACK_DEBIAN_PACKAGE_DEPENDS "cuda (>= 7.5), rocm-core") -+set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-nvcc") -+set(CPACK_DEBIAN_PACKAGE_REPLACES "hip-nvcc") -+ -+set(CPACK_BINARY_RPM "ON") -+set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@) -+set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") -+set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") -+set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/postinst") -+set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/prerm") -+set(CPACK_RPM_PACKAGE_AUTOREQPROV " no") -+string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION}) -+set(CPACK_RPM_PACKAGE_PROVIDES "hip-nvcc") -+set(CPACK_RPM_PACKAGE_OBSOLETES "hip-nvcc") -+set(CPACK_RPM_PACKAGE_REQUIRES "cuda >= 7.5, rocm-core") -+set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt") -+set(CPACK_SOURCE_GENERATOR "TGZ") -+# Remove dependency on rocm-core if -DROCM_DEP_ROCMCORE=ON not given to cmake -+set(ROCM_DEP_ROCMCORE "@ROCM_DEP_ROCMCORE@") -+if(NOT ROCM_DEP_ROCMCORE) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES}) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS}) -+endif() -+ -+set ( CPACK_RESOURCE_FILE_LICENSE "@hip_SOURCE_DIR@/LICENSE.txt" ) -+# Install license file -+install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/${CPACK_PACKAGE_NAME}) -+set(CPACK_RPM_PACKAGE_LICENSE "MIT") -+ -+include(CPack) -diff --git a/packaging/hip-samples.txt b/packaging/hip-samples.txt -new file mode 100644 -index 00000000..4ccac07b ---- /dev/null -+++ b/packaging/hip-samples.txt -@@ -0,0 +1,69 @@ -+# Copyright (c) 2016 - 2021 Advanced Micro Devices, Inc. All rights reserved. -+# -+# 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. -+ -+cmake_minimum_required(VERSION 2.8.3) -+project(hip_samples) -+ -+install(DIRECTORY @HIP_COMMON_DIR@/samples DESTINATION .) -+ -+############################# -+# Packaging steps -+############################# -+set(CPACK_SET_DESTDIR TRUE) -+set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@ ) -+set(CPACK_PACKAGE_NAME "hip-samples") -+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [SAMPLES]") -+set(CPACK_PACKAGE_DESCRIPTION "HIP: -+ Heterogenous-computing Interface for Portability [SAMPLES]") -+set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.") -+set(CPACK_PACKAGE_CONTACT "HIP Support ") -+set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@) -+set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@) -+set(CPACK_PACKAGE_VERSION_PATCH @HIP_VERSION_PATCH@) -+set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@) -+set(CPACK_GENERATOR "TGZ;DEB;RPM") -+ -+set(CPACK_BINARY_DEB "ON") -+set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@) -+set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") -+set(CPACK_DEBIAN_PACKAGE_DEPENDS "hip-dev (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), rocm-core") -+set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-samples") -+ -+set(CPACK_BINARY_RPM "ON") -+set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@) -+set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") -+set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") -+set(CPACK_RPM_PACKAGE_AUTOREQPROV " no") -+string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION}) -+set(CPACK_RPM_PACKAGE_REQUIRES "hip-devel = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}, rocm-core") -+set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt") -+set(CPACK_SOURCE_GENERATOR "TGZ") -+# Remove dependency on rocm-core if -DROCM_DEP_ROCMCORE=ON not given to cmake -+set(ROCM_DEP_ROCMCORE "@ROCM_DEP_ROCMCORE@") -+if(NOT ROCM_DEP_ROCMCORE) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES}) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS}) -+endif() -+ -+set ( CPACK_RESOURCE_FILE_LICENSE "@hip_SOURCE_DIR@/LICENSE.txt" ) -+# Install license file -+install(FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/${CPACK_PACKAGE_NAME}) -+set(CPACK_RPM_PACKAGE_LICENSE "MIT") -+include(CPack) --- -2.34.1 - diff --git a/files/0002-SWDEV-321116-Allow-disabling-ICD-loader.patch b/files/0002-SWDEV-321116-Allow-disabling-ICD-loader.patch deleted file mode 100644 --- a/files/0002-SWDEV-321116-Allow-disabling-ICD-loader.patch +++ /dev/null @@ -1,168 +0,0 @@ -From cee67d6763e9f0c44e97d867042993b1041f40fb Mon Sep 17 00:00:00 2001 -From: Jeremy Newton -Date: Wed, 6 Apr 2022 15:07:13 -0400 -Subject: [PATCH 2/3] SWDEV-321116 - Allow disabling ICD loader - -This patch adds an option to allow not building the ICD loader with -rocm-opencl. This isn't useful for internal use, but distros will want -this to allow packaging rocm-opencl with their own OCL ICD loader. - -Signed-off-by: Jeremy Newton -Change-Id: I6006593eceed543cd829e8949ec2256482815673 ---- - CMakeLists.txt | 23 ++++++++++++------- - packaging/CMakeLists.txt | 49 +++++++++++++++++++++++++++------------- - 2 files changed, 48 insertions(+), 24 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0612fa2..3bb903a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -10,11 +10,14 @@ project(rocm-opencl) - include(GNUInstallDirs) - - option(BUILD_TESTS "Enable building OpenCL tests" OFF) -+option(BUILD_ICD "Enable building OpenCL ICD Loader" ON) - option(EMU_ENV "Enable building for emulation environment" OFF) - - - set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_LIST_DIR}/khronos/headers/opencl2.2" CACHE PATH "") --add_subdirectory(khronos/icd) -+if(BUILD_ICD) -+ add_subdirectory(khronos/icd) -+endif() - add_subdirectory(amdocl) - add_subdirectory(tools/clinfo) - add_subdirectory(tools/cltrace) -@@ -52,8 +55,10 @@ if (DEFINED ROCM_PATCH_VERSION) - set(OPENCL_AMD_ICD_FILE "amdocl64_${ROCM_PATCH_VERSION}.icd") - endif() - --get_target_property(OPENCL_LIB_VERSION_MAJOR OpenCL SOVERSION) --get_target_property(OPENCL_LIB_VERSION_STRING OpenCL VERSION) -+if(BUILD_ICD) -+ get_target_property(OPENCL_LIB_VERSION_MAJOR OpenCL SOVERSION) -+ get_target_property(OPENCL_LIB_VERSION_STRING OpenCL VERSION) -+endif() - - #Set Package Version - set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) -@@ -71,11 +76,13 @@ message (STATUS "ROCM Installation path(ROCM_PATH): ${ROCM_PATH}") - - #Package: rocm-opencl,rocm-opencl-dev/devel,rocm-ocl-icd - --set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/rocm-ocl-icd) --configure_file(packaging/rocm-ocl-icd.postinst ${BUILD_DIR}/postinst @ONLY) --configure_file(packaging/rocm-ocl-icd.prerm ${BUILD_DIR}/prerm @ONLY) --configure_file(packaging/rocm-ocl-icd.rpm_post ${BUILD_DIR}/rpm_post @ONLY) --configure_file(packaging/rocm-ocl-icd.rpm_postun ${BUILD_DIR}/rpm_postun @ONLY) -+if(BUILD_ICD) -+ set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/rocm-ocl-icd) -+ configure_file(packaging/rocm-ocl-icd.postinst ${BUILD_DIR}/postinst @ONLY) -+ configure_file(packaging/rocm-ocl-icd.prerm ${BUILD_DIR}/prerm @ONLY) -+ configure_file(packaging/rocm-ocl-icd.rpm_post ${BUILD_DIR}/rpm_post @ONLY) -+ configure_file(packaging/rocm-ocl-icd.rpm_postun ${BUILD_DIR}/rpm_postun @ONLY) -+endif() - - add_subdirectory(packaging) - -diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt -index 2b6fa77..ab8fed2 100644 ---- a/packaging/CMakeLists.txt -+++ b/packaging/CMakeLists.txt -@@ -1,7 +1,10 @@ - cmake_minimum_required(VERSION 3.5.1) - include(GNUInstallDirs) - --set(CPACK_COMPONENTS_ALL binary dev icd) -+set(CPACK_COMPONENTS_ALL binary dev) -+if(BUILD_ICD) -+ string ( APPEND CPACK_COMPONENTS_ALL " icd" ) -+endif() - set(CPACK_DEB_COMPONENT_INSTALL ON) - set(CPACK_RPM_COMPONENT_INSTALL ON) - -@@ -17,8 +20,10 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2/CL - PATTERN cl_dx9_media_sharing.h EXCLUDE - PATTERN cl_egl.h EXCLUDE ) - --install(TARGETS OpenCL DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT icd ) --install(FILES ${CMAKE_SOURCE_DIR}/khronos/icd/LICENSE DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/rocm-ocl-icd COMPONENT icd) -+if(BUILD_ICD) -+ install(TARGETS OpenCL DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT icd ) -+ install(FILES ${CMAKE_SOURCE_DIR}/khronos/icd/LICENSE DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/rocm-ocl-icd COMPONENT icd) -+endif() - - - # Generic CPACK variables -@@ -45,11 +50,19 @@ endif() - message("Using CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_DEBIAN_PACKAGE_RELEASE}") - - set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") --set(CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS "rocm-ocl-icd, libelf-dev, comgr, hsa-rocr, rocm-core") -+if(BUILD_ICD) -+ set(CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS "rocm-ocl-icd, libelf-dev, comgr, hsa-rocr, rocm-core") -+else() -+ set(CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS "ocl-icd-libopencl1, libelf-dev, comgr, hsa-rocr, rocm-core") -+endif() - - # RPM CPACK variables - set(CPACK_BINARY_RPM "ON") --set(CPACK_RPM_BINARY_PACKAGE_REQUIRES "rocm-ocl-icd, comgr, hsa-rocr, rocm-core") -+if(BUILD_ICD) -+ set(CPACK_RPM_BINARY_PACKAGE_REQUIRES "rocm-ocl-icd, comgr, hsa-rocr, rocm-core") -+else() -+ set(CPACK_RPM_BINARY_PACKAGE_REQUIRES "ocl-icd, comgr, hsa-rocr, rocm-core") -+endif() - - #Unable to set CPACK_RPM_BIANRY_PACKAGE_LICENSE to control individual pacakge license - #Hence combining the license for BINARY,DEV,ICD to one -@@ -70,21 +83,23 @@ set(CPACK_RPM_DEV_PACKAGE_REQUIRES "rocm-opencl, hsa-rocr-devel, rocm-core") - ############################# - - # Debian CPACK variables --set(CPACK_ICD_DEB "ON") --set(CPACK_DEBIAN_ICD_PACKAGE_NAME "rocm-ocl-icd") -+if(BUILD_ICD) -+ set(CPACK_ICD_DEB "ON") -+ set(CPACK_DEBIAN_ICD_PACKAGE_NAME "rocm-ocl-icd") - --set(CPACK_DEBIAN_ICD_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/packages/rocm-ocl-icd/postinst;${CMAKE_BINARY_DIR}/packages/rocm-ocl-icd/prerm") --set(CPACK_DEBIAN_ICD_PACKAGE_DEPENDS "rocm-core") -+ set(CPACK_DEBIAN_ICD_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/packages/rocm-ocl-icd/postinst;${CMAKE_BINARY_DIR}/packages/rocm-ocl-icd/prerm") -+ set(CPACK_DEBIAN_ICD_PACKAGE_DEPENDS "rocm-core") - - # RPM CPACK variables --set(CPACK_ICD_RPM "ON") --set(CPACK_RPM_ICD_PACKAGE_NAME "rocm-ocl-icd") -+ set(CPACK_ICD_RPM "ON") -+ set(CPACK_RPM_ICD_PACKAGE_NAME "rocm-ocl-icd") - - - --set(CPACK_RPM_ICD_POST_INSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/packages/rocm-ocl-icd/rpm_post") --set(CPACK_RPM_ICD_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/packages/rocm-ocl-icd/rpm_postun") --set(CPACK_RPM_ICD_PACKAGE_REQUIRES "rocm-core") -+ set(CPACK_RPM_ICD_POST_INSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/packages/rocm-ocl-icd/rpm_post") -+ set(CPACK_RPM_ICD_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_BINARY_DIR}/packages/rocm-ocl-icd/rpm_postun") -+ set(CPACK_RPM_ICD_PACKAGE_REQUIRES "rocm-core") -+endif() - - if(DEFINED ENV{CPACK_RPM_PACKAGE_RELEASE}) - set(CPACK_RPM_PACKAGE_RELEASE $ENV{CPACK_RPM_PACKAGE_RELEASE}) -@@ -113,8 +128,10 @@ if(NOT ROCM_DEP_ROCMCORE) - string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS ${CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS}) - string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_DEV_PACKAGE_REQUIRES ${CPACK_RPM_DEV_PACKAGE_REQUIRES}) - string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_DEV_PACKAGE_DEPENDS ${CPACK_DEBIAN_DEV_PACKAGE_DEPENDS}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_ICD_PACKAGE_REQUIRES ${CPACK_RPM_ICD_PACKAGE_REQUIRES}) -- string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_ICD_PACKAGE_DEPENDS ${CPACK_DEBIAN_ICD_PACKAGE_DEPENDS}) -+ if(BUILD_ICD) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_ICD_PACKAGE_REQUIRES ${CPACK_RPM_ICD_PACKAGE_REQUIRES}) -+ string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_ICD_PACKAGE_DEPENDS ${CPACK_DEBIAN_ICD_PACKAGE_DEPENDS}) -+ endif() - endif() - - include(CPack) --- -2.35.1 - diff --git a/files/0003-SWDEV-321116-Drop-unnecessary-ICD-include.patch b/files/0003-SWDEV-321116-Drop-unnecessary-ICD-include.patch deleted file mode 100644 --- a/files/0003-SWDEV-321116-Drop-unnecessary-ICD-include.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a0e5d11a28c6bc5bcc72927e06b643eb39ea3af3 Mon Sep 17 00:00:00 2001 -From: Jeremy Newton -Date: Wed, 6 Apr 2022 18:37:47 -0400 -Subject: [PATCH 3/3] SWDEV-321116 - Drop unnecessary ICD include - -This looks unused. This should allow building rocm-opencl without any -dependency on any particular OCL ICD. - -Signed-off-by: Jeremy Newton -Change-Id: Ib9229ede8400fd0e883275659ab99513b03952cb ---- - amdocl/cl_execute.cpp | 2 -- - amdocl/cl_icd.cpp | 2 -- - 2 files changed, 4 deletions(-) - -diff --git a/amdocl/cl_execute.cpp b/amdocl/cl_execute.cpp -index 71fe535..e1d5be2 100644 ---- a/amdocl/cl_execute.cpp -+++ b/amdocl/cl_execute.cpp -@@ -27,8 +27,6 @@ - #include "platform/program.hpp" - #include "os/os.hpp" - --#include -- - /*! \addtogroup API - * @{ - * -diff --git a/amdocl/cl_icd.cpp b/amdocl/cl_icd.cpp -index 2a4f3af..4fce08b 100644 ---- a/amdocl/cl_icd.cpp -+++ b/amdocl/cl_icd.cpp -@@ -27,8 +27,6 @@ - #include "cl_d3d11_amd.hpp" - #endif //_WIN32 - --#include -- - #include - - amd::PlatformIDS amd::PlatformID::Platform = //{ NULL }; --- -2.35.1 - diff --git a/files/0004-SWDEV-336248-Don-t-exclude-cl_egl.h-from-install.patch b/files/0004-SWDEV-336248-Don-t-exclude-cl_egl.h-from-install.patch deleted file mode 100644 --- a/files/0004-SWDEV-336248-Don-t-exclude-cl_egl.h-from-install.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 59e15ab918ee1823e1d289585d75686032a08909 Mon Sep 17 00:00:00 2001 -From: Jeremy Newton -Date: Mon, 25 Apr 2022 12:33:46 -0400 -Subject: [PATCH 4/4] SWDEV-336248 - Don't exclude cl_egl.h from install - -cl_icd.h includes cl_egl.h, but cl_egl.h is excluded from install. It -was reported by the community that including cl_icd.h would error due to -the missing cl_egl.h file. - -I'm assuming that cl_egl.h was excluded because EGL isn't important for -ROCm. Since cl_icd.h has some important typedefs, it makes sense just -to include cl_egl.h, which seems to be a common practice in open source -projects. - -Signed-off-by: Jeremy Newton -Change-Id: I506257c2dc51512ec8e11b1e5dadbe6e48ad785b ---- - packaging/CMakeLists.txt | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt -index b6d206a..60050f3 100644 ---- a/packaging/CMakeLists.txt -+++ b/packaging/CMakeLists.txt -@@ -18,8 +18,7 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2/CL - USE_SOURCE_PERMISSIONS - PATTERN cl_d3d10.h EXCLUDE - PATTERN cl_d3d11.h EXCLUDE -- PATTERN cl_dx9_media_sharing.h EXCLUDE -- PATTERN cl_egl.h EXCLUDE ) -+ PATTERN cl_dx9_media_sharing.h EXCLUDE ) - - if(BUILD_ICD) - install(TARGETS OpenCL DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT icd ) --- -2.34.1 - diff --git a/files/0009-devicelib-searchpath.patch b/files/0009-devicelib-searchpath.patch deleted file mode 100644 --- a/files/0009-devicelib-searchpath.patch +++ /dev/null @@ -1,31 +0,0 @@ -Description: remove check on amdgcn/bitcode - The device libraries are not found correctly by default and the if (NOT - EXISTS ${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode) check is triggered [6]. I - think the goal upstream is to eventually remove this from the hip::device - interface entirely, but for now just correcting the search paths would be a - good step. -Author: Cordell Bloor -Forwarded: https://lists.debian.org/debian-ai/2022/05/msg00031.html -Reviewed-by: Étienne Mollier -Last-Update: 2022-06-04 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/hip-config.cmake.in -+++ b/hip-config.cmake.in -@@ -234,16 +234,6 @@ - - if (NOT compilePropIsSet) - hip_add_interface_compile_flags(hip::device -x hip) -- if (NOT EXISTS ${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode) -- # This path is to support an older build of the device library -- # TODO: To be removed in the future. -- if(WIN32) -- hip_add_interface_compile_flags(hip::device -fms-extensions -fms-compatibility) -- hip_add_interface_compile_flags(hip::device --hip-device-lib-path=\"${HIP_PATH}/lib/bitcode\") -- else() -- hip_add_interface_compile_flags(hip::device --hip-device-lib-path=\"${AMD_DEVICE_LIBS_PREFIX}/lib\") -- endif() -- endif() - endif() - - hip_add_interface_link_flags(hip::device --hip-link) diff --git a/files/0022-improve-rocclr-isa-compatibility-check.patch b/files/0022-improve-rocclr-isa-compatibility-check.patch new file mode 100644 --- /dev/null +++ b/files/0022-improve-rocclr-isa-compatibility-check.patch @@ -0,0 +1,75 @@ +From: Cordell Bloor +Date: Wed, 13 Jul 2022 18:45:41 -0600 +Subject: improve rocclr isa compatibility check + +There are a number of ISAs that are identical to each other, but are +not being treated as compatible by the upstream project. This more +sophisticated ISA compatibility check significantly reduces the number +of code objects that must be included in a binary in order to support +a wide variety of processors. + +This change to rocclr is useless on its own because there are multiple +places in the ROCm stack where kernels are checked for compatibility. +However, when combined with matching changes within rocr and hipamd, +this patch should allow HIP to load compatible kernels even when the +GFX ISA number is not an exact match. + +--- + clr/device/device.cpp | 43 ++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 40 insertions(+), 3 deletions(-) + +diff --git a/clr/device/device.cpp b/clr/device/device.cpp +index 8df0078..c8cd887 100644 +--- a/device/device.cpp ++++ b/device/device.cpp +@@ -199,10 +199,47 @@ std::string Isa::isaName() const { + return std::string(hsaIsaNamePrefix) + targetId(); + } + ++template ++static bool Contains(const std::array& arr, const T& value) { ++ return std::find(std::begin(arr), std::end(arr), value) != std::end(arr); ++} ++ ++static bool IsVersionCompatible(const Isa &codeObjectIsa, ++ const Isa &agentIsa) { ++ if (codeObjectIsa.versionMajor() == agentIsa.versionMajor() && ++ codeObjectIsa.versionMinor() == agentIsa.versionMinor()) { ++ ++ if (codeObjectIsa.versionStepping() == agentIsa.versionStepping()) { ++ return true; // exact match ++ } ++ ++ // The code object and the agent may sometimes be compatible if ++ // they differ only by stepping version. ++ if (codeObjectIsa.versionMajor() == 9 && ++ codeObjectIsa.versionMinor() == 0) { ++ const std::array equivalent_gfx90x = { 0, 2, 9, 12 }; ++ if (Contains(equivalent_gfx90x, codeObjectIsa.versionStepping()) && ++ Contains(equivalent_gfx90x, agentIsa.versionStepping())) { ++ return true; // gfx900 compatible object and agent ++ } ++ } else if (codeObjectIsa.versionMajor() == 10) { ++ if (codeObjectIsa.versionMinor() == 0) { ++ const std::array equivalent_gfx101x = { 0, 2 }; ++ if (Contains(equivalent_gfx101x, codeObjectIsa.versionStepping()) && ++ Contains(equivalent_gfx101x, agentIsa.versionStepping())) { ++ return true; // gfx1010 compatible object and agent ++ } ++ } else if (codeObjectIsa.versionMinor() == 3) { ++ return true; // gfx1030 compatible object and agent ++ } ++ } ++ } ++ ++ return false; ++} ++ + bool Isa::isCompatible(const Isa &codeObjectIsa, const Isa &agentIsa) { +- if (codeObjectIsa.versionMajor() != agentIsa.versionMajor() || +- codeObjectIsa.versionMinor() != agentIsa.versionMinor() || +- codeObjectIsa.versionStepping() != agentIsa.versionStepping()) ++ if (!IsVersionCompatible(codeObjectIsa, agentIsa)) + return false; + + assert(codeObjectIsa.isSrameccSupported() == agentIsa.isSrameccSupported() && diff --git a/files/0023-extend-hip-isa-compatibility-check.patch b/files/0023-extend-hip-isa-compatibility-check.patch new file mode 100644 --- /dev/null +++ b/files/0023-extend-hip-isa-compatibility-check.patch @@ -0,0 +1,210 @@ +From: Cordell Bloor +Date: Mon, 25 Jul 2022 22:23:25 -0600 +Subject: extend hip isa compatibility check + +There are a number of ISAs that are identical to each other, but are +not being treated as compatible by the upstream project. This more +sophisticated ISA compatibility check significantly reduces the number +of code objects that must be included in a binary in order to support +a wide variety of processors. + +This change to hipamd is useless on its own because there are multiple +places in the ROCm stack where kernels are checked for compatibility. +However, when combined with matching changes within rocr and rocclr, +this patch should allow HIP to load compatible kernels even when the +GFX ISA number is not an exact match. This should make it unnecessary +to use the HSA_OVERRIDE_GFX_VERSION variable. + +The HIP runtime needed to be adjusted such that it considered all +compatible kernels and so that it could choose to load the best one, +rather than the original behaviour in which it was only possible for +there to be a single compatible kernel. + +For binaries that are built for gfx900, gfx1010 and gfx1030, these +changes will enable compatibility with gfx902, gfx909, gfx90c, gfx1012, +gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, and gfx1036. + +I began working on this set of patches a week or two before my daughter +was born. In fact, I was working on them when I was interrupted by a +phone call from my wife informing me that it was time. My very patient +wife gave me a couple hours to wrap things up, but I did not quite +finalize the patch set before we had to leave for the hospital. The +days, weeks, and months that followed were a whirlwind of life changes +and it took me a very long time to get back to finish what I started. + +This patch is dedicated to Adeline Bloor. Many people have been waiting +for this functionality, but nobody else had to wait for these patches +before they were born. + +--- + src/hip_code_object.cpp | 110 +++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 90 insertions(+), 20 deletions(-) + +diff --git a/src/hip_code_object.cpp b/src/hip_code_object.cpp +index 4595e92..58d7a81 100644 +--- a/src/hip_code_object.cpp ++++ b/src/hip_code_object.cpp +@@ -331,47 +331,115 @@ static bool getTripleTargetID(std::string bundled_co_entry_id, const void* code_ + return true; + } + +-static bool isCodeObjectCompatibleWithDevice(std::string co_triple_target_id, +- std::string agent_triple_target_id) { ++struct GfxPattern { ++ std::string root; ++ std::string suffixes; ++}; ++ ++static bool matches(const GfxPattern& p, const std::string& s) { ++ if (p.root.size() + 1 != s.size()) { ++ return false; ++ } ++ if (0 != std::memcmp(p.root.data(), s.data(), p.root.size())) { ++ return false; ++ } ++ return p.suffixes.find(s[p.root.size()]) != std::string::npos; ++} ++ ++static bool isGfx900CompatibleProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx90", "029c"}, processor); ++} ++ ++static bool isGfx1030CompatibleProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx103", "0123456"}, processor); ++} ++ ++static bool isGfx1010CompatibleProcessor(const std::string& processor) { ++ return matches(GfxPattern{"gfx101", "02"}, processor); ++} ++ ++enum CompatibilityScore { ++ CS_EXACT_MATCH = 1 << 4, ++ CS_PROCESSOR_MATCH = 1 << 3, ++ CS_PROCESSOR_COMPATIBLE = 1 << 2, ++ CS_XNACK_SPECIALIZED = 1 << 1, ++ CS_SRAM_ECC_SPECIALIZED = 1 << 0, ++ CS_INCOMPATIBLE = 0, ++}; ++ ++static int getProcessorCompatibilityScore(const std::string& co_processor, ++ const std::string& agent_processor) { ++ if (co_processor == agent_processor) ++ return CS_PROCESSOR_MATCH; ++ ++ if (isGfx900CompatibleProcessor(agent_processor)) ++ return isGfx900CompatibleProcessor(co_processor) ? CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE; ++ ++ if (isGfx1010CompatibleProcessor(agent_processor)) ++ return isGfx1010CompatibleProcessor(co_processor) ? CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE; ++ ++ if (isGfx1030CompatibleProcessor(agent_processor)) ++ return isGfx1030CompatibleProcessor(co_processor) ? CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE; ++ ++ return CS_INCOMPATIBLE; ++} ++ ++static int getCompatiblityScore(std::string co_triple_target_id, ++ std::string agent_triple_target_id) { + // Primitive Check +- if (co_triple_target_id == agent_triple_target_id) return true; ++ if (co_triple_target_id == agent_triple_target_id) return CS_EXACT_MATCH; + + // Parse code object triple target id + if (!consume(co_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + '-')) { +- return false; ++ return CS_INCOMPATIBLE; + } + + std::string co_processor; + char co_sram_ecc, co_xnack; + if (!getTargetIDValue(co_triple_target_id, co_processor, co_sram_ecc, co_xnack)) { +- return false; ++ return CS_INCOMPATIBLE; + } + +- if (!co_triple_target_id.empty()) return false; ++ if (!co_triple_target_id.empty()) return CS_INCOMPATIBLE; + + // Parse agent isa triple target id + if (!consume(agent_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + '-')) { +- return false; ++ return CS_INCOMPATIBLE; + } + + std::string agent_isa_processor; + char isa_sram_ecc, isa_xnack; + if (!getTargetIDValue(agent_triple_target_id, agent_isa_processor, isa_sram_ecc, isa_xnack)) { +- return false; ++ return CS_INCOMPATIBLE; + } + +- if (!agent_triple_target_id.empty()) return false; ++ if (!agent_triple_target_id.empty()) return CS_INCOMPATIBLE; + + // Check for compatibility +- if (agent_isa_processor != co_processor) return false; +- if (co_sram_ecc != ' ') { +- if (co_sram_ecc != isa_sram_ecc) return false; +- } +- if (co_xnack != ' ') { +- if (co_xnack != isa_xnack) return false; ++ int processor_score = getProcessorCompatibilityScore(co_processor, agent_isa_processor); ++ if (processor_score == CS_INCOMPATIBLE) { ++ return CS_INCOMPATIBLE; + } + +- return true; ++ int xnack_bonus; ++ if (co_xnack == ' ') { ++ xnack_bonus = 0; ++ } else if (co_xnack == isa_xnack) { ++ xnack_bonus = CS_XNACK_SPECIALIZED; ++ } else { ++ return CS_INCOMPATIBLE; ++ } ++ ++ int sram_ecc_bonus; ++ if (co_sram_ecc == ' ') { ++ sram_ecc_bonus = 0; ++ } else if (co_sram_ecc == isa_sram_ecc) { ++ sram_ecc_bonus = CS_SRAM_ECC_SPECIALIZED; ++ } else { ++ return CS_INCOMPATIBLE; ++ } ++ ++ return processor_score + xnack_bonus + sram_ecc_bonus; + } + + // This will be moved to COMGR eventually +@@ -426,6 +494,7 @@ hipError_t CodeObject::extractCodeObjectFromFatBinary(const void* data, + for (size_t i = 0; i < agent_triple_target_ids.size(); i++) { + code_objs.push_back(std::make_pair(nullptr, 0)); + } ++ std::vector compatibilty_score(agent_triple_target_ids.size()); + + const auto obheader = reinterpret_cast(data); + const auto* desc = &obheader->desc[0]; +@@ -438,7 +507,6 @@ hipError_t CodeObject::extractCodeObjectFromFatBinary(const void* data, + reinterpret_cast(reinterpret_cast(obheader) + desc->offset); + const size_t image_size = desc->size; + +- if (num_code_objs == 0) break; + std::string bundleEntryId{desc->bundleEntryId, desc->bundleEntryIdSize}; + + unsigned co_version = 0; +@@ -446,10 +514,12 @@ hipError_t CodeObject::extractCodeObjectFromFatBinary(const void* data, + if (!getTripleTargetID(bundleEntryId, image, co_triple_target_id, co_version)) continue; + + for (size_t dev = 0; dev < agent_triple_target_ids.size(); ++dev) { +- if (code_objs[dev].first) continue; +- if (isCodeObjectCompatibleWithDevice(co_triple_target_id, agent_triple_target_ids[dev])) { ++ int score = getCompatiblityScore(co_triple_target_id, agent_triple_target_ids[dev]); ++ if (score > compatibilty_score[dev]) { ++ compatibilty_score[dev] = score; ++ if (!code_objs[dev].first) ++ --num_code_objs; + code_objs[dev] = std::make_pair(image, image_size); +- --num_code_objs; + } + } + } diff --git a/files/cmake-fix.patch b/files/cmake-fix.patch deleted file mode 100644 --- a/files/cmake-fix.patch +++ /dev/null @@ -1,83 +0,0 @@ -From d221fb6ebbe24d66855af8160687aa01b0112dec Mon Sep 17 00:00:00 2001 -From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> -Date: Fri, 11 Mar 2022 09:58:52 +0530 -Subject: [PATCH] SWDEV-325491 - hip build when rocm_agent_enumerator returns - no devices (#2535) - -Change-Id: I2fe58d1eaba82a3dab2472bd37a8ab26d105ac1c ---- - tests/catch/CMakeLists.txt | 23 +++++++++++++---------- - tests/hit/HIT.cmake | 24 +++++++++++++----------- - 2 files changed, 26 insertions(+), 21 deletions(-) - -diff --git a/tests/catch/CMakeLists.txt b/tests/catch/CMakeLists.txt -index e8abe8f038..0bc5231260 100644 ---- a/tests/catch/CMakeLists.txt -+++ b/tests/catch/CMakeLists.txt -@@ -109,16 +109,19 @@ if(NOT DEFINED OFFLOAD_ARCH_STR AND EXISTS "${ROCM_PATH}/bin/rocm_agent_enumerat - RESULT_VARIABLE ROCM_AGENT_ENUM_RESULT) - # Trim out gfx000 - string(REPLACE "gfx000\n" "" HIP_GPU_ARCH ${HIP_GPU_ARCH}) -- string(LENGTH ${HIP_GPU_ARCH} HIP_GPU_ARCH_LEN) -- -- # If string has more gfx target except gfx000 -- if(${HIP_GPU_ARCH_LEN} GREATER_EQUAL 1) -- string(REGEX REPLACE "\n" ";" HIP_GPU_ARCH_LIST "${HIP_GPU_ARCH}") -- set(OFFLOAD_ARCH_STR "") -- foreach(_hip_gpu_arch ${HIP_GPU_ARCH_LIST}) -- set(OFFLOAD_ARCH_STR " ${OFFLOAD_ARCH_STR} --offload-arch=${_hip_gpu_arch} ") -- endforeach() -- message(STATUS "Using offload arch string: ${OFFLOAD_ARCH_STR}") -+ if (NOT HIP_GPU_ARCH STREQUAL "") -+ string(LENGTH ${HIP_GPU_ARCH} HIP_GPU_ARCH_LEN) -+ # If string has more gfx target except gfx000 -+ if(${HIP_GPU_ARCH_LEN} GREATER_EQUAL 1) -+ string(REGEX REPLACE "\n" ";" HIP_GPU_ARCH_LIST "${HIP_GPU_ARCH}") -+ set(OFFLOAD_ARCH_STR "") -+ foreach(_hip_gpu_arch ${HIP_GPU_ARCH_LIST}) -+ set(OFFLOAD_ARCH_STR " ${OFFLOAD_ARCH_STR} --offload-arch=${_hip_gpu_arch} ") -+ endforeach() -+ message(STATUS "Using offload arch string: ${OFFLOAD_ARCH_STR}") -+ endif() -+ else() -+ message(STATUS "ROCm Agent Enumurator found no valid architectures") - endif() - endif() - -diff --git a/tests/hit/HIT.cmake b/tests/hit/HIT.cmake -index 006c9ec999..68c3df3c4f 100755 ---- a/tests/hit/HIT.cmake -+++ b/tests/hit/HIT.cmake -@@ -45,19 +45,21 @@ if(NOT DEFINED OFFLOAD_ARCH_STR AND EXISTS "${ROCM_PATH}/bin/rocm_agent_enumerat - execute_process(COMMAND ${ROCM_PATH}/bin/rocm_agent_enumerator OUTPUT_VARIABLE HIP_GPU_ARCH - RESULT_VARIABLE ROCM_AGENT_ENUM_RESULT) - message(STATUS "ROCm Agent Enumurator Result: ${ROCM_AGENT_ENUM_RESULT}") -- - # Trim out gfx000 - string(REPLACE "gfx000\n" "" HIP_GPU_ARCH ${HIP_GPU_ARCH}) -- string(LENGTH ${HIP_GPU_ARCH} HIP_GPU_ARCH_LEN) -- -- # If string has more gfx target except gfx000 -- if(${HIP_GPU_ARCH_LEN} GREATER_EQUAL 1) -- string(REGEX REPLACE "\n" ";" HIP_GPU_ARCH_LIST "${HIP_GPU_ARCH}") -- set(OFFLOAD_ARCH_STR "") -- foreach(_hip_gpu_arch ${HIP_GPU_ARCH_LIST}) -- set(OFFLOAD_ARCH_STR " ${OFFLOAD_ARCH_STR} --offload-arch=${_hip_gpu_arch} ") -- endforeach() -- message(STATUS "Using offload arch string: ${OFFLOAD_ARCH_STR}") -+ if (NOT HIP_GPU_ARCH STREQUAL "") -+ string(LENGTH ${HIP_GPU_ARCH} HIP_GPU_ARCH_LEN) -+ # If string has more gfx target except gfx000 -+ if(${HIP_GPU_ARCH_LEN} GREATER_EQUAL 1) -+ string(REGEX REPLACE "\n" ";" HIP_GPU_ARCH_LIST "${HIP_GPU_ARCH}") -+ set(OFFLOAD_ARCH_STR "") -+ foreach(_hip_gpu_arch ${HIP_GPU_ARCH_LIST}) -+ set(OFFLOAD_ARCH_STR " ${OFFLOAD_ARCH_STR} --offload-arch=${_hip_gpu_arch} ") -+ endforeach() -+ message(STATUS "Using offload arch string: ${OFFLOAD_ARCH_STR}") -+ endif() -+ else() -+ message(STATUS "ROCm Agent Enumurator found no valid architectures") - endif() - else() - message(STATUS "ROCm Agent Enumurator Not Found") diff --git a/files/series b/files/series deleted file mode 100644 --- a/files/series +++ /dev/null @@ -1,5 +0,0 @@ -0001-Revert-hip-Fix-and-install-cmake-targets-for-hip-pac.patch -0002-Revert-hip-Switch-to-component-based-packaging.patch -0002-Fix-CL-icd-header-include.patch -0001-Use-GNUInstallDirs.patch -0009-devicelib-searchpath.patch diff --git a/package.yml b/package.yml --- a/package.yml +++ b/package.yml @@ -1,22 +1,28 @@ name : rocm-hip -version : 5.1.3 -release : 3 +version : 5.3.3 +release : 4 source : - - https://github.com/ROCm-Developer-Tools/ROCclr/archive/refs/tags/rocm-5.1.3.tar.gz#ROCclr-5.1.3.tar.gz : ddee63cdc6515c90bab89572b13e1627b145916cb8ede075ef8446cbb83f0a48 - - https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/refs/tags/rocm-5.1.3.tar.gz#ROCm-OpenCL-Runtime-5.1.3.tar.gz : 44a7fac721abcd93470e1a7e466bdea0c668c253dee93e4f1ea9a72dbce4ba31 - - https://github.com/ROCm-Developer-Tools/hipamd/archive/refs/tags/rocm-5.1.3.tar.gz#hipamd-5.1.3.tar.gz : 707f2217f0e7aeb62d7b76830a271056d665542bf5f7a54e40adf4d5f299ca93 - - https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/rocm-5.1.3.tar.gz#HIP-5.1.3.tar.gz : ce755ee6e407904eba3f6b3c9efcdd48eb4f58a26b06e1892166d05f19a75973 -license : MIT + - https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/rocm-5.3.3.tar.gz#HIP-5.3.3.tar.gz : 51d4049dc37d261afb9e1270e60e112708ff06b470721ff21023e16e040e4403 + - https://github.com/ROCm-Developer-Tools/ROCclr/archive/refs/tags/rocm-5.3.3.tar.gz#ROCclr-5.3.3.tar.gz : f8133a5934f9c53b253d324876d74f08a19e2f5b073bc94a62fe64b0d2183a18 + - https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/refs/tags/rocm-5.3.3.tar.gz#ROCm-OpenCL-Runtime-5.3.3.tar.gz : cab394e6ef16c35bab8de29a66b96a7dc0e7d1297aaacba3718fa1d369233c9f + - https://github.com/ROCm-Developer-Tools/hipamd/archive/refs/tags/rocm-5.3.3.tar.gz#hipamd-5.3.3.tar.gz : 36acce92af39b0fa06002e164f5a7f5a9c7daa19bf96645361325775a325499d + - https://github.com/ROCm-Developer-Tools/roctracer/archive/refs/tags/rocm-5.3.3.tar.gz#roctracer-5.3.3.tar.gz : f2cb1e6bb69ea1a628c04f984741f781ae1d8498dc58e15795bb03015f924d13 component : programming.devel clang : yes summary : AMD ROCm HIP +license : MIT description: | HIP is a C++ Runtime API and Kernel Language that allows developers to create portable applications for AMD and NVIDIA GPUs from single source code. extract : false +patterns : + - docs: + - /usr/share/** builddeps : - pkgconfig(gl) - pkgconfig(libhsakmt) + - pkgconfig(numa) - pkgconfig(x11-xcb) + - python-cppheaderparser - rocminfo - rocm-cmake - rocm-compilersupport-devel @@ -25,76 +31,62 @@ - rocm-runtime-devel rundeps : - rocminfo - - rocm-hip-devel : + - devel: + - rocminfo - llvm-clang environment: | export HIP_CLANG_PATH="/usr/bin" + export ROCM_PATH="/usr" + + export AMDOPENCL_DIR="%workdir%/ROCm-OpenCL-Runtime-rocm-%version%" + export HIPAMD_DIR="%workdir%/hipamd-rocm-%version%" + export HIP_DIR="%workdir%/HIP-rocm-%version%" + export ROCCLR_DIR="%workdir%/ROCclr-rocm-%version%" + export ROCTRACER_DIR="%workdir%/roctracer-rocm-%version%" + export CXXFLAGS="$CXXFLAGS -I/usr/include/amd_comgr/" setup : | - tar -xvzf $sources/ROCclr-%version%.tar.gz - tar -xvzf $sources/ROCm-OpenCL-Runtime-%version%.tar.gz - tar -xvzf $sources/hipamd-%version%.tar.gz - tar -xvzf $sources/HIP-%version%.tar.gz - pushd ROCclr-rocm-%version% - %patch -p1 < $pkgfiles/0001-enable-gfx800.patch - %patch -p1 < $pkgfiles/0001-SWDEV-323669-Fix-linux-arch-detection.patch - echo "set_target_properties(rocclr PROPERTIES VERSION 5.1.3 SOVERSION 5.1)" \ - >> cmake/ROCclr.cmake - popd - pushd ROCm-OpenCL-Runtime-rocm-%version% - %patch -p1 < $pkgfiles/0001-SWDEV-321118-Use-GNUInstallDirs.patch - %patch -p1 < $pkgfiles/0002-SWDEV-321116-Allow-disabling-ICD-loader.patch - %patch -p1 < $pkgfiles/0003-SWDEV-321116-Drop-unnecessary-ICD-include.patch - %patch -p1 < $pkgfiles/0004-SWDEV-336248-Don-t-exclude-cl_egl.h-from-install.patch - echo "set_target_properties(cltrace PROPERTIES VERSION 5.1.3 SOVERSION 5.1)" \ - >> tools/cltrace/CMakeLists.txt - ls -d khronos/* | grep -v headers | xargs rm -r - ls -d khronos/headers/* | grep -v opencl2.2 | xargs rm -r - rm -r khronos/headers/*/tests/ - popd + tar -xzf $sources/ROCclr-%version%.tar.gz + tar -xzf $sources/ROCm-OpenCL-Runtime-%version%.tar.gz + tar -xzf $sources/hipamd-%version%.tar.gz + tar -xzf $sources/roctracer-%version%.tar.gz + tar -xzf $sources/HIP-%version%.tar.gz - pushd HIP-rocm-%version% - %patch -p1 < $pkgfiles/0007-isystem-removal.patch - %patch -p1 < $pkgfiles/cmake-fix.patch - %patch -p1 < $pkgfiles/0001-remove-failing-cmake-test.patch + pushd $ROCCLR_DIR + %patch -p1 < $pkgfiles/0001-enable-gfx800.patch + %patch -p1 < $pkgfiles/0022-improve-rocclr-isa-compatibility-check.patch popd - cd hipamd-rocm-%version% - %apply_patches - #soname is broken when building from tar, upstream is fixing the issue: - sed -i 's/-${HIP_VERSION_GITHASH}//' CMakeLists.txt + pushd $HIP_DIR + %patch -p1 < $pkgfiles/0001-remove-failing-cmake-test.patch + %patch -p1 < $pkgfiles/0001-Fix-hipcc.pl-paths-for-Solus.patch + %patch -p1 < $pkgfiles/0007-isystem-removal.patch + popd - #HIP requires RPATH - sed -i "/CMAKE_INSTALL_RPATH/d" CMakeLists.txt + cd $HIPAMD_DIR + %patch -p1 < $pkgfiles/0023-extend-hip-isa-compatibility-check.patch + # HIP requires RPATH + sed -i "/CMAKE_INSTALL_RPATH/d" CMakeLists.txt - mkdir build - cd build - %cmake -S.. -B. \ - -DAMD_OPENCL_PATH=%workdir%/ROCm-OpenCL-Runtime-rocm-%version% \ - -DROCCLR_PATH=%workdir%/ROCclr-rocm-%version% \ - -DHIP_COMMON_DIR=%workdir%/HIP-rocm-%version% \ - -DCMAKE_INSTALL_LIBDIR=%libdir% \ - -DHIP_COMPILER=clang \ - -DHIP_VERSION_BUILD_ID=0 \ - -DROCM_PATH=%PREFIX% \ - #-DCMAKE_HIP_ARCHITECTURES=gfx906 + %cmake -DPROF_API_HEADER_PATH=$ROCTRACER_DIR/inc/ext \ + -DAMD_OPENCL_PATH=$AMDOPENCL_DIR \ + -DROCCLR_PATH=$ROCCLR_DIR \ + -DHIP_COMMON_DIR=$HIP_DIR \ + -DROCM_PATH=$ROCM_PATH \ + -DHIP_COMPILER=clang \ + -DHIP_PLATFORM=amd \ + -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF \ build : | - cd hipamd-rocm-%version%/build + cd $HIPAMD_DIR %make install : | - cd hipamd-rocm-%version%/build + cd $HIPAMD_DIR %make_install - #hip installs some cmake modules incorrectly: - mv %installroot%/usr/cmake %installroot%%libdir%/cmake/Modules - - #make hip-config.cmake less broken, allowing to build stuff that relies on hip - sed -i 's|${_IMPORT_PREFIX}/../include|${_IMPORT_PREFIX}/include|g' %installroot%%libdir%/cmake/hip/hip-config.cmake - sed -i 's|"${ROCM_PATH}/llvm"|"/usr"|g' %installroot%%libdir%/cmake/hip/hip-config.cmake - - #https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0003-hip-config.cmake.patch - sed -i 's|"${AMD_DEVICE_LIBS_PREFIX}/lib"|"${AMD_DEVICE_LIBS_PREFIX}"|g' %installroot%%libdir%/cmake/hip/hip-config.cmake + # make hip-config.cmake less broken, allowing to build stuff that relies on hip + sed -i 's|${_IMPORT_PREFIX}/../include|${_IMPORT_PREFIX}/include|g' $installdir%libdir%/cmake/hip/hip-config.cmake + sed -i 's|"${ROCM_PATH}/llvm"|"/usr"|g' $installdir%libdir%/cmake/hip/hip-config.cmake - # https://github.com/ROCm-Developer-Tools/HIP/issues/2678 - sed -i '/__noinline__/d' %installroot%/usr/include/hip/amd_detail/host_defines.h + # https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0003-hip-config.cmake.patch + sed -i 's|${AMD_DEVICE_LIBS_PREFIX}/lib|${AMD_DEVICE_LIBS_PREFIX}/lib64/amdgcn/bitcode|g' $installdir%libdir%/cmake/hip/hip-config.cmake + sed -i 's|${AMD_DEVICE_LIBS_PREFIX}/lib|${AMD_DEVICE_LIBS_PREFIX}/lib64/amdgcn/bitcode|g' $installdir%libdir%/cmake/hip-lang/hip-lang-config.cmake - sed -i 's|"${ROCM_PATH}/bin/rocm_agent_enumerator"|"/usr/bin/rocm_agent_enumerator"|g' %installroot%/usr/bin/hipcc.pl diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml --- a/pspec_x86_64.xml +++ b/pspec_x86_64.xml @@ -22,9 +22,11 @@ /usr/bin/.hipVersion /usr/bin/hip_embed_pch.sh /usr/bin/hipcc + /usr/bin/hipcc.bat /usr/bin/hipcc.pl /usr/bin/hipcc_cmake_linker_helper /usr/bin/hipconfig + /usr/bin/hipconfig.bat /usr/bin/hipconfig.pl /usr/bin/hipdemangleatp /usr/bin/hipvars.pm @@ -33,9 +35,11 @@ /usr/bin/roc-obj-ls /usr/lib64/.hipInfo /usr/lib64/libamdhip64.so.5 - /usr/lib64/libamdhip64.so.5.1.20532 + /usr/lib64/libamdhip64.so.5.3.22062 /usr/lib64/libhiprtc-builtins.so.5 - /usr/lib64/libhiprtc-builtins.so.5.1.20532 + /usr/lib64/libhiprtc-builtins.so.5.3.22062 + /usr/lib64/libhiprtc.so.5 + /usr/lib64/libhiprtc.so.5.3.22062 @@ -45,7 +49,7 @@ programming.devel - rocm-hip + rocm-hip /usr/include/hip/amd_detail/amd_channel_descriptor.h @@ -55,11 +59,14 @@ /usr/include/hip/amd_detail/amd_hip_complex.h /usr/include/hip/amd_detail/amd_hip_cooperative_groups.h /usr/include/hip/amd_detail/amd_hip_fp16.h + /usr/include/hip/amd_detail/amd_hip_math_constants.h /usr/include/hip/amd_detail/amd_hip_runtime.h + /usr/include/hip/amd_detail/amd_hip_runtime_pt_api.h /usr/include/hip/amd_detail/amd_hip_unsafe_atomics.h /usr/include/hip/amd_detail/amd_hip_vector_types.h /usr/include/hip/amd_detail/amd_math_functions.h /usr/include/hip/amd_detail/amd_surface_functions.h + /usr/include/hip/amd_detail/amd_warp_functions.h /usr/include/hip/amd_detail/concepts.hpp /usr/include/hip/amd_detail/device_library_decls.h /usr/include/hip/amd_detail/functional_grid_launch.hpp @@ -71,7 +78,6 @@ /usr/include/hip/amd_detail/hip_fp16_gcc.h /usr/include/hip/amd_detail/hip_fp16_math_fwd.h /usr/include/hip/amd_detail/hip_ldg.h - /usr/include/hip/amd_detail/hip_memory.h /usr/include/hip/amd_detail/hip_prof_str.h /usr/include/hip/amd_detail/hip_runtime_prof.h /usr/include/hip/amd_detail/host_defines.h @@ -94,6 +100,7 @@ /usr/include/hip/hip_ext.h /usr/include/hip/hip_fp16.h /usr/include/hip/hip_hcc.h + /usr/include/hip/hip_math_constants.h /usr/include/hip/hip_profile.h /usr/include/hip/hip_runtime.h /usr/include/hip/hip_runtime_api.h @@ -105,36 +112,266 @@ /usr/include/hip/math_functions.h /usr/include/hip/nvcc_detail /usr/include/hip/nvidia_detail/nvidia_channel_descriptor.h + /usr/include/hip/nvidia_detail/nvidia_hip_atomics.h /usr/include/hip/nvidia_detail/nvidia_hip_complex.h /usr/include/hip/nvidia_detail/nvidia_hip_cooperative_groups.h + /usr/include/hip/nvidia_detail/nvidia_hip_math_constants.h /usr/include/hip/nvidia_detail/nvidia_hip_runtime.h /usr/include/hip/nvidia_detail/nvidia_hip_runtime_api.h /usr/include/hip/nvidia_detail/nvidia_hip_texture_types.h + /usr/include/hip/nvidia_detail/nvidia_hip_unsafe_atomics.h /usr/include/hip/nvidia_detail/nvidia_hiprtc.h /usr/include/hip/surface_types.h /usr/include/hip/texture_types.h - /usr/lib64/cmake/Modules/FindHIP.cmake - /usr/lib64/cmake/Modules/FindHIP/run_hipcc.cmake - /usr/lib64/cmake/Modules/FindHIP/run_make2cmake.cmake + /usr/include/hip_prof_str.h /usr/lib64/cmake/hip-lang/hip-lang-config-version.cmake /usr/lib64/cmake/hip-lang/hip-lang-config.cmake /usr/lib64/cmake/hip-lang/hip-lang-targets-relwithdebinfo.cmake /usr/lib64/cmake/hip-lang/hip-lang-targets.cmake + /usr/lib64/cmake/hip/FindHIP.cmake + /usr/lib64/cmake/hip/FindHIP/run_hipcc.cmake + /usr/lib64/cmake/hip/FindHIP/run_make2cmake.cmake /usr/lib64/cmake/hip/hip-config-version.cmake /usr/lib64/cmake/hip/hip-config.cmake /usr/lib64/cmake/hip/hip-targets-relwithdebinfo.cmake /usr/lib64/cmake/hip/hip-targets.cmake /usr/lib64/libamdhip64.so /usr/lib64/libhiprtc-builtins.so + /usr/lib64/libhiprtc.so + + + + rocm-hip-docs + Documentation for rocm-hip + HIP is a C++ Runtime API and Kernel Language that allows developers to create portable applications for AMD and NVIDIA GPUs from single source code. + + programming.docs + + /usr/share/doc/hip/LICENSE.txt + /usr/share/hip/samples/0_Intro/bit_extract/CMakeLists.txt + /usr/share/hip/samples/0_Intro/bit_extract/Makefile + /usr/share/hip/samples/0_Intro/bit_extract/README.md + /usr/share/hip/samples/0_Intro/bit_extract/bit_extract.cpp + /usr/share/hip/samples/0_Intro/module_api/.gitignore + /usr/share/hip/samples/0_Intro/module_api/CMakeLists.txt + /usr/share/hip/samples/0_Intro/module_api/Makefile + /usr/share/hip/samples/0_Intro/module_api/defaultDriver.cpp + /usr/share/hip/samples/0_Intro/module_api/launchKernelHcc.cpp + /usr/share/hip/samples/0_Intro/module_api/runKernel.cpp + /usr/share/hip/samples/0_Intro/module_api/vcpy_kernel.cpp + /usr/share/hip/samples/0_Intro/module_api_global/CMakeLists.txt + /usr/share/hip/samples/0_Intro/module_api_global/Makefile + /usr/share/hip/samples/0_Intro/module_api_global/runKernel.cpp + /usr/share/hip/samples/0_Intro/module_api_global/vcpy_kernel.cpp + /usr/share/hip/samples/0_Intro/square/CMakeLists.txt + /usr/share/hip/samples/0_Intro/square/Makefile + /usr/share/hip/samples/0_Intro/square/README.md + /usr/share/hip/samples/0_Intro/square/square.cu + /usr/share/hip/samples/0_Intro/square/square.hipref.cpp + /usr/share/hip/samples/1_Utils/hipBusBandwidth/CMakeLists.txt + /usr/share/hip/samples/1_Utils/hipBusBandwidth/LICENSE.txt + /usr/share/hip/samples/1_Utils/hipBusBandwidth/Makefile + /usr/share/hip/samples/1_Utils/hipBusBandwidth/ResultDatabase.cpp + /usr/share/hip/samples/1_Utils/hipBusBandwidth/ResultDatabase.h + /usr/share/hip/samples/1_Utils/hipBusBandwidth/hipBusBandwidth.cpp + /usr/share/hip/samples/1_Utils/hipCommander/CMakeLists.txt + /usr/share/hip/samples/1_Utils/hipCommander/LICENSE.txt + /usr/share/hip/samples/1_Utils/hipCommander/Makefile + /usr/share/hip/samples/1_Utils/hipCommander/ResultDatabase.cpp + /usr/share/hip/samples/1_Utils/hipCommander/ResultDatabase.h + /usr/share/hip/samples/1_Utils/hipCommander/c.cmd + /usr/share/hip/samples/1_Utils/hipCommander/classic.cmd + /usr/share/hip/samples/1_Utils/hipCommander/hipCommander.cpp + /usr/share/hip/samples/1_Utils/hipCommander/l2.hcm + /usr/share/hip/samples/1_Utils/hipCommander/loop.hcm + /usr/share/hip/samples/1_Utils/hipCommander/loop2.hcm + /usr/share/hip/samples/1_Utils/hipCommander/nullkernel.hip.cpp + /usr/share/hip/samples/1_Utils/hipCommander/nullkernel.hsaco + /usr/share/hip/samples/1_Utils/hipCommander/perf/latency2.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/latency_hostsync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/latency_nosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/latency_nullstream.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/modulelaunch_latency.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_d2h_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_d2h_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_d2h_sync_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_d2h_sync_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_h2d_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_h2d_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_h2d_sync_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_h2d_sync_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_kernel_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_kernel_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_kernel_sync_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_kernel_sync_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2_sync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2d2h_wosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2h2d_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2h2d_kernel_wosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2h2d_wosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2kernels.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_2kernels_wosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_d2h_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_d2h_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_d2h_sync_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_d2h_sync_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_h2d_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_h2d_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_h2d_sync_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_h2d_sync_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_kernel_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_kernel_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_kernel_sync_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_kernel_sync_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3_sync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3d2h_wosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3h2d_wosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3kernels.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_3kernels_wosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_4kernels.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_5kernels.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_6kernels.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_d2h_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_d2h_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_d2h_sync_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_d2h_sync_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d_10.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d_kernel_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d_kernel_d2h_wosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d_kernel_wosync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d_sync_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d_sync_kernel_sync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_h2d_sync_kernel_sync_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_kernel.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_kernel_barrier.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_kernel_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_kernel_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_kernel_sync_d2h.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_kernel_sync_h2d.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_streamcreate.hcm + /usr/share/hip/samples/1_Utils/hipCommander/perf/scripts/latency_sync.hcm + /usr/share/hip/samples/1_Utils/hipCommander/setstream.hcm + /usr/share/hip/samples/1_Utils/hipCommander/testcase.cpp + /usr/share/hip/samples/1_Utils/hipDispatchLatency/CMakeLists.txt + /usr/share/hip/samples/1_Utils/hipDispatchLatency/Makefile + /usr/share/hip/samples/1_Utils/hipDispatchLatency/hipDispatchEnqueueRateMT.cpp + /usr/share/hip/samples/1_Utils/hipDispatchLatency/hipDispatchLatency.cpp + /usr/share/hip/samples/1_Utils/hipDispatchLatency/test_kernel.cpp + /usr/share/hip/samples/1_Utils/hipInfo/CMakeLists.txt + /usr/share/hip/samples/1_Utils/hipInfo/Makefile + /usr/share/hip/samples/1_Utils/hipInfo/README.md + /usr/share/hip/samples/1_Utils/hipInfo/hipInfo.cpp + /usr/share/hip/samples/2_Cookbook/0_MatrixTranspose/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/0_MatrixTranspose/Makefile + /usr/share/hip/samples/2_Cookbook/0_MatrixTranspose/MatrixTranspose.cpp + /usr/share/hip/samples/2_Cookbook/0_MatrixTranspose/Readme.md + /usr/share/hip/samples/2_Cookbook/10_inline_asm/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/10_inline_asm/Makefile + /usr/share/hip/samples/2_Cookbook/10_inline_asm/Readme.md + /usr/share/hip/samples/2_Cookbook/10_inline_asm/inline_asm.cpp + /usr/share/hip/samples/2_Cookbook/11_texture_driver/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/11_texture_driver/Makefile + /usr/share/hip/samples/2_Cookbook/11_texture_driver/tex2dKernel.cpp + /usr/share/hip/samples/2_Cookbook/11_texture_driver/texture2dDrv.cpp + /usr/share/hip/samples/2_Cookbook/12_cmake_hip_add_executable/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/12_cmake_hip_add_executable/MatrixTranspose.cpp + /usr/share/hip/samples/2_Cookbook/12_cmake_hip_add_executable/Readme.md + /usr/share/hip/samples/2_Cookbook/13_occupancy/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/13_occupancy/Makefile + /usr/share/hip/samples/2_Cookbook/13_occupancy/occupancy.cpp + /usr/share/hip/samples/2_Cookbook/14_gpu_arch/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/14_gpu_arch/Makefile + /usr/share/hip/samples/2_Cookbook/14_gpu_arch/gpuarch.cpp + /usr/share/hip/samples/2_Cookbook/15_static_library/README.md + /usr/share/hip/samples/2_Cookbook/15_static_library/device_functions/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/15_static_library/device_functions/Makefile + /usr/share/hip/samples/2_Cookbook/15_static_library/device_functions/hipDevice.cpp + /usr/share/hip/samples/2_Cookbook/15_static_library/device_functions/hipMain2.cpp + /usr/share/hip/samples/2_Cookbook/15_static_library/host_functions/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/15_static_library/host_functions/Makefile + /usr/share/hip/samples/2_Cookbook/15_static_library/host_functions/hipMain1.cpp + /usr/share/hip/samples/2_Cookbook/15_static_library/host_functions/hipOptLibrary.cpp + /usr/share/hip/samples/2_Cookbook/16_assembly_to_executable/Makefile + /usr/share/hip/samples/2_Cookbook/16_assembly_to_executable/README.md + /usr/share/hip/samples/2_Cookbook/16_assembly_to_executable/hip_obj_gen.mcin + /usr/share/hip/samples/2_Cookbook/16_assembly_to_executable/square.cpp + /usr/share/hip/samples/2_Cookbook/17_llvm_ir_to_executable/Makefile + /usr/share/hip/samples/2_Cookbook/17_llvm_ir_to_executable/README.md + /usr/share/hip/samples/2_Cookbook/17_llvm_ir_to_executable/hip_obj_gen.mcin + /usr/share/hip/samples/2_Cookbook/17_llvm_ir_to_executable/square.cpp + /usr/share/hip/samples/2_Cookbook/18_cmake_hip_device/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/18_cmake_hip_device/README.md + /usr/share/hip/samples/2_Cookbook/18_cmake_hip_device/square.cpp + /usr/share/hip/samples/2_Cookbook/19_cmake_lang/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/19_cmake_lang/MatrixTranspose.cpp + /usr/share/hip/samples/2_Cookbook/19_cmake_lang/README.md + /usr/share/hip/samples/2_Cookbook/19_cmake_lang/TestFortran.F90 + /usr/share/hip/samples/2_Cookbook/1_hipEvent/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/1_hipEvent/Makefile + /usr/share/hip/samples/2_Cookbook/1_hipEvent/Readme.md + /usr/share/hip/samples/2_Cookbook/1_hipEvent/hipEvent.cpp + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/SineWaveSimulation.cpp + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/SineWaveSimulation.h + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/SineWaveSimulation.hip + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/VulkanBaseApp.cpp + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/VulkanBaseApp.h + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/buildcmd.txt + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/linmath.h + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/main.cpp + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/sinewave.frag + /usr/share/hip/samples/2_Cookbook/20_hip_vulkan/sinewave.vert + /usr/share/hip/samples/2_Cookbook/21_cmake_hip_cxx_clang/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/21_cmake_hip_cxx_clang/README.md + /usr/share/hip/samples/2_Cookbook/21_cmake_hip_cxx_clang/square.cpp + /usr/share/hip/samples/2_Cookbook/22_cmake_hip_lang/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/22_cmake_hip_lang/README.md + /usr/share/hip/samples/2_Cookbook/22_cmake_hip_lang/square.hip + /usr/share/hip/samples/2_Cookbook/3_shared_memory/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/3_shared_memory/Makefile + /usr/share/hip/samples/2_Cookbook/3_shared_memory/Readme.md + /usr/share/hip/samples/2_Cookbook/3_shared_memory/sharedMemory.cpp + /usr/share/hip/samples/2_Cookbook/4_shfl/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/4_shfl/Makefile + /usr/share/hip/samples/2_Cookbook/4_shfl/Readme.md + /usr/share/hip/samples/2_Cookbook/4_shfl/shfl.cpp + /usr/share/hip/samples/2_Cookbook/5_2dshfl/2dshfl.cpp + /usr/share/hip/samples/2_Cookbook/5_2dshfl/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/5_2dshfl/Makefile + /usr/share/hip/samples/2_Cookbook/5_2dshfl/Readme.md + /usr/share/hip/samples/2_Cookbook/6_dynamic_shared/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/6_dynamic_shared/Makefile + /usr/share/hip/samples/2_Cookbook/6_dynamic_shared/Readme.md + /usr/share/hip/samples/2_Cookbook/6_dynamic_shared/dynamic_shared.cpp + /usr/share/hip/samples/2_Cookbook/7_streams/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/7_streams/Makefile + /usr/share/hip/samples/2_Cookbook/7_streams/Readme.md + /usr/share/hip/samples/2_Cookbook/7_streams/stream.cpp + /usr/share/hip/samples/2_Cookbook/8_peer2peer/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/8_peer2peer/Makefile + /usr/share/hip/samples/2_Cookbook/8_peer2peer/peer2peer.cpp + /usr/share/hip/samples/2_Cookbook/9_unroll/CMakeLists.txt + /usr/share/hip/samples/2_Cookbook/9_unroll/Makefile + /usr/share/hip/samples/2_Cookbook/9_unroll/Readme.md + /usr/share/hip/samples/2_Cookbook/9_unroll/unroll.cpp + /usr/share/hip/samples/README.md - - 2023-01-20 - 5.1.3 + + 2023-05-01 + 5.3.3 Packaging update Jacek Jagosz jacek.jagosz@outlook.com \ No newline at end of file