diff options
3 files changed, 133 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/hip/Add_missing_open_cl_header_file_for_4.3.0.patch b/var/spack/repos/builtin/packages/hip/Add_missing_open_cl_header_file_for_4.3.0.patch new file mode 100644 index 0000000000..236d591c51 --- /dev/null +++ b/var/spack/repos/builtin/packages/hip/Add_missing_open_cl_header_file_for_4.3.0.patch @@ -0,0 +1,125 @@ +diff --git a/amdocl/cl_vk_amd.hpp b/amdocl/cl_vk_amd.hpp +new file mode 100644 +index 0000000..8b6212b +--- /dev/null ++++ b/amdocl/cl_vk_amd.hpp +@@ -0,0 +1,119 @@ ++/* Copyright (c) 2010-present Advanced Micro Devices, Inc. ++ ++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. */ ++ ++#pragma once ++ ++#include "platform/context.hpp" ++#include "platform/memory.hpp" ++ ++namespace amd ++{ ++ class VkObject : public InteropObject ++ { ++ protected: ++ amd::Os::FileDesc handleVk_; ++ ++ public: ++ //! GLObject constructor initializes member variables ++ VkObject( ++ amd::Os::FileDesc handle ++ ) // Initialization of member variables ++ ++ { ++ handleVk_ = handle; ++ } ++ ++ virtual ~VkObject() {} ++ VkObject* asVkObject() { return this; } ++ amd::Os::FileDesc getVkSharedHandle() const { return handleVk_; } ++ ++ ++ }; ++ ++ class BufferVk : public Buffer, public VkObject ++ { ++ protected: ++ //! Initializes the device memory array which is nested ++ // after'BufferVk' object in memory layout. ++ void initDeviceMemory() { ++ deviceMemories_ = ++ reinterpret_cast<DeviceMemory*>(reinterpret_cast<char*>(this) + sizeof(BufferVk)); ++ memset(deviceMemories_, 0, context_().devices().size() * sizeof(DeviceMemory)); ++ } ++ public: ++ //! BufferVk constructor just calls constructors of base classes ++ //! to pass down the parameters ++ BufferVk( ++ Context& amdContext, ++ size_t uiSizeInBytes, ++ amd::Os::FileDesc handle) ++ : // Call base classes constructors ++ Buffer( ++ amdContext, ++ 0, ++ uiSizeInBytes ++ ), ++ VkObject( ++ handle ++ ) ++ { ++ setInteropObj(this); ++ } ++ virtual ~BufferVk() {} ++ ++ BufferVk* asBufferVk() { return this; } ++ }; ++ ++ // to be modified once image requirments are known, for now, implement like buffer ++ ++ class ImageVk : public Buffer, public VkObject ++ { ++ protected: ++ //! Initializes the device memory array which is nested ++ // after'ImageVk' object in memory layout. ++ void initDeviceMemory() { ++ deviceMemories_ = ++ reinterpret_cast<DeviceMemory*>(reinterpret_cast<char*>(this) + sizeof(ImageVk)); ++ memset(deviceMemories_, 0, context_().devices().size() * sizeof(DeviceMemory)); ++ } ++ public: ++ //! ImageVk constructor just calls constructors of base classes ++ //! to pass down the parameters ++ ImageVk( ++ Context& amdContext, ++ size_t uiSizeInBytes, ++ amd::Os::FileDesc handle) ++ : // Call base classes constructors ++ Buffer( ++ amdContext, ++ 0, ++ uiSizeInBytes ++ ), ++ VkObject( ++ handle ++ ) ++ { ++ setInteropObj(this); ++ } ++ virtual ~ImageVk() {} ++ ++ ImageVk* asImageVk() { return this; } ++ }; ++} diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index d2819019ce..491b537e19 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -16,10 +16,11 @@ class Hip(CMakePackage): homepage = "https://github.com/ROCm-Developer-Tools/HIP" git = "https://github.com/ROCm-Developer-Tools/HIP.git" - url = "https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-4.2.0.tar.gz" + url = "https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-4.3.0.tar.gz" maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie'] - + version('master', branch='master') + version('4.3.0', sha256='293b5025b5e153f2f25e465a2e0006a2b4606db7b7ec2ae449f8a4c0b52d491b') version('4.2.0', sha256='ecb929e0fc2eaaf7bbd16a1446a876a15baf72419c723734f456ee62e70b4c24') version('4.1.0', sha256='e21c10b62868ece7aa3c8413ec0921245612d16d86d81fe61797bf9a64bc37eb') version('4.0.0', sha256='d7b78d96cec67c55b74ea3811ce861b16d300410bc687d0629e82392e8d7c857') @@ -34,7 +35,7 @@ class Hip(CMakePackage): depends_on('mesa18~llvm@18.3:') for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0', - '4.2.0']: + '4.2.0', '4.3.0']: depends_on('hip-rocclr@' + ver, when='@' + ver) depends_on('hsakmt-roct@' + ver, when='@' + ver) depends_on('hsa-rocr-dev@' + ver, when='@' + ver) @@ -75,6 +76,8 @@ class Hip(CMakePackage): patch('0005-Disable-tests-3.9.0.patch', when='@3.9.0:4.0.0') patch('0005-Disable-tests-4.1.0.patch', when='@4.1.0:') + patch('Add_missing_open_cl_header_file_for_4.3.0.patch', when='@4.3.0') + def get_paths(self): if self.spec.external: # For external packages we only assume the `hip` prefix is known, diff --git a/var/spack/repos/builtin/packages/rocminfo/package.py b/var/spack/repos/builtin/packages/rocminfo/package.py index 4dadcda9df..8c946df385 100644 --- a/var/spack/repos/builtin/packages/rocminfo/package.py +++ b/var/spack/repos/builtin/packages/rocminfo/package.py @@ -18,6 +18,7 @@ class Rocminfo(CMakePackage): version('master', branch='master') + version('4.3.0', sha256='2cc1f251c0ed9c3ea413cc15cb5ce11559e4497540eebbf5e8dcfd52b03e53d1') version('4.2.0', sha256='6952b6e28128ab9f93641f5ccb66201339bb4177bb575b135b27b69e2e241996') version('4.1.0', sha256='5b994ad02b6d250160770f6f7730835f3a52127193ac9a8dee40c53aec911f4f') version('4.0.0', sha256='0b3d692959dd4bc2d1665ab3a838592fcd08d2b5e373593b9192ca369e2c4aa7') @@ -30,7 +31,7 @@ class Rocminfo(CMakePackage): depends_on('cmake@3:', type='build') for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0', - '4.2.0', 'master']: + '4.2.0', '4.3.0', 'master']: depends_on('hsakmt-roct@' + ver, when='@' + ver) depends_on('hsa-rocr-dev@' + ver, when='@' + ver) |