Commit Graph

1651 Commits

Author SHA1 Message Date
Jaydeep Patel fb2c100d8c SWDEV-398109 - Enable smid support for CU mode for gfx10+.
Change-Id: Ief1e7c952c3de7e4a547bbdcc9817f51aa4d5d36
2024-01-16 20:13:23 -05:00
Jonathan R. Madsen 0f1fdc7794 Add rocprofiler-register support
- Add API table versioning defines to hip_api_trace.hpp
- Add rocprofiler-register implementation in hip_api_trace.cpp
  - created ToolInit implementation
  - moved some local functions into anonymous namespace
  - renamed some function to be overloads
  - made most of the initialization code templated (reduced code duplication)
  - enforce ABI
- Updated hipamd/src/CMakeLists.txt
  - find rocprofiler-register package (enabled by default but not required)
- Address review comments
  - simplify size calculation for dispatch table
  - remove setting .size field in GetDispatchTableImpl
- Fix windows build
- Do not enforce ABI on Windows

Change-Id: I08766e8a083528a1236996274bf4522e0e8a1b9f
2024-01-13 01:02:59 -06:00
sdashmiz d23835ffbe SWDEV-421027 - Add hipGraphAddNode
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ic8cf293ff483ee2547b52d2975062bcb9a6f5d17
2024-01-12 11:36:30 -05:00
Sameer Sahasrabuddhe c5ab5680b4 SWDEV-295298: introduce warp sync functions
The following builtins from the CUDA spec are implemented:

  - __all_sync, __any_sync, __ballot_sync and __activemask
  - __match_any_sync and __match_all_sync
  - __shfl_sync, __shfl_up_sync, __shfl_down_sync, and __shfl_xor_sync

The following builtins are NOT implemented, pending support in the compiler:

  - __reduce_add_sync, __reduce_min_sync, __reduce_max_sync
  - __reduce_and_sync, __reduce_or_sync, __reduce_xor_sync

Change-Id: I07dedbbfe5449f4b5c9b040bed59f5603ccec8c3
2024-01-11 22:31:27 -05:00
jujiang 2a2fea6c07 SWDEV-410522 - Fix a doxygen warning in a header in AMD platform
Change-Id: I29cd222af453c42a5d472081747bacf0c3f8d17c
2024-01-11 13:40:25 -05:00
sdashmiz 087767d9ac SWDEV-403382 - Add missing graph APIs
- add external semaphor signal and wait node

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: If205d48bc4fb60ce2966ca6ed0419e7700755bdd
2024-01-09 14:19:50 -05:00
Jaydeep Patel c3fc607e7d SWDEV-437440 - Specify which defination to use at compile time.
Change-Id: Ibeee914f293d26fa68ab793cac8b662aa34e8df3
2023-12-21 19:59:39 -05:00
Rahul Garg 92aa9d0fba SWDEV-388256 - Add support of hipExtGetLastError
Change-Id: Ie119d5ea611019996b8a80f7b820ca6a160496a6
2023-12-18 22:03:22 -05:00
Anusha GodavarthySurya 3e72b8d1e1 SWDEV-436405 - Add hipGetDevicePropertiesR0000 and hipChooseDeviceR0000 to hip dispatch table
Change-Id: I5b373ac030502eb88477d20a1d216bc48369b51d
2023-12-15 06:26:52 -05:00
sdashmiz 3a6e1b8fc5 SWDEV-421021 - move new fn pointers to end of the file
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I98d2379b3ef90282de64b22138b1dedcc3586a1b
2023-12-14 09:15:07 -05:00
Sameer Sahasrabuddhe 7137a296dd SWDEV-437090: move the __hip_assert macro to a common place
It cannot be moved to amd_device_functions.h because that causes circular
dependences when trying to use the macro in other files. So we create a new
header and move all assert/abort macros to that common header.

As a side-effect, also fix the macro to correctly expand the entire condition
argument, and also consume the trailing semicolon.

