18 Коммитов

Автор SHA1 Сообщение Дата
Sunday Clement 7c8e575f5d Fix Undefined behavior from signed bit shifts (#871)
* libhsakmt: fix UB due to signed integer literal in 1 << 31

Bit shift operations on signed numbers should not shift into or beyond
the signed bit as this results in Undefined Behaviour.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>

* libhsakmt: Fix UB due to signed integer literal in 1 << x

Bit Shifting an unsigned integer is undefined behavior.

BUG: SWDEV-532853

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>

* rocr: Fix UB in various places due signed integer in bit shift

Bit shifting signed integers into or beyond the sign bit is undefined.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>

* rocr: Change signed integer literals to unsigned

Changing the signed integers in the macro expressions throughout the file
to avoid overflow.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>

---------

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
Co-authored-by: Flora Cui <flora.cui@amd.com>
2025-09-18 09:09:30 -04:00
David Yat Sin 4e069fe72b doc: Fix doxygen comments for in-out params
[ROCm/ROCR-Runtime commit: 4c2dec5bb8]
2025-07-10 08:21:01 -04:00
David Yat Sin a16f5380cd rocr: Remove addrlib files for EoL GPUs
[ROCm/ROCR-Runtime commit: 2b691c3d5f]
2025-05-28 16:12:02 -04:00
Shweta Khatri 4325142db1 rocr: Use view3dAs2dArray flag, for thick/3D swizzle modes.
Added HSA_IMAGE_ENABLE_3D_SWIZZLE_DEBUG environment flag to
enable/disable this. Default value is false (view3dAs2dArray = 1)
Enabling this flag will enable support for swizzles that do 3D
interleaving. Note that all features of 3D images are supported
with 2D swizzles,it's just that the access patterns are different
and therefore cache hit-rates may be better or worse, depending
on how it's used. Volumetric algorithms do better with 3D and apps
that tend to access a single slice at a time do better with 2D.

Change-Id: Id8574a6710fe4333a1ee331e5ce9195a81434198


[ROCm/ROCR-Runtime commit: 6361466baa]
2025-01-27 09:28:33 -05:00
Yifan Zhang 5510695ac8 GFX1150: remove dupilcated definition of GFX1150
This patch is to remove duplicated definition of GFX1150.

Change-Id: I4a8b8bce5c2721748c4d64e1da13b59feae2139a
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Chris Freehill <cfreehil@amd.com>


[ROCm/ROCR-Runtime commit: 1d1a32d725]
2024-06-25 12:41:53 -05:00
David Yat Sin 08626b6cf9 Move addrlib into rocr namespace
This avoids conflicts in case application is loading another copy of
addrlib.

Change-Id: Ifb4a10270c867366d5eed0a8c015257b415189a5
Signed-off-by: Chris Freehill <cfreehil@amd.com>


[ROCm/ROCR-Runtime commit: f1a13b6d87]
2024-06-25 12:41:53 -05:00
David Yat Sin 49748c974b Update Addrlib gfx10 files
Update changes to  gfx10 addrlib files from:
https://gitlab.freedesktop.org/mesa/mesa.git

mesa top commit:
4d298673da9b05d826b960eece2e715a6b187330

Change-Id: I6015c827d3e9b1fbde034686432670958f424a1d
Signed-off-by: Chris Freehill <cfreehil@amd.com>


[ROCm/ROCR-Runtime commit: cf4b5e1598]
2024-06-25 12:27:09 -05:00
David Belanger bb0a28b8c5 GFX12: Update addrlib
Updated address lib to mesa amd-temp-gfx12 branch.
Commit: 6e5244bd3184f0720197270a10e031b5ecd5fe75

Signed-off-by: David Belanger <david.belanger@amd.com>
Change-Id: Icaead4f38c5f3019c375116070b1f97a927f09b0
Signed-off-by: Chris Freehill <cfreehil@amd.com>


[ROCm/ROCR-Runtime commit: bb02f4e9a7]
2024-06-25 12:27:09 -05:00
Lang Yu 43ae931ad5 Revert "Revert "Add support for GC 11.5.0 and 11.5.1""
This reverts commit a8e34eaec8.

gfx1150/1151 is merged into mainline now.

Change-Id: Id179949318a37888c74abb5a8610d95bc2f22906


[ROCm/ROCR-Runtime commit: 991bbdcf24]
2023-12-04 15:03:31 +00:00
David Yat Sin a8e34eaec8 Revert "Add support for GC 11.5.0 and 11.5.1"
Reverting this as current mainline compiler branch does not support
gfx1150/gfx1151 yet. Will bring back later.

This reverts commit 75ce1848cf.

Change-Id: I31ff4fb2d5817538094a7ffaeba96dd6a7d660c7


[ROCm/ROCR-Runtime commit: ebc51dd0eb]
2023-07-26 15:03:54 +00:00
Lang Yu 75ce1848cf Add support for GC 11.5.0 and 11.5.1
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Change-Id: I3c4116e78a5c1ddac2389f5fece57485bdb17f68


[ROCm/ROCR-Runtime commit: e877840197]
2023-07-22 16:06:22 +08:00
David Yat Sin 2affd1a1f6 Fix compile warnings and remove unused variables
Change-Id: I7acaee5e9cf218b358ffaf0e3af6067faf6f3d2a


[ROCm/ROCR-Runtime commit: 9cb10a3dd8]
2022-10-06 10:11:17 -04:00
David Yat Sin a6d4630696 Update addrLib to support gfx11
This library was taken from public MESA library:
https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/amd/addrlib

with top commit:
2866ae32da0348caf71ad2d11c353321df626ff4

Removing macros.h as it is no longer used by addrlib

Change-Id: I0fdabfe48b74c259b4d29d81beae89604bbc141a


[ROCm/ROCR-Runtime commit: a742b7e830]
2022-08-04 11:23:28 -04:00
Mike Li c2bed10739 Support for Custom Pitch for gfx103x
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: Ica83dff8bb382637010396781190f585754bd150


[ROCm/ROCR-Runtime commit: 93609fd3d4]
2021-02-22 22:05:25 -05:00
Sean Keely adfc9b060b Add addrlib to static linking namespace.
Wrap addrlib in namespace rocr.  Remove extern "C" declaration.

Change-Id: I9f7fc60df3fc12ca72a71f13561692a8ddf9829c


[ROCm/ROCR-Runtime commit: e840b9d86f]
2020-06-19 22:35:11 -04:00
Sean Keely e82cb9c6ec Update addrlib.
Corrects type errors and adds gfx1030 support.

Change-Id: I7fe7b5ded68b1e26fb899676712ad019089a45f3


[ROCm/ROCR-Runtime commit: 4081c564ee]
2020-06-19 22:34:52 -04:00
Sean Keely 3b0c3e83a3 Update addrlib with latest Mesa source.
Change-Id: Idd8cdaac9ad370397d62f6a32687ca7bc7d7462b


[ROCm/ROCR-Runtime commit: 3da81968cb]
2020-05-01 20:33:09 -04:00
Sean Keely 1fc7f2dec7 Move Images code to hsa-runtime folder
Change-Id: I53c1845d985ac3e9708d952865009c0021f3bb4f


[ROCm/ROCR-Runtime commit: 7e3db20826]
2020-04-30 19:35:57 -05:00