Commit Graph

1417 Commits

Author SHA1 Message Date
Chaudhary, Jatin Jaikishan 2f73e1385b SWDEV-525933 - add constexpr operators for fp16/bf16 (#199) 2025-05-09 09:53:58 +01:00
Chaudhary, Jatin Jaikishan a71c6eb1a0 SWDEV-529854 - __hmax/__hmin should handle nan's (#246) 2025-05-06 09:42:15 +01:00
Chaudhary, Jatin Jaikishan b1ebf33850 SWDEV-529927 - add missing operations for fp16/bf16 (#238) 2025-05-06 09:41:21 +01:00
Arsenault, Matthew 1db9a7d48b SWDEV-1 - Stop using ocml rounding functions (#228)
Directly use the builtins. Use the elementwise versions since there's
no implied errno, regardless of -f[no]-math-errno.

I didn't change the cases unnecessarily casting. The bfloat and vector
cases should work directly.
2025-05-05 19:35:12 +02:00
Chaudhary, Jatin Jaikishan 12febe6782 SWDEV-514560 - add fp6 header implementation (#54)
Co-authored-by: rahul manocha <rmanocha_amdeng>
2025-05-01 15:17:38 +01:00
Hernandez, Gerardo 1a8d766836 SWDEV-420237 - Fix reduce sync operations when masks are divergent (#181)
Do not use __ockl_activelane_u32() to calculate the index of the lane within the mask, as that would not work with divergent masks that have other bits on before the associated lane.
2025-04-22 19:47:58 +05:30
Brzak, Branislav 99142c3dd9 SWDEV-526612 - Add missing copyright notices (#201) 2025-04-18 20:54:27 +05:30
Chaudhary, Jatin Jaikishan 5d638d831c SWDEV-512924 - add fp4 API (#52)
* Remove C-style include guard

* clean up issues in the PR
2025-04-15 17:53:50 +01:00
Chaudhary, Jatin Jaikishan 588cf0fc69 SWDEV-520627 - include warp functions header for warpSize (#177)
Change-Id: Id3fff8f2722d521071ef0ff71b09fc365ef6fa82
2025-04-15 14:40:27 +05:30
Milanov, Aleksandar c4fa3ef927 SWDEV-526208 - Fix miscalculation of coalesced tiled partition mask (#162) 2025-04-11 19:40:26 +02:00
Hernandez, Gerardo 66496258b4 SWDEV-521920 - Fix compilation issues introduced by the reduce sync operations - 2 (#167)
Fix pytorch 2.5 issues, by defining reduce sync operations for type __half in amd_hip_fp16.h and not in
amd_warp_sync_functions.h which is problematic in case __half does not get included before that header.
Only define types not supported by cuda if HIP_ENABLE_EXTRA_WARP_SYNC_TYPES is defined, to avoid portability issues
2025-04-11 17:00:59 +05:30
Sang, Tao 6d10577761 SWDEV-521083 - Fix atomicMin/Max issues (#151)
Fix atomicMin/Max(), atomicMin/Max_system() issue on
float types.
2025-04-10 12:30:55 -04:00
Chaudhary, Jatin Jaikishan 628777b73d SWDEV-461087 - fp4/fp6/fp8 ocp headers (#41)
This now has host conversions too, which is directly from Christopher's
work on fcbx.

Signed-off-by: Christopher M. Riedl

* add const to func parameter

* do not depend on builtins, use gfx950 detection
2025-04-10 17:22:15 +01:00
Chaudhary, Jatin Jaikishan 5c030840d6 SWDEV-520627 - include sync_warp header instead of warp function header (#18)
Change-Id: Ic3f54b0f5bfee8565a8bbb6218fb0ccdb900c9ea
2025-04-10 21:50:25 +05:30
Chaudhary, Jatin Jaikishan 5214d1ca07 SWDEV-525969 - add gfx950 to use ocp type for fp8 (#157)
* do not use __gfx94plus_clr__ macro in fp8 header
2025-04-09 16:21:39 +01:00
Betigeri, Sourabh 8c6b90996e SWDEV-523281 - [clr] Implementation of hipLaunchKernelExC and hipDrvLaunchKernelEx API with support for cooperative launch (#92) 2025-04-03 20:10:05 +09:00
Dittakavi, Satyanvesh 376f23b86a SWDEV-516595 - Add __shfl functions with __hip_bfloat16 datatype (#42)
Also removes asserts in cooperative groups shfl functions since
__hip_bfloat16 shfl is present now

Change-Id: I57578b6e68dccc10c2ddcd194e9cc18bc7732ce1
2025-03-25 15:38:01 +05:30
Gerardo Hernandez 340d6bb69f SWDEV-420237 - Add __reduce_add_sync()
Change-Id: Ic8e4fab6b7aeb879d40b2c1419b30d1355a2bbdc
2025-03-12 03:20:49 -04:00
taosang2 d91e1f19d0 SWDEV-512613 - Improve device atomics functions
Also part of SWDEV-510994.
1. Fix atomicMin/Max_system() for float and double.
2. Remove logics of gfx941 which isn't supported.

Change-Id: Iacfdc1bc13e8da2f5df8751bb315b37d33cea667
2025-03-06 10:05:59 -05:00
Branislav Brzak c2d1776ebd SWDEV-516564 - SWDEV-512817 - Remove mentions of gfx940 and gfx941
Change-Id: Ia069fcb9c6948c3fc9a00961593c9dcc59609375
2025-03-05 04:26:07 -05:00
Rahul Manocha 5930f047bb SWDEV-489106 - Linker API addition to runtime
1) Add Linker APIs to runtime to support SPIRV linking
2) Migrate Internal implementations to runtime and share with rtc
3) Add Support to bundled and unbundled SPIRV Code object linking.

Change-Id: Ic1fd4431f842a208a2468e8aec54a65b5fa6b0e3
2025-02-22 13:39:23 -05:00
Jimbo Xie 7a4a22d454 SWDEV-477219 - implement hipEventRecordWithFlags
Change-Id: Icf07e85fc8c15f921f6e7c9fbd31dd3856dc988b
2025-02-19 13:53:00 -05:00
Jatin Chaudhary c3f49c8788 SWDEV-511239 - make fp8 standalone host compileable
- Use correct header in device_library_decl
- use std:: instead of __hip_internal:: for host compilation
- hide device specific stuff behind __clang__ and __HIP__ check

Change-Id: I2f3647e00555ed0e79f9954a459c41394c3cd49b
2025-02-18 19:07:45 -05:00
Jatin Chaudhary c23913f6e7 SWDEV-474146 - use __bf16 to do operations
Change-Id: I568dfa97238fd760f5362a8e560c33402f96cff3
2025-02-12 07:03:05 -05:00
Steven Chung 782976f5c2 SWDEV-496674 - Convert non-templated typedefs to templates for consistent mangling
Change-Id: I952d15f20afc85c0118403f82e75360197049ef5
2025-02-04 16:37:00 -05:00
Aidan Belton-Schure 152cee3737 SWDEV-443561 - Add tools dispatch table
Change-Id: I3445554e486ab7b94592571f52c1530cb918d021
2025-02-04 04:57:38 -05:00
taosang2 32daa8f384 SWDEV-501963 - Add missing codes for gfx950
Cherry-pick https://gerrit-git.amd.com/c/compute/ec/clr/+/1162997

Change-Id: I6b3c6bf55c61cffd43cd6f17b75998f751b75723
2025-01-31 14:34:49 -05:00
Jatin Chaudhary 1fdbf35d14 SWDEV-508617 - There is no NaN for E4M3 and FNUZ
Change-Id: I330b041019990231c098073f94d9d40a3c13ba76
2025-01-30 11:48:34 -05:00
Jatin Chaudhary e6fb89190a SWDEV-507817 - fix the return type of one of the atomicMin variants
Change-Id: I9915eb174d5677e21adbabae5819c9e306338ab3
2025-01-29 11:52:19 -05:00
Jatin Chaudhary bd7d40a4d8 SWDEV-491248 - Fix build_mask
thread_rank() gives thread index in a block. Limit the range to the
current warp size.

Change-Id: Ib5c9831236096485cf99ba7ab0b911a3b10de31c
2025-01-22 04:46:01 -05:00
Konstantin Zhuravlyov dd4378611a SWDEV-341212 - HIP header changes for supporting SPIR-V
This removes almost all uses of the deprecated
__AMDGCN_WAVEFRONT_SIZE macro, which is unavailable
when targeting SPIR-V, and adds a SPIR-V compatible
formulation of warpSize (which should end up as the
sole definition of warpSize once we remove support
for treating it as a compile time constant). It
is incomplete in that the cooperative_groups
implementation will need additional surgery.

Squashed commit of the following:

commit 6840826c3fec8516857dc4f2092d84358550f588
Author: Alex Voicu <alexandru.voicu@amd.com>
Date:   Fri Dec 6 23:36:32 2024 +0000

    Add deprecation warning for constexpr uses of `warpSize`.

commit a72307a7353034c2de53fd164e016967945fd0d1
Author: Alex Voicu <alexandru.voicu@amd.com>
Date:   Fri Dec 6 23:12:14 2024 +0000

    Prepare HIP RT for SPIR-V.

commit 5e40dd746ac4f8c93b521ef048ff9d494905ba95
Author: Alex Voicu <alexandru.voicu@amd.com>
Date:   Fri Dec 6 22:46:05 2024 +0000

    Revert stale change.

commit 231fe91c53dba4cabd832fc84eaa6ddb402271a0
Merge: a48905ec9 78f62d323
Author: Alex Voicu <alexandru.voicu@amd.com>
Date:   Fri Dec 6 22:37:24 2024 +0000

    Merge branch 'amd-staging' of https://github.com/ROCm/clr into amd-staging

commit a48905ec9cfe0e017cc64943195be82b530117d7
Author: Alex Voicu <alexandru.voicu@amd.com>
Date:   Tue Sep 17 03:14:56 2024 +0100

    Add scaffolding for SPIR-V support.

Change-Id: I2e84bbe90df58a5f9a8709b619905f04fa5b96dc
2025-01-20 08:42:24 -05:00
Jaydeep Patel 1aa8383b09 SWDEV-509664 - Specify type explicitly.
Change-Id: Ia0c0478682fa15eae7a31a2360310f08151716d4
2025-01-17 13:09:48 -05:00
Rahul Manocha 93cff75928 SWDEV-492165 - Add support for 16 bit atomicAdd and atomicCAS
Change-Id: I7f1e4876fe2960dff1775d27cb6443a89e146c86
2025-01-13 13:35:40 -05:00
zichguan-amd b8ba4ccf9c SWDEV-495789 - revert Fix ambiguity of fma for _Float16 for libc++ (#1976)
Change-Id: I45ae4711a047f4484a018b9409c9f6ecf09720ce
2024-12-29 10:56:32 -05:00
Jatin Chaudhary fccf0fa2f0 SWDEV-377518 - Fix bf16/fp8 header to be compileable with hiprtc
Change-Id: I2093a39d79a46da7e102266c04c2a71e03dcb88e
2024-12-17 08:57:15 -05:00
Ioannis Assiouras e8b2fdab96 SWDEV-483134 - Remove hipExtHostAlloc API
Change-Id: I60777ef5c56b60dd8100d0d794ca10fb3b96a555
2024-12-16 17:13:49 -05:00
Istvan Kiss 3c863dad91 SWDEV-502543 - Update doxygen to surface funtions and Coop Group API
Change-Id: Id4df63b8ae64a1113f85d89aa250ac9f7cc8b9bb
2024-12-14 14:11:37 -05:00
Sourabh Betigeri f1c05e9026 SWDEV-421020 - Adds hipGraphAddBatchMemOp, SetGetParams and execSetParams APIs
Change-Id: Ieccecfe6173cc68fd3c01f86c99f7cc09fe194a3
2024-12-13 06:23:39 +00:00
Sourabh Betigeri 03dbcd8ca7 SWDEV-440866 - [hip-roclr] Adds support to batch memory operations APIs
Change-Id: I5ac63a6626af8c2b4ac382c52dfe1aaf0b3716b8
2024-12-12 19:29:24 -05:00
Maneesh Gupta 072f94c204 Revert "SWDEV-491314 - enable _sync() functions with 64-bit mask argument"
This reverts commit 4e2fd192eb.

Reason for revert: Introduces regression SWDEV-503319

Change-Id: I888c5b95d904146e4782e8c57d736878fcdde678
2024-12-11 11:16:48 -05:00
Jatin Chaudhary 98b33886cd SWDEV-503299 - Do not use operator to check for nan
Some libs use __HIP_NO_HALF_OPERATORS__ and __HIP_NO_HALF_CONVERSIONS__
which results in operators being hidden and can cause errors.

Change-Id: I83c194d7d727cba30b46d7c296f7d396549f5fca
2024-12-11 00:33:44 -05:00
Jatin Chaudhary 5122b8c999 SWDEV-501779 - add correct function qualifier for fp16 functions
Some functions were __device__ only, but should be __host__ and
__device__, changed them to __HOST_DEVICE__.
Some functions were __HOST_DEVICE__ but were using ockl functions,
changed them to __device__ only.

Change-Id: Ife9e7abe60415bda68f5f9a101e6e7c39ad51064
2024-12-05 10:17:18 -05:00
Sourabh Betigeri 2ca644cf22 Revert "SWDEV-440866 - [hip-roclr] Adds support to batch memory operations APIs"
This reverts commit bd5d8e9baf.

Reason for revert: hipInfo fails on windows. Updating llvm amd-mainline-closed

Change-Id: I57e1fa1945188b0bc0a799c4f3d540f2b7713003
2024-12-02 16:46:12 -05:00
Sameer Sahasrabuddhe 4e2fd192eb SWDEV-491314 - enable _sync() functions with 64-bit mask argument
Change-Id: Ieb13a9e1b2fc49ff225a05a51056d1212d95ae57
2024-12-01 10:16:59 -05:00
Sourabh Betigeri bd5d8e9baf SWDEV-440866 - [hip-roclr] Adds support to batch memory operations APIs
Change-Id: I449ffca44bbb04d13348d112e896d603c70fd485
2024-11-30 17:54:32 -05:00
Aidan Belton-Schure 9652d69575 SWDEV-436099 Use new amdgcn_ballot builtin
Change-Id: I024fabc6c5b3f39c66885eb7615953f4d0432e9a
2024-11-27 04:34:50 -05:00
Julia Jiang 3bd32d7d4b SWDEV-497618 - Define GL group of doxygen for HIP API
Change-Id: Ia43f25201df960b905e5fd45481f486e7bffabdb
2024-11-15 11:25:51 -05:00
Sameer Sahasrabuddhe 556390f9c7 SWDEV-490198: _sync() will be enabled by default in 6.4
Change-Id: Id029424a9c0f6b144a7aa0e96fe8acc4a138ec51
2024-10-25 09:54:40 -04:00
Rahul Manocha e729f08704 SWDEV-468039,SWDEV-482579 - Enable FP8 SW Conversions on pre gfx940 archs
1) SW Conversions for ocp and fnuz are enabled on pre mi300 archs
2) for mi300 only fnuz is enabled
3) for gfx1200 only ocp is enabled

Change-Id: I90373752a2d15eff20d5deec874ed396ba4e1788
2024-10-17 11:49:22 -04:00
Jatin Chaudhary b977101893 SWDEV-486137 - match behavior of int variants of hadd/uhadd/rhadd/urhadd
Match cases and handle cases where it can overflow.

Change-Id: I3d6f802686af230a622ef9891a844135ad3d1ae5
2024-10-09 13:47:33 -04:00