Change-Id: I43688c8e61183503a3a1a039b91321a3779152af
2023-12-14 09:03:14 -05:00
sdashmiz b8e820f835 SWDEV-421021 - Add hipDrvmemsetnode for graph
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I0240a162a16e61549d46b5d086c831404550e833
2023-12-13 09:30:36 -05:00
Ioannis Assiouras a562194562 SWDEV-433821 - Make hipStreamWaitEvent flags a default argument
Change-Id: I0192c1c5f69a1bbcc3f9919f76c947dc40737cb8
2023-12-06 12:37:35 -05:00
Jatin Chaudhary 77c581a3eb SWDEV-435702 - the functions in bf16 header need to be static
If the compiler decides not to inline these functions, we might break ODR (one definition rule) due to this file being included in multiple files and being linked together

Change-Id: Iacbfdabb53f5b4e5db8c690b23f3730ec9af16c0
2023-12-06 03:59:54 -05:00
Satyanvesh Dittakavi 7febad13be Revert "SWDEV-419480 - HIPRTC implementation of standard headers shouldn't be in std namespace"
This reverts commit 353dbe6e3b.

Reason for revert: This is considered a breaking change and requires
multiple apps to change their behavior. This will be reintroduced in later releases.

Change-Id: I3481627115af1872785585a155cc6a0ecfbe1372
2023-12-06 03:11:59 -05:00
Anusha GodavarthySurya d347f1d67d SWDEV-351966 - Remove hipRegisterTracerCallback from dispatch table
Change-Id: Ib343e2c8414a98c0cee6c60fb74a47bb859d8f45
2023-12-06 01:23:33 -05:00
Rahul Garg afc28b091e SWDEV-427855 - hipamd change for profiler and TF fix
This reverts commit 57cb840058.

Change-Id: Id69e47a1afd336ae1edb9c8e173be27e7b9dcc8d
2023-12-05 20:33:48 -05:00
Satyanvesh Dittakavi 270c6d48f1 Revert "SWDEV-431175 - Remove datatypes from HIPRTC"
This reverts commit 629e279f72.

Reason for revert: This is considered a breaking change and requires
multiple apps to change their behavior. This will be reintroduced in later releases.

Change-Id: I0354ce4e0f5e6c402499a7a8c2aaf43bf5b1bfc7
2023-12-05 02:32:38 -05:00
Satyanvesh Dittakavi f0010f4fdb SWDEV-434362 - Replace __HIP_CLANG_ONLY__ as it is not supported on HIPRTC
__HIP_CLANG_ONLY__ is not recognized in HIPRTC, due to which some
math functions like amd_mixed_dot were not included in hiprtc builtins.

Change-Id: I1fe41e1ddc8911f6a5b5b1405dd4730d0170a4f7
2023-11-29 04:22:19 -05:00
Satyanvesh Dittakavi 629e279f72 SWDEV-431175 - Remove datatypes from HIPRTC
Defining int64_t, uint64_t, int32_t, uint32_t in HIPRTC
seem to result in conflicts with some apps as they use
their own definitions for these types. NVRTC also doesn't
define these. Hence remove them to match the behavior.

Change-Id: I77ef70e846950698cb00375f5d0501b907f01fe3
2023-11-28 11:32:12 -05:00
Anusha GodavarthySurya 5e21f0c6bd SWDEV-351966 - Dispatch table for hip runtime
Change-Id: Ie4a44fa8cf1ff9c152146070bbbf6b0636d4e325
2023-11-22 01:11:19 -05:00
Rahul Garg 57cb840058 SWDEV-427855 - Revert "SWDEV-427855 - hipamd change for profiler and TF fix"
This reverts commit 3b9963c499.

Reason for revert: <Need rocprofiler changes to avoid PSDB failures>

Change-Id: I856b7ea30744f1b7bb099b6adbce2155201be539
2023-11-16 00:20:54 -05:00
jiabaxie 3b9963c499 SWDEV-427855 - hipamd change for profiler and TF fix
Change-Id: If32eb0ee152f3f46741a8277689363181c8753e8
2023-11-15 23:36:52 -05:00
Joseph Greathouse a0f29b454c SWDEV-431560 - use XCC_ID in __smid() for gfx941 and gfx942
__smid() needs to use both HW_ID and XCC_ID for gfx940, gfx941, and
gfx942. Previously, we only did this for gfx940 and thus XCC_ID
was incorrectly not passed back on the other two architectures.

Change-Id: I9fb13b6cef3280e15463443a180174629d03f8b2
2023-11-15 10:10:47 -05:00
Satyanvesh Dittakavi b5d286a6d3 SWDEV-430963 - Address MIGraphX failures due to unsafe buffer access usage
Compiler seem to be stricter in compiler staging builds related to
safe buffer programming when compared to other component staging builds.
This seem to result in additional errors when -Werror is enabled
in MIGraphX tests.

