Merge ~tchavadar/ubuntu/+source/rocm-llvm:ubuntu/devel into ubuntu/+source/rocm-llvm:ubuntu/devel
- Git
- lp:~tchavadar/ubuntu/+source/rocm-llvm
- ubuntu/devel
- Merge into ubuntu/devel
| Status: | Merged |
|---|---|
| Approved by: | Andreas Hasenack |
| Approved revision: | e5435b5099eb525e733fd8fd5994e3511c16157c |
| Merged at revision: | e5435b5099eb525e733fd8fd5994e3511c16157c |
| Proposed branch: | ~tchavadar/ubuntu/+source/rocm-llvm:ubuntu/devel |
| Merge into: | ubuntu/+source/rocm-llvm:ubuntu/devel |
| Diff against target: |
522 lines (+228/-137) 8 files modified
amd/comgr/CMakeLists.txt (+0/-21) amd/comgr/src/comgr-isa-metadata.def (+4/-4) amd/comgr/src/comgr.cpp (+20/-1) amd/device-libs/opencl/src/devenq/schedule_rocm.cl (+21/-11) amd/hipcc/bin/hipvars.pm (+171/-0) debian/changelog (+7/-0) debian/control (+5/-4) dev/null (+0/-96) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Andreas Hasenack | Approve | ||
| Ubuntu Sponsors | Pending | ||
| git-ubuntu import | Pending | ||
|
Review via email:
|
|||
Commit message
Description of the change
Merge request to debian is also created here: https:/
This upgrades the baseline for libamd-comgr and rocm-device-libs to rocm-7.1.0 version of https:/
We need 7.1.0 because we are targeting to have at least ROCm 7.1.0 available in ubuntu resolute with whole stack.
| Talha Can Havadar (tchavadar) wrote : | # |
| Andreas Hasenack (ahasenack) : | # |
| Andreas Hasenack (ahasenack) : | # |
| Andreas Hasenack (ahasenack) wrote : | # |
This commit is changing two files, and not just the one claimed by the commit mesage:
commit aa6b5d7f9a950b9
Author: Talha Can Havadar <email address hidden>
Date: Thu Dec 18 12:06:44 2025 +0100
d/changelog: update changelog for resolute
It's also changing the maintainer in d/control ("update-
| Andreas Hasenack (ahasenack) wrote : | # |
Do you have a PPA build with this branch, and autopkgtests triggered? I wanted to check build logs, and also run autopkgtests with that build.
| Talha Can Havadar (tchavadar) wrote : | # |
Hello Andreas, thank you very much for the review, yes I built this package on ppa: https:/
Didnt triggered the autopkgtests though, gonna create a new ppa with proposed enabled and trigger the autopkgtests there now
| Talha Can Havadar (tchavadar) : | # |
| Talha Can Havadar (tchavadar) wrote : | # |
Uploaded the package to this ppa: https:/
Triggered the autopkgtest for the package, right now they are in queue
| Talha Can Havadar (tchavadar) wrote : | # |
I am not sure whats going on with autopkgtest.
| Andreas Hasenack (ahasenack) wrote : | # |
Probably related to the LP outage. Can you trigger them again, or does that give you back an error along the lines of "this test is already running"?
| Talha Can Havadar (tchavadar) wrote : | # |
yes exactly:
```
You submitted an invalid request:
Test already running:
```
| Talha Can Havadar (tchavadar) wrote (last edit ): | # |
this is from my local run: https:/
only amd64 though
Adding summary here (for when pastebin expires):
```
autopkgtest [13:46:34]: @@@@@@@
hipcc.sh PASS (superficial)
clang.sh PASS (superficial)
hipconfig.sh PASS (superficial)
gcc.sh PASS (superficial)
g++.sh PASS (superficial)
```
| Andreas Hasenack (ahasenack) wrote : | # |
Please hop into the #debcrafters MM channel with the UUIDs of the stale running tests, and ask them to kill them, so you can trigger new runs
| Andreas Hasenack (ahasenack) wrote : | # |
- ubuntu version: ok
- new orig tarball (dfsg): created correctly, matches upstream, OK
- upstream changes: no release notes, but diff is small, inspected manually: OK
- autopkgtests: thanks for the local run, that will be enough here. If there are failures in other arches, we will deal with them after the upload
- build logs: OK, particularly no new symbols in the library this produces
Since architectures were removed, this might require an archive admin intervention before it migrates. Please keep an eye out for it in https:/
| Andreas Hasenack (ahasenack) wrote : | # |
Sponsored for resolute:
Uploading rocm-llvm_
Uploading rocm-llvm_
Uploading rocm-llvm_
Uploading rocm-llvm_
Uploading rocm-llvm_
| Talha Can Havadar (tchavadar) wrote : | # |
Thank you very much Andreas I will be following update_excuses
| Andreas Hasenack (ahasenack) wrote (last edit ): | # |
rocm-llvm is now stuck because of this[1]:
trying: rocm-llvm
skipped: rocm-llvm (34, 0, 499)
got: 74+682: a-8:a-682:
* ppc64el: hip-utils, libamdhip64-dev, libhipsparse-dev, librccl-dev, librocrand-dev, libstarpu-
That comes from the update_output.txt report. It's a bit cryptic, but it means that if the rocm-llvm new binaries are installed on a resolute system, certain packages will be removed, and it lists those packages in the case of ppc64el (but there are removals in other architectures too, it's the number after the "minus" sign in the "got" line).
To see what is going on, one way is to bring up a resolute container, update it, install current rocm-llvm binaries and those packages listed, and then update to rocm-llvm binaries from proposed, and see why we are getting removals.
Since this upload dropped architectures, it's very likely that reverse-
| Andreas Hasenack (ahasenack) wrote : | # |
I'm thinking this is mostly about the dropped architectures. I did a quick check on amd64 and arm64, and the only thing I noticed is that libstarpu-
I would start with the dropped architectures, and once that is resolved, see what remains in terms of migration problems.
| Talha Can Havadar (tchavadar) wrote : | # |
Installed these packages (list from rocm meta package that we are planning to release) in a resolute container and enabled resolute-proposed
```
Depends: ${misc:Depends},
hip-utils,
hipcc,
rocminfo,
```
Then I installed the binaries we provided in rocm-llvm, it didnt try to delete anything on amd64
```
root@pretty-
Upgrading:
hipcc libamd-comgr-dev libamd-comgr3 rocm-device-libs-21
Summary:
Upgrading: 4, Installing: 0, Removing: 0, Not Upgrading: 56
```
Should I investigate each package being removed in other architectures and provide update for them to not build for that arch?
| Andreas Hasenack (ahasenack) wrote : | # |
> Should I investigate each package being removed in other architectures and provide update for them to not
> build for that arch?
I think so, that would be a good starting point and clear up the report, leaving only the non-obvious problems.
| Andreas Hasenack (ahasenack) wrote : | # |
> I think so, that would be a good starting point and clear up the report, leaving only the non-obvious
> problems.
On second note, please don't do that. I just conferred with other archive admins, and the best way out is to remove the binaries of these other architectures in the reverse build dependencies.
| Talha Can Havadar (tchavadar) wrote : | # |
I was just planning to find some tool or write my own to create MPs for all ahahaha, phew :S thank you!
| Andreas Hasenack (ahasenack) wrote : | # |
Talha, here is something we missed: the architectures line in rocm-device-
Package: rocm-device-libs-21
Architecture: any
Section: libs
This is what caused the package to build on ppc64el, and many of those errors.
Could you please prepare a new PR/upload with that line also updated to match amd64/arm64 like the other binary packages, and test a build on a ppa with ALL architectures enabled, to confirm it will only build on amd64/amd64v3/
| Talha Can Havadar (tchavadar) wrote : | # |
yep of course, I'm on it, gonna create a new merge proposal
Preview Diff
| 1 | diff --git a/amd/comgr/CMakeLists.txt b/amd/comgr/CMakeLists.txt |
| 2 | index cfa170f..2eeb8c2 100644 |
| 3 | --- a/amd/comgr/CMakeLists.txt |
| 4 | +++ b/amd/comgr/CMakeLists.txt |
| 5 | @@ -38,7 +38,6 @@ endif(EXISTS "${CMAKE_SOURCE_DIR}/../../.git") |
| 6 | |
| 7 | include(GNUInstallDirs) |
| 8 | include(CMakePackageConfigHelpers) |
| 9 | -option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorg with backward compatibility" OFF) |
| 10 | # Optionally, build Compiler Support with ccache. |
| 11 | set(ROCM_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build") |
| 12 | if (ROCM_CCACHE_BUILD) |
| 13 | @@ -327,26 +326,6 @@ install(FILES |
| 14 | COMPONENT amd-comgr |
| 15 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${amd_comgr_NAME}) |
| 16 | |
| 17 | -#File reorg Backward compatibility function |
| 18 | -if(FILE_REORG_BACKWARD_COMPATIBILITY) |
| 19 | -# To enable/disable #error in wrapper header files |
| 20 | - if(NOT DEFINED ROCM_HEADER_WRAPPER_WERROR) |
| 21 | - if(DEFINED ENV{ROCM_HEADER_WRAPPER_WERROR}) |
| 22 | - set(ROCM_HEADER_WRAPPER_WERROR "$ENV{ROCM_HEADER_WRAPPER_WERROR}" |
| 23 | - CACHE STRING "Header wrapper warnings as errors.") |
| 24 | - else() |
| 25 | - set(ROCM_HEADER_WRAPPER_WERROR "OFF" CACHE STRING "Header wrapper warnings as errors.") |
| 26 | - endif() |
| 27 | - endif() |
| 28 | - if(ROCM_HEADER_WRAPPER_WERROR) |
| 29 | - set(deprecated_error 1) |
| 30 | - else() |
| 31 | - set(deprecated_error 0) |
| 32 | - endif() |
| 33 | - |
| 34 | - include(comgr-backward-compat.cmake) |
| 35 | -endif() |
| 36 | - |
| 37 | if(ENABLE_ASAN_PACKAGING) |
| 38 | install(FILES |
| 39 | "LICENSE.txt" |
| 40 | diff --git a/amd/comgr/comgr-backward-compat.cmake b/amd/comgr/comgr-backward-compat.cmake |
| 41 | deleted file mode 100644 |
| 42 | index c4f5992..0000000 |
| 43 | --- a/amd/comgr/comgr-backward-compat.cmake |
| 44 | +++ /dev/null |
| 45 | @@ -1,96 +0,0 @@ |
| 46 | -# Copyright (c) 2022 Advanced Micro Devices, Inc. All Rights Reserved. |
| 47 | -# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 48 | -# of this software and associated documentation files (the "Software"), to deal |
| 49 | -# in the Software without restriction, including without limitation the rights |
| 50 | -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 51 | -# copies of the Software, and to permit persons to whom the Software is |
| 52 | -# furnished to do so, subject to the following conditions: |
| 53 | -# |
| 54 | -# The above copyright notice and this permission notice shall be included in |
| 55 | -# all copies or substantial portions of the Software. |
| 56 | -# |
| 57 | -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 58 | -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 59 | -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 60 | -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 61 | -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 62 | -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 63 | -# THE SOFTWARE. |
| 64 | - |
| 65 | -cmake_minimum_required(VERSION 3.16.8) |
| 66 | - |
| 67 | -set(COMGR_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) |
| 68 | -set(COMGR_WRAPPER_DIR ${COMGR_BUILD_DIR}/wrapper_dir) |
| 69 | -set(COMGR_WRAPPER_INC_DIR ${COMGR_WRAPPER_DIR}/include) |
| 70 | - |
| 71 | -#Function to generate header template file |
| 72 | -function(create_header_template) |
| 73 | - file(WRITE ${COMGR_WRAPPER_DIR}/header.hpp.in "/* |
| 74 | - Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. |
| 75 | - |
| 76 | - Permission is hereby granted, free of charge, to any person obtaining a copy |
| 77 | - of this software and associated documentation files (the \"Software\"), to deal |
| 78 | - in the Software without restriction, including without limitation the rights |
| 79 | - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 80 | - copies of the Software, and to permit persons to whom the Software is |
| 81 | - furnished to do so, subject to the following conditions: |
| 82 | - |
| 83 | - The above copyright notice and this permission notice shall be included in |
| 84 | - all copies or substantial portions of the Software. |
| 85 | - |
| 86 | - THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 87 | - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 88 | - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 89 | - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 90 | - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 91 | - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 92 | - THE SOFTWARE. |
| 93 | - */ |
| 94 | - |
| 95 | -#ifndef @include_guard@ |
| 96 | -#define @include_guard@ |
| 97 | - |
| 98 | -#ifndef ROCM_HEADER_WRAPPER_WERROR |
| 99 | -#define ROCM_HEADER_WRAPPER_WERROR @deprecated_error@ |
| 100 | -#endif |
| 101 | -#if ROCM_HEADER_WRAPPER_WERROR /* ROCM_HEADER_WRAPPER_WERROR 1 */ |
| 102 | -#error \"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with amd_comgr\" |
| 103 | -#else /* ROCM_HEADER_WRAPPER_WERROR 0 */ |
| 104 | -#if defined(__GNUC__) |
| 105 | -#warning \"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with amd_comgr\" |
| 106 | -#else |
| 107 | -#pragma message(\"This file is deprecated. Use file from include path /opt/rocm-ver/include/ and prefix with amd_comgr\") |
| 108 | -#endif |
| 109 | -#endif /* ROCM_HEADER_WRAPPER_WERROR */ |
| 110 | - |
| 111 | -@include_statements@ |
| 112 | - |
| 113 | -#endif") |
| 114 | -endfunction() |
| 115 | - |
| 116 | -#use header template file and generate wrapper header files |
| 117 | -function(generate_wrapper_header) |
| 118 | - file(MAKE_DIRECTORY ${COMGR_WRAPPER_INC_DIR}) |
| 119 | - #find all header files(*.h) from include |
| 120 | - file(GLOB include_files ${COMGR_BUILD_DIR}/include/*.h) |
| 121 | - #Generate wrapper header files for each files in the list |
| 122 | - foreach(header_file ${include_files}) |
| 123 | - # set include guard |
| 124 | - get_filename_component(INC_GAURD_NAME ${header_file} NAME_WE) |
| 125 | - string(TOUPPER ${INC_GAURD_NAME} INC_GAURD_NAME) |
| 126 | - set(include_guard "${include_guard}COMGR_WRAPPER_INCLUDE_${INC_GAURD_NAME}_H") |
| 127 | - #set #include statement |
| 128 | - get_filename_component(file_name ${header_file} NAME) |
| 129 | - set(include_statements "${include_statements}#include \"${amd_comgr_NAME}/${file_name}\"\n") |
| 130 | - configure_file(${COMGR_WRAPPER_DIR}/header.hpp.in ${COMGR_WRAPPER_INC_DIR}/${file_name}) |
| 131 | - unset(include_statements) |
| 132 | - unset(include_guard) |
| 133 | - endforeach() |
| 134 | - |
| 135 | -endfunction() |
| 136 | - |
| 137 | -#Creater a template for header file |
| 138 | -create_header_template() |
| 139 | -#Use template header file and generater wrapper header files |
| 140 | -generate_wrapper_header() |
| 141 | -install(DIRECTORY ${COMGR_WRAPPER_INC_DIR} COMPONENT amd-comgr DESTINATION .) |
| 142 | diff --git a/amd/comgr/src/comgr-isa-metadata.def b/amd/comgr/src/comgr-isa-metadata.def |
| 143 | index a46ee01..c926978 100644 |
| 144 | --- a/amd/comgr/src/comgr-isa-metadata.def |
| 145 | +++ b/amd/comgr/src/comgr-isa-metadata.def |
| 146 | @@ -68,10 +68,10 @@ HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx904", false, true, EF_AMDGPU_MAC |
| 147 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx906", true, true, EF_AMDGPU_MACH_AMDGCN_GFX906, true, true, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) |
| 148 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx908", true, true, EF_AMDGPU_MACH_AMDGCN_GFX908, true, true, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) |
| 149 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx909", false, true, EF_AMDGPU_MACH_AMDGCN_GFX909, true, true, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) |
| 150 | -HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx90a", true, true, EF_AMDGPU_MACH_AMDGCN_GFX90A, true, true, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) |
| 151 | +HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx90a", true, true, EF_AMDGPU_MACH_AMDGCN_GFX90A, true, true, 65536, 32, 4, 40, 1024, 16, 800, 102, 8, 512, 512) |
| 152 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx90c", false, true, EF_AMDGPU_MACH_AMDGCN_GFX90C, true, true, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) |
| 153 | -HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx942", true, true, EF_AMDGPU_MACH_AMDGCN_GFX942, true, false, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) |
| 154 | -HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx950", true, true, EF_AMDGPU_MACH_AMDGCN_GFX950, true, false, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) |
| 155 | +HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx942", true, true, EF_AMDGPU_MACH_AMDGCN_GFX942, true, false, 65536, 32, 4, 40, 1024, 16, 800, 102, 8, 512, 512) |
| 156 | +HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx950", true, true, EF_AMDGPU_MACH_AMDGCN_GFX950, true, false, 65536, 32, 4, 40, 1024, 16, 800, 102, 8, 512, 512) |
| 157 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1010", false, true, EF_AMDGPU_MACH_AMDGCN_GFX1010, true, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 8, 256, 256) |
| 158 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1011", false, true, EF_AMDGPU_MACH_AMDGCN_GFX1011, true, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 8, 256, 256) |
| 159 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1012", false, true, EF_AMDGPU_MACH_AMDGCN_GFX1012, true, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 8, 256, 256) |
| 160 | @@ -95,7 +95,7 @@ HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1200", false, false, EF_AMDGPU_MAC |
| 161 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1201", false, false, EF_AMDGPU_MACH_AMDGCN_GFX1201, true, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 24, 1536, 256) |
| 162 | |
| 163 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx9-generic", false, true, EF_AMDGPU_MACH_AMDGCN_GFX9_GENERIC, true, true, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) |
| 164 | -HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx9-4-generic", true, true, EF_AMDGPU_MACH_AMDGCN_GFX9_4_GENERIC, true, false, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) |
| 165 | +HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx9-4-generic", true, true, EF_AMDGPU_MACH_AMDGCN_GFX9_4_GENERIC, true, false, 65536, 32, 4, 40, 1024, 16, 800, 102, 8, 512, 512) |
| 166 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx10-1-generic", false, true, EF_AMDGPU_MACH_AMDGCN_GFX10_1_GENERIC, true, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 8, 256, 256) |
| 167 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx10-3-generic", false, false, EF_AMDGPU_MACH_AMDGCN_GFX10_3_GENERIC, true, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 8, 256, 256) |
| 168 | HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx11-generic", false, false, EF_AMDGPU_MACH_AMDGCN_GFX11_GENERIC, true, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 16, 1024, 256) |
| 169 | diff --git a/amd/comgr/src/comgr.cpp b/amd/comgr/src/comgr.cpp |
| 170 | index 28c2c4e..053c030 100644 |
| 171 | --- a/amd/comgr/src/comgr.cpp |
| 172 | +++ b/amd/comgr/src/comgr.cpp |
| 173 | @@ -344,8 +344,17 @@ amd_comgr_status_t COMGR::parseTargetIdentifier(StringRef IdentStr, |
| 174 | Ident.Processor = Ident.Features[0]; |
| 175 | Ident.Features.erase(Ident.Features.begin()); |
| 176 | |
| 177 | - size_t IsaIndex; |
| 178 | |
| 179 | + // TODO: Add a LIT test for this |
| 180 | + if (IdentStr == "amdgcn-amd-amdhsa--amdgcnspirv" || |
| 181 | + IdentStr == "amdgcn-amd-amdhsa-unknown-amdgcnspirv") { |
| 182 | + // Features not supported for SPIR-V |
| 183 | + if (!Ident.Features.empty()) |
| 184 | + return AMD_COMGR_STATUS_ERROR_INVALID_ARGUMENT; |
| 185 | + return AMD_COMGR_STATUS_SUCCESS; |
| 186 | + } |
| 187 | + |
| 188 | + size_t IsaIndex; |
| 189 | amd_comgr_status_t Status = metadata::getIsaIndex(IdentStr, IsaIndex); |
| 190 | if (Status != AMD_COMGR_STATUS_SUCCESS) { |
| 191 | return Status; |
| 192 | @@ -1017,6 +1026,10 @@ amd_comgr_status_t AMD_COMGR_API |
| 193 | return AMD_COMGR_STATUS_SUCCESS; |
| 194 | } |
| 195 | |
| 196 | + if (StringRef(IsaName) == "amdgcn-amd-amdhsa--amdgcnspirv") { |
| 197 | + return ActionP->setIsaName(IsaName); |
| 198 | + } |
| 199 | + |
| 200 | if (!metadata::isValidIsaName(IsaName)) { |
| 201 | return AMD_COMGR_STATUS_ERROR_INVALID_ARGUMENT; |
| 202 | } |
| 203 | @@ -2129,6 +2142,8 @@ amd_comgr_populate_name_expression_map(amd_comgr_data_t Data, size_t *Count) { |
| 204 | if (!RelaRangeOrError) { |
| 205 | llvm::logAllUnhandledErrors(RelaRangeOrError.takeError(), llvm::errs(), |
| 206 | "RelaRange creation error: "); |
| 207 | + for (auto *Ptr : NameExpDataVec) |
| 208 | + delete Ptr; |
| 209 | return AMD_COMGR_STATUS_ERROR; |
| 210 | } |
| 211 | auto RelaRange = std::move(RelaRangeOrError.get()); |
| 212 | @@ -2149,6 +2164,8 @@ amd_comgr_populate_name_expression_map(amd_comgr_data_t Data, size_t *Count) { |
| 213 | if (!RodataOrError) { |
| 214 | llvm::logAllUnhandledErrors(RodataOrError.takeError(), llvm::errs(), |
| 215 | "Rodata creation error: "); |
| 216 | + for (auto *Ptr : NameExpDataVec) |
| 217 | + delete Ptr; |
| 218 | return AMD_COMGR_STATUS_ERROR; |
| 219 | } |
| 220 | auto Rodata = std::move(RodataOrError.get()); |
| 221 | @@ -2179,6 +2196,8 @@ amd_comgr_populate_name_expression_map(amd_comgr_data_t Data, size_t *Count) { |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | + for (auto *Ptr : NameExpDataVec) |
| 226 | + delete Ptr; |
| 227 | } // end AMD_COMGR_DATA_KIND_EXECUTABLE conditional |
| 228 | |
| 229 | *Count = DataP->NameExpressionMap.size(); |
| 230 | diff --git a/amd/device-libs/opencl/src/devenq/schedule_rocm.cl b/amd/device-libs/opencl/src/devenq/schedule_rocm.cl |
| 231 | index 731da88..209eebe 100644 |
| 232 | --- a/amd/device-libs/opencl/src/devenq/schedule_rocm.cl |
| 233 | +++ b/amd/device-libs/opencl/src/devenq/schedule_rocm.cl |
| 234 | @@ -61,16 +61,23 @@ min_command(uint slot_num, __global AmdAqlWrap* wraps) |
| 235 | return minCommand; |
| 236 | } |
| 237 | |
| 238 | +static inline bool |
| 239 | +check_pcie_support(__global SchedulerParam* param) { |
| 240 | + #define kInvalidWriteIndex (ulong)(-1) |
| 241 | + return (param->write_index == kInvalidWriteIndex) ? true : false; |
| 242 | +} |
| 243 | + |
| 244 | static inline void |
| 245 | EnqueueDispatch(__global hsa_kernel_dispatch_packet_t* aqlPkt, __global SchedulerParam* param) |
| 246 | { |
| 247 | __global hsa_queue_t* child_queue = param->child_queue; |
| 248 | |
| 249 | - |
| 250 | - // ulong index = __ockl_hsa_queue_add_write_index(child_queue, 1, __ockl_memory_order_relaxed); |
| 251 | - // The original code seen above relies on PCIe 3 atomics, which might not be supported on some systems, so use a device side global |
| 252 | - // for workaround. |
| 253 | - ulong index = atomic_fetch_add_explicit((__global atomic_ulong*)¶m->write_index, (ulong)1, memory_order_relaxed, memory_scope_device); |
| 254 | + ulong index; |
| 255 | + if (check_pcie_support(param)) { |
| 256 | + index = __ockl_hsa_queue_add_write_index(child_queue, 1, __ockl_memory_order_relaxed); |
| 257 | + } else { |
| 258 | + index = atomic_fetch_add_explicit((__global atomic_ulong*)¶m->write_index, (ulong)1, memory_order_relaxed, memory_scope_device); |
| 259 | + } |
| 260 | |
| 261 | const ulong queueMask = child_queue->size - 1; |
| 262 | __global hsa_kernel_dispatch_packet_t* dispatch_packet = &(((__global hsa_kernel_dispatch_packet_t*)(child_queue->base_address))[index & queueMask]); |
| 263 | @@ -82,17 +89,20 @@ EnqueueScheduler(__global SchedulerParam* param) |
| 264 | { |
| 265 | __global hsa_queue_t* child_queue = param->child_queue; |
| 266 | |
| 267 | - // ulong index = __ockl_hsa_queue_add_write_index(child_queue, 1, __ockl_memory_order_relaxed); |
| 268 | - // The original code seen above relies on PCIe 3 atomics, which might not be supported on some systems, so use a device side global |
| 269 | - // for workaround. |
| 270 | - ulong index = atomic_fetch_add_explicit((__global atomic_ulong*)¶m->write_index, (ulong)1, memory_order_relaxed, memory_scope_device); |
| 271 | + ulong index; |
| 272 | + if (check_pcie_support(param)) { |
| 273 | + index = __ockl_hsa_queue_add_write_index(child_queue, 1, __ockl_memory_order_relaxed); |
| 274 | + } else { |
| 275 | + index = atomic_fetch_add_explicit((__global atomic_ulong*)¶m->write_index, (ulong)1, memory_order_relaxed, memory_scope_device); |
| 276 | + } |
| 277 | |
| 278 | const ulong queueMask = child_queue->size - 1; |
| 279 | __global hsa_kernel_dispatch_packet_t* dispatch_packet = &(((__global hsa_kernel_dispatch_packet_t*)(child_queue->base_address))[index & queueMask]); |
| 280 | *dispatch_packet = param->scheduler_aql; |
| 281 | |
| 282 | - // This is part of the PCIe 3 atomics workaround, to write the final write_index value back to the child_queue |
| 283 | - __ockl_hsa_queue_store_write_index(child_queue, index + 1, __ockl_memory_order_relaxed); |
| 284 | + if (!check_pcie_support(param)) { |
| 285 | + __ockl_hsa_queue_store_write_index(child_queue, index + 1, __ockl_memory_order_relaxed); |
| 286 | + } |
| 287 | |
| 288 | __ockl_hsa_signal_store(child_queue->doorbell_signal, index, __ockl_memory_order_release); |
| 289 | } |
| 290 | diff --git a/amd/hipcc/bin/hipvars.pm b/amd/hipcc/bin/hipvars.pm |
| 291 | new file mode 100644 |
| 292 | index 0000000..93fba75 |
| 293 | --- /dev/null |
| 294 | +++ b/amd/hipcc/bin/hipvars.pm |
| 295 | @@ -0,0 +1,171 @@ |
| 296 | +#!/usr/bin/env perl |
| 297 | +# Copyright (c) 2020 - 2021 Advanced Micro Devices, Inc. All rights reserved. |
| 298 | +# |
| 299 | +# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 300 | +# of this software and associated documentation files (the "Software"), to deal |
| 301 | +# in the Software without restriction, including without limitation the rights |
| 302 | +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 303 | +# copies of the Software, and to permit persons to whom the Software is |
| 304 | +# furnished to do so, subject to the following conditions: |
| 305 | +# |
| 306 | +# The above copyright notice and this permission notice shall be included in |
| 307 | +# all copies or substantial portions of the Software. |
| 308 | +# |
| 309 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 310 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 311 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 312 | +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 313 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 314 | +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 315 | +# THE SOFTWARE. |
| 316 | + |
| 317 | +package hipvars; |
| 318 | +use warnings; |
| 319 | +use Getopt::Long; |
| 320 | +use Cwd; |
| 321 | +use File::Basename; |
| 322 | + |
| 323 | +$HIP_BASE_VERSION_MAJOR = "6"; |
| 324 | +$HIP_BASE_VERSION_MINOR = "2"; |
| 325 | +$HIP_BASE_VERSION_PATCH = "0"; |
| 326 | + |
| 327 | +#--- |
| 328 | +# Function to parse config file |
| 329 | +sub parse_config_file { |
| 330 | + my ($file, $config) = @_; |
| 331 | + if (open (CONFIG, "$file")) { |
| 332 | + while (<CONFIG>) { |
| 333 | + my $config_line=$_; |
| 334 | + chop ($config_line); |
| 335 | + $config_line =~ s/^\s*//; |
| 336 | + $config_line =~ s/\s*$//; |
| 337 | + if (($config_line !~ /^#/) && ($config_line ne "")) { |
| 338 | + my ($name, $value) = split (/=/, $config_line); |
| 339 | + $$config{$name} = $value; |
| 340 | + } |
| 341 | + } |
| 342 | + close(CONFIG); |
| 343 | + } |
| 344 | +} |
| 345 | + |
| 346 | +#--- |
| 347 | +# Function to check if executable can be run |
| 348 | +sub can_run { |
| 349 | + my ($exe) = @_; |
| 350 | + `$exe --version 2>&1`; |
| 351 | + if ($? == 0) { |
| 352 | + return 1; |
| 353 | + } else { |
| 354 | + return 0; |
| 355 | + } |
| 356 | +} |
| 357 | + |
| 358 | +$isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); |
| 359 | +$doubleQuote = "\""; |
| 360 | + |
| 361 | +# |
| 362 | +# TODO: Fix rpath LDFLAGS settings |
| 363 | +# |
| 364 | +# Since this hipcc script gets installed at two uneven hierarchical levels, |
| 365 | +# linked by symlink, the absolute path of this script should be used to |
| 366 | +# derive HIP_PATH, as dirname $0 could be /opt/rocm/bin or /opt/rocm/hip/bin |
| 367 | +# depending on how it gets invoked. |
| 368 | +# ROCM_PATH which points to <rocm_install_dir> is determined based on whether |
| 369 | +# we find bin/rocm_agent_enumerator in the parent of HIP_PATH or not. If it is found, |
| 370 | +# ROCM_PATH is defined relative to HIP_PATH else it is hardcoded to /opt/rocm. |
| 371 | +# |
| 372 | +$HIP_PATH=$ENV{'HIP_PATH'} // dirname(Cwd::abs_path("$0/../")); # use parent directory of hipcc |
| 373 | +if ($isWindows and defined $ENV{'HIP_PATH'}) { |
| 374 | + $HIP_PATH =~ s/^"(.*)"$/$1/; |
| 375 | + $HIP_PATH =~ s/\\/\//g; |
| 376 | +} |
| 377 | +if (-e "$HIP_PATH/bin/rocm_agent_enumerator") { |
| 378 | + $ROCM_PATH=$ENV{'ROCM_PATH'} // "$HIP_PATH"; # use HIP_PATH |
| 379 | +}elsif (-e "$HIP_PATH/../bin/rocm_agent_enumerator") { # case for backward compatibility |
| 380 | + $ROCM_PATH=$ENV{'ROCM_PATH'} // dirname("$HIP_PATH"); # use parent directory of HIP_PATH |
| 381 | +} else { |
| 382 | + $ROCM_PATH=$ENV{'ROCM_PATH'} // "/opt/rocm"; |
| 383 | +} |
| 384 | +$CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda'; |
| 385 | +if ($isWindows and defined $ENV{'CUDA_PATH'}) { |
| 386 | + $CUDA_PATH =~ s/^"(.*)"$/$1/; |
| 387 | + $CUDA_PATH =~ s/\\/\//g; |
| 388 | +} |
| 389 | + |
| 390 | +# Windows/Distro's have a different structure, all binaries are with hipcc |
| 391 | +if ($isWindows or -e "$HIP_PATH/bin/clang") { |
| 392 | + $HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$HIP_PATH/bin"; |
| 393 | +} else { |
| 394 | + $HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$ROCM_PATH/lib/llvm/bin"; |
| 395 | +} |
| 396 | +# HIP_ROCCLR_HOME is used by Windows builds |
| 397 | +$HIP_ROCCLR_HOME=$ENV{'HIP_ROCCLR_HOME'}; |
| 398 | + |
| 399 | +if (defined $HIP_ROCCLR_HOME) { |
| 400 | + $HIP_INFO_PATH= "$HIP_ROCCLR_HOME/lib/.hipInfo"; |
| 401 | +} else { |
| 402 | + $HIP_INFO_PATH= "$HIP_PATH/lib/.hipInfo"; # use actual file |
| 403 | +} |
| 404 | +#--- |
| 405 | +#HIP_PLATFORM controls whether to use nvidia or amd platform: |
| 406 | +$HIP_PLATFORM=$ENV{'HIP_PLATFORM'}; |
| 407 | +# Read .hipInfo |
| 408 | +my %hipInfo = (); |
| 409 | +parse_config_file("$HIP_INFO_PATH", \%hipInfo); |
| 410 | +# Prioritize Env first, otherwise use the hipInfo config file |
| 411 | +$HIP_COMPILER = $ENV{'HIP_COMPILER'} // $hipInfo{'HIP_COMPILER'} // "clang"; |
| 412 | +$HIP_RUNTIME = $ENV{'HIP_RUNTIME'} // $hipInfo{'HIP_RUNTIME'} // "rocclr"; |
| 413 | + |
| 414 | +# If using ROCclr runtime, need to find HIP_ROCCLR_HOME |
| 415 | +if (defined $HIP_RUNTIME and $HIP_RUNTIME eq "rocclr" and !defined $HIP_ROCCLR_HOME) { |
| 416 | + my $hipvars_dir = dirname(Cwd::abs_path($0)); |
| 417 | + if (-e "$hipvars_dir/../lib/bitcode") { |
| 418 | + $HIP_ROCCLR_HOME = Cwd::abs_path($hipvars_dir . "/.."); #FILE_REORG Backward compatibility |
| 419 | + } elsif (-e "$hipvars_dir/lib/bitcode") { |
| 420 | + $HIP_ROCCLR_HOME = Cwd::abs_path($hipvars_dir); |
| 421 | + } else { |
| 422 | + $HIP_ROCCLR_HOME = $HIP_PATH; # use HIP_PATH |
| 423 | + } |
| 424 | +} |
| 425 | + |
| 426 | +if (not defined $HIP_PLATFORM) { |
| 427 | + if (can_run($doubleQuote . "$HIP_CLANG_PATH/clang++" . $doubleQuote) or can_run("amdclang++")) { |
| 428 | + $HIP_PLATFORM = "amd"; |
| 429 | + } elsif (can_run($doubleQuote . "$CUDA_PATH/bin/nvcc" . $doubleQuote) or can_run("nvcc")) { |
| 430 | + $HIP_PLATFORM = "nvidia"; |
| 431 | + $HIP_COMPILER = "nvcc"; |
| 432 | + $HIP_RUNTIME = "cuda"; |
| 433 | + } else { |
| 434 | + # Default to amd for now |
| 435 | + $HIP_PLATFORM = "amd"; |
| 436 | + } |
| 437 | +} elsif ($HIP_PLATFORM eq "hcc") { |
| 438 | + $HIP_PLATFORM = "amd"; |
| 439 | + warn("Warning: HIP_PLATFORM=hcc is deprecated. Please use HIP_PLATFORM=amd. \n") |
| 440 | +} elsif ($HIP_PLATFORM eq "nvcc") { |
| 441 | + $HIP_PLATFORM = "nvidia"; |
| 442 | + $HIP_COMPILER = "nvcc"; |
| 443 | + $HIP_RUNTIME = "cuda"; |
| 444 | + warn("Warning: HIP_PLATFORM=nvcc is deprecated. Please use HIP_PLATFORM=nvidia. \n") |
| 445 | +} |
| 446 | + |
| 447 | +if ($HIP_COMPILER eq "clang") { |
| 448 | + # Windows does not have clang at linux default path |
| 449 | + if (defined $HIP_ROCCLR_HOME and (-e "$HIP_ROCCLR_HOME/bin/clang" or -e "$HIP_ROCCLR_HOME/bin/clang.exe")) { |
| 450 | + $HIP_CLANG_PATH = "$HIP_ROCCLR_HOME/bin"; |
| 451 | + } |
| 452 | +} |
| 453 | + |
| 454 | +#--- |
| 455 | +# Read .hipVersion |
| 456 | +my %hipVersion = (); |
| 457 | +if ($isWindows) { |
| 458 | + parse_config_file("$hipvars::HIP_PATH/bin/.hipVersion", \%hipVersion); |
| 459 | +} else { |
| 460 | + parse_config_file("$hipvars::HIP_PATH/share/hip/version", \%hipVersion); |
| 461 | +} |
| 462 | +$HIP_VERSION_MAJOR = $hipVersion{'HIP_VERSION_MAJOR'} // $HIP_BASE_VERSION_MAJOR; |
| 463 | +$HIP_VERSION_MINOR = $hipVersion{'HIP_VERSION_MINOR'} // $HIP_BASE_VERSION_MINOR; |
| 464 | +$HIP_VERSION_PATCH = $hipVersion{'HIP_VERSION_PATCH'} // $HIP_BASE_VERSION_PATCH; |
| 465 | +$HIP_VERSION_GITHASH = $hipVersion{'HIP_VERSION_GITHASH'} // 0; |
| 466 | +$HIP_VERSION="$HIP_VERSION_MAJOR.$HIP_VERSION_MINOR.$HIP_VERSION_PATCH-$HIP_VERSION_GITHASH"; |
| 467 | diff --git a/debian/changelog b/debian/changelog |
| 468 | index c8062a6..1de8861 100644 |
| 469 | --- a/debian/changelog |
| 470 | +++ b/debian/changelog |
| 471 | @@ -1,3 +1,10 @@ |
| 472 | +rocm-llvm (7.1.0+dfsg-0ubuntu1) resolute; urgency=medium |
| 473 | + |
| 474 | + * New upstream version 7.1.0 |
| 475 | + * d/control: remove unsupported architectures riscv64 and ppc64el |
| 476 | + |
| 477 | + -- Talha Can Havadar <talha.can.havadar@canonical.com> Thu, 15 Jan 2026 15:09:35 +0100 |
| 478 | + |
| 479 | rocm-llvm (7.0.2+dfsg-2) unstable; urgency=medium |
| 480 | |
| 481 | * Change HIP_CLANG_PATH from /usr/bin to /usr/lib/llvm-21/bin because |
| 482 | diff --git a/debian/control b/debian/control |
| 483 | index 802a0c6..df5edcc 100644 |
| 484 | --- a/debian/control |
| 485 | +++ b/debian/control |
| 486 | @@ -1,7 +1,8 @@ |
| 487 | Source: rocm-llvm |
| 488 | Section: devel |
| 489 | Priority: optional |
| 490 | -Maintainer: Debian ROCm Team <debian-ai@lists.debian.org> |
| 491 | +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
| 492 | +XSBC-Original-Maintainer: Debian ROCm Team <debian-ai@lists.debian.org> |
| 493 | Uploaders: Xuanteng Huang <xuanteng.huang@outlook.com>, |
| 494 | Christian Kastner <ckk@debian.org>, |
| 495 | Cordell Bloor <cgmb@debian.org> |
| 496 | @@ -28,7 +29,7 @@ Rules-Requires-Root: no |
| 497 | |
| 498 | Package: hipcc |
| 499 | Section: devel |
| 500 | -Architecture: amd64 arm64 ppc64el riscv64 |
| 501 | +Architecture: amd64 arm64 |
| 502 | Depends: ${misc:Depends}, |
| 503 | ${shlibs:Depends}, |
| 504 | clang-21, |
| 505 | @@ -77,7 +78,7 @@ Description: AMD specific device-side language runtime libraries |
| 506 | Heterogeneous Compute built-in library. |
| 507 | |
| 508 | Package: libamd-comgr3 |
| 509 | -Architecture: amd64 arm64 ppc64el riscv64 |
| 510 | +Architecture: amd64 arm64 |
| 511 | Section: libs |
| 512 | Depends: ${misc:Depends}, |
| 513 | ${shlibs:Depends}, |
| 514 | @@ -88,7 +89,7 @@ Description: ROCm code object manager |
| 515 | header file /usr/include/amd_comgr/amd_comgr.h . |
| 516 | |
| 517 | Package: libamd-comgr-dev |
| 518 | -Architecture: amd64 arm64 ppc64el riscv64 |
| 519 | +Architecture: amd64 arm64 |
| 520 | Section: libdevel |
| 521 | Depends: libamd-comgr3 (= ${binary:Version}), |
| 522 | ${misc:Depends}, |

Just cleaned up the noise coming from gbp import-orig