Removes all the clang pragmas to ignore several type of warnings in all
the headers and adds a single pragma which ignores all warnings using
#pragma clang diagnostic ignored "-Weverything" in hiprtc builtins.

Change-Id: I95f302bb285b2451b19dd5dfdb7df29164b0f750
2023-11-09 04:39:49 -04:00
Jatin Chaudhary 794ca0522f SWDEV-367537 - fix style inconsistencies seen in some operators
Change-Id: Ib94a26b931b2aa0237335f07f8557a4830c80f23
2023-11-07 10:37:02 -05:00
Jatin Chaudhary 86bd518981 SWDEV-367537 - Add missing operators to __hip_bfloat16 implementation
Add __host__ and __device__ to bunch of operator/function matching CUDA
Fix some bugs seen in __hisinf

Change-Id: I9e67e3e3eb2083b463158f3e250e5221c89b2896
2023-11-06 18:08:37 -05:00
taosang2 d4799b2a3f SWDEV-426270 - Remove duplicated operators
Remove duplicated operators of hipComplexFloat and
hipComplexDouble.
If users need complex number multiplication and division,
they should call
hipCmulf() and hipCdivf() for hipComplexFloat,
hipCmul() and hipCdiv() for hipComplexComplex

SWDEV-428198 - Add missing operators

Add missing operators of vectors in host

Change-Id: Ie58d1642d579e7119997db49a9fd6a6641b666fd
2023-11-01 12:59:28 -04:00
sdashmiz 9b567e1799 SWDEV-417075 - add hipDrvAddMemCpyNode
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ie631d7b1788f10171a29d463759a3cba3b2b2007

SWDEV-417075 - add hipDrvGraphAddMemcpyNode

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I6bab3310919643e119cd0004276907e223641cfb
2023-10-31 09:55:42 -04:00
Jaydeep Patel 76e3ffeb81 SWDEV-428198 - Revert "SWDEV-426270 - Remove duplicated operators"
This reverts commit 0ca61130a2.

Change-Id: I4973424b5f8d6f2b0d8496dda346b9d6dbba13ae
2023-10-27 01:51:03 -04:00
taosang2 0ca61130a2 SWDEV-426270 - Remove duplicated operators
Remove duplicated operators of hipComplexFloat and
hipComplexDouble.
If users need complex number multiplication and division,
they should call
hipCmulf() and hipCdivf() for hipComplexFloat,
hipCmul() and hipCdiv() for hipComplexComplex

Change-Id: Ie58d1642d578e7118997db40a9fd6a6641b666fd
2023-10-18 14:56:32 -04:00
Satyanvesh Dittakavi 353dbe6e3b SWDEV-419480 - HIPRTC implementation of standard headers shouldn't be in std namespace
HIPRTC implementation of few type traits are defined in std
namespace which causes conflicts with the std C++ headers when
apps try to include those std headers. Instead, use the
specific implementation of these headers from __hip_internal
namespace to avoid this.

Change-Id: Ia358df159af8783d1eba9a19cd458e192bf7e9e6
2023-10-16 13:10:55 -04:00
Rahul Garg 8fe1d9dda1 SWDEV-415029 - [ABI Break] Remove hcc symbols
This reverts commit 2535fac296.

Reason for revert: Bring back original change

Change-Id: Ie20e80f6e9b7d67a28e3a255abaf82018eb61e7a
2023-10-16 07:34:43 -04:00
Maneesh Gupta 67dda1ffd6 SWDEV-418100 - Move nv headers to hipother repo
Change-Id: Ib54546e366b61bdb83789d8264f30f1bfb875605
2023-10-14 06:56:13 +00:00
Jaydeep Patel 7150b2eaad SWDEV-425490 - Move ptrdiff_t & clock_t to hiprtc.cmake.
Change-Id: I7c8ce3c1b8cb11e0253b0f51ae10fca7f0a32017
2023-10-13 00:58:56 -04:00
sdashmiz c089ef4a2b SWDEV-332969 - [ABI Break]Substitute hipArray* with hipArray_t
- hipArray will be an internal struct from rocm6.0

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Icf97fe96b87be8532098cd7f9ceaad099f99c9b9
2023-10-12 12:09:19 -04:00
Jatin Chaudhary 2989840511 SWDEV-306642 - [ABI Break] Add texture/surface/device capabilities device struct entries
- alias hipGetDeviceProperties to hipGetDevicePropertiesR0600
- alias hipDeviceProp_t to hipDeviceProp_tR0600
- remove gcnArch from new device property struct
- add new requested struct members

Change-Id: If3f5dbef3d608487d9f6f419285f4bf577ea9bf0
2023-10-12 11:16:18 -04:00
Rakesh Roy 2535fac296 SWDEV-425967, SWDEV-425968 - Revert "SWDEV-415029 - [ABI Break] Remove hcc symbols"
This reverts commit 051e1005f4.

Reason for revert: This causes build failure in hipBLASLt & hipSPARSELt

Change-Id: I59f6aeb8b82261b77eb978e53407bc56be1d0cf1
2023-10-09 06:30:19 -04:00
Jaydeep Patel 46de4256e0 SWDEV-425490 - ptrdiff_t differs on windows and linux.
Change-Id: I5b943e869a6552870aa268be898182e806161b3c
2023-10-06 16:04:52 -04:00
Ioannis Assiouras 43126bc19b SWDEV-420989 - Initialize tiled_info meta_group_rank and meta_group_size
Change-Id: I6792e928702d0fef81f18e74eaead3ad3a8fbb7b
2023-10-06 05:43:04 -04:00
Satyanvesh Dittakavi f64ead62be SWDEV-424273 - Address MIGraphX tests staging failure
Change-Id: I5f51b62a0046f567603008974fda029d40d7656b
2023-10-05 15:55:54 -04:00
taosang2 6398f604b0 SWDEV-299127 - Support External Mipmap
Support hipExternalMemoryGetMappedMipmappedArray().
Add ImageExternalBuffer to differiate ImageBuffer.
Currently we only support tiling_optimal mode as
vulkan driver doesn't provide tiling information.

Change-Id: I7e3524cdde53e4df9f728894bcebf4bd3f58d4d9
2023-10-05 09:58:17 -04:00
Julia Jiang 3eb46ae588 SWDEV-425362 - Fix GL section on HIP API module
Change-Id: I6824758a4744739a596a96e04053eec8e16516cc
2023-10-04 14:26:45 -04:00
Ioannis Assiouras bf31109241 SWDEV-425129 - Revert "SWDEV-420822 - [ABI Break] Merge hipFunction_attribute into hipFuncAttribute"
This reverts commit c469f18e91.

Change-Id: I02d6e77f0874fc37f22de267435917edd4fdede3
2023-10-03 11:32:19 +01:00
Ioannis Assiouras c469f18e91 SWDEV-420822 - [ABI Break] Merge hipFunction_attribute into hipFuncAttribute
Change-Id: I9b9f7979e9b8dd422d9064c17c79a25bf7248d30
2023-10-01 06:52:12 -04:00
Ioannis Assiouras ae9a956fd3 SWDEV-398472 - [ABI Break] Added new include file for openGL interop APIs
Change-Id: Ic6debaadbffd6e773015cb365943bd0ae6f71966
2023-09-30 11:46:32 -04:00
Jatin Chaudhary 0668f20780 SWDEV-410898 - Add includes in files that use them
Change-Id: I14d9ea233d57c7267da3f9688305b949ced71a53
2023-09-25 08:45:22 -04:00
Jatin Chaudhary 49bb6a4072 SWDEV-421819 - Add ptrdiff_t and clock_t.
Rework types inside new __HIP_NO_STD_DEFS__ guard

Change-Id: I2b67381c01ba497b323864afe0a8d1402e396748
2023-09-22 05:07:52 -04:00
Satyanvesh Dittakavi 16fb3ca923 SWDEV-407358 - Address MIGraphx -Werror issue with unsafe buffer access
Change-Id: If4189dfbf12b670af60782f09ff8cf9b9867c299
2023-09-22 04:50:32 -04:00
Ioannis Assiouras fe2d747bcc SWDEV-401489 - [ABI Break] Removed hipModuleLaunchKernelExt
Change-Id: I0b31d9db755f8a89ead203dbd238a93c18b76855
2023-09-21 23:50:16 -04:00