Commit Graph

13008 Commitit

Tekijä SHA1 Viesti Päivämäärä
Saleel Kudchadker 561fb8a459 SWDEV-470008 - Fix AMD_SERIALIZE_KERNEL
- awaitCompletion code may do a endless spin wait for cases where we
dont submit a handler. One such case can be the hipExt*Launch API which
takes a stop event. In that case we optimize the stop event by attaching
a signal to the dispatch packet but dont submit a handler when we attach
the signal. That means if awaitCompletion() is called after that, we
would keep on waiting on command status on the host rather than simply
checking signal value.

Change-Id: Ie8bf175aeefa3f9e4299b1ae7ae9108dad67e283
2024-07-02 19:05:05 -04:00
Jatin Chaudhary ecd812b2d8 SWDEV-460834 - add unsafe atomic add for fp16 and bf16
Change-Id: I6de5c2c425c9f8ac7f6c4e5c83c8b8b7ac8fe4cb
2024-07-02 16:45:17 -04:00
Sourabh Betigeri 9d628a4a3d SWDEV-470703 - Avoids a potential segfault caused by nullptr dereferencing
Change-Id: If80b00b41869076c18651995c46f89095e7266f9
2024-07-02 12:22:29 -04:00
Ranjith Ramakrishnan 0670697ab4 Revert "SWDEV-469045 - Replace the rocm-llvm package dependency with rocm-llvm-static for static builds"
This reverts commit d240b03969.

Reason for revert: <rocm-llvm package name change not required for static builds>

Change-Id: Ib2214a74162e5b015b096dc286151ecbd3ca0a80
2024-07-02 04:12:38 -04:00
Jaydeep Patel 7d7db316b3 SWDEV-465088 - Bypass memcpy kind check for H2H memcpy if XNACK is enabled.
Change-Id: I3e9b23dfb1aedeaf5ea0f26668caddb277ead809
2024-07-01 01:03:42 -04:00
taosang2 749385155a SWDEV-467540 - Get lastCommand safely
We must be in protected way to get last command when calling
awaitCompletion() where lastCommand will be released and
possibly destroyed.
This can solve scope lock(notify_lock_) crash in
Event::notifyCmdQueue() with AMD_DIRECT_DISPATCH = true.

Change-Id: I4297166f912a71112f4a8945d993160ba9afdc34
2024-06-28 21:18:22 -04:00
Ranjith Ramakrishnan 4255b606a5 SWDEV-470697 - Remove incorrect dependency from hip-static-devel pacakge
Remove hip-runtime-amd dependency from hip-static-devel package.

Change-Id: Id1756026cfe80dc8286c255f0d90314d3f2fd0ed
2024-06-28 14:35:26 -04:00
Anusha GodavarthySurya 9ad7e79e50 SWDEV-469331 - Fix issue of graph sync.
If graph has multiple branches, End command is enqueued on launch stream which
makes sure all the internal parallel streams are finsihed.

When node is removed from the graph, indegree and outdegree are not getting update correctly for parent, child nodes and
resulting in endNode not having deps on parallel commands. Resulting in graph sync issues.

Change-Id: I33cc2f21220e1c017d88099b29b542e05b683f73
2024-06-28 02:11:44 -04:00
Ioannis Assiouras 1c6b92627d SWDEV-468381 - Fixed use of vaddr_sub_obj in GraphMemFreeNode
Resolved an issue where a freed virtual buffer was incorrectly
added to the global mapping causing an assertion error during
teardown process.

Change-Id: I4801157a28603ce9be1ca0131982b700ff884f7a
2024-06-27 16:20:47 -04:00
Julia Jiang c0bc99e679 SWDEV-469310 - Add more information in clr for static library support
Change-Id: I9a784a6b3935a771670b91cbc4f92f1e168a8165
2024-06-26 15:26:14 -04:00
Ranjith Ramakrishnan d240b03969 SWDEV-469045 - Replace the rocm-llvm package dependency with rocm-llvm-static for static builds
Change-Id: I6787fa374608edb4349baab19b833980e3cb5b29
2024-06-26 12:58:05 -04:00
Alex Xie 12c18ed610 SWDEV-469252 - Remove Macro definition to use other method
Change-Id: I6d6b242030938c48859fd6b0157a418a6af5a0b0
2024-06-25 19:06:16 -04:00
Saleel Kudchadker 17313ec99d SWDEV-465602 - Refactor kernel arg pool allocation for graphs
- Allocate additional argument space to accomodate for kernel node
param updates

Change-Id: I2d4ea8bddd716f1191f3cbea807920d0248f8c4e
2024-06-25 18:28:03 -04:00
Rahul Manocha f309d49b32 [SWDEV-468553] - Add stream validation checks for memcpy APIs
Change-Id: Ic4495d10c8b2d2ac90f7093a08209d9cb373d2a6
2024-06-24 12:47:31 -04:00
Jimbo Xie e6a25aef08 SWDEV-464015 - add gfx1150 to perf counter support to follow gfx11 behaviour
Change-Id: I4297166f902a71112f4a8945d903060ba9afdc32
2024-06-21 16:02:25 -04:00
Ioannis Assiouras 6b9e89fe0c SWDEV-469138 - Added fix for find_package(LLVM)
Changed find_package call to prioritize the package that is
found under the rocm installation over other system locations

Change-Id: Ice93c94bbb9cdebd467d3e88bb2e4bfb7a1e76d9
2024-06-20 11:03:08 -04:00
Ioannis Assiouras eab2038560 SWDEV-453750 - Improve dependency library detection in hip-config.cmake
Change-Id: I52a685e621f7334de2a16fd9659632967047f4a6
2024-06-20 11:00:02 -04:00
Ioannis Assiouras 7b0259c4b7 SWDEV-465236 - Changed RTCProgram::findIsa to not dlopen amdhip64 for static build
Change-Id: I322ef4ca96ea426a0953f1234e60db6cebb09886
2024-06-20 10:55:57 -04:00
Ioannis Assiouras 2aed4cf401 SWDEV-468133 - Fixed hipDeviceGetLimit for hipLimitMallocHeapSize
Change-Id: I91bede414ebe46831509cbd24ffb53cf129d6a40
2024-06-20 10:55:15 -04:00
Jatin Chaudhary 36d58c6518 SWDEV-450109 - add missing coop group operations
any, all, ballot, match_any, match_all for coalesced_group and
tiled_group. add binary_partition.

Change-Id: I8ed0e654f36d788653352a0617beb5b8d44749bc
2024-06-20 10:42:06 -04:00
taosang2 1566ff7639 SWDEV-465162 - Fix some issue with image support
Fix some small issues regarding image and mipmap support

Change-Id: I8e64223d44f37c2dbb115cbb343441a48021ba7b
2024-06-18 16:38:24 -04:00
taosang2 544c45364f SWDEV-467540 - Fix reference of freed locks
1.Move global amd::monitor listenerLock before global
class runtime_tear_down as it will be referenced in
~RuntimeTearDown() after main(). It should be freed
later than runtime_tear_down.

2.Update  Device::~Device() to SVM free coopHostcallBuffer_
before context_ is released and freed.

Change-Id: I1d21378ff463477d3238d71e5e2a1a7d6b9147ad
2024-06-18 13:58:36 -04:00
kjayapra-amd c775721b26 SWDEV-446045 - Adding static library compilation info for HIP runtime.
Change-Id: I24ad80d70f5f35cad19695861134a7ad98638754
2024-06-18 11:42:02 -04:00
Ioannis Assiouras aee0b1db39 SWDEV-468151 - Fixed segfault during destruction of arena_mem_obj
Change-Id: I1ebfa965bd243890dcb54d9b55992ae68c497bf0
2024-06-17 15:27:08 +01:00
Anusha GodavarthySurya 57156c524d SWDEV-467102 - Hidden heap init for graph capture
If the graph has kernels that does device side allocation,  during packet capture, heap is
allocated because heap pointer has to be added to the AQL packet, and initialized during
graph launch.

Handle race with wait when 2 kernels with device heap are enqueued on multiple streams.

Change-Id: I45933b77fcaf7bc8fdf1bc906462e32b5d8d3688
2024-06-17 02:07:25 -04:00
Ranjith Ramakrishnan 7dc71710dd SWDEV-383837 - Update the package dependencies
The hip libraries depends on multiple standard shared libraries.
Corresponding packages are added to the dependency list.
Removed hipcc from hip-runtime package dependency list
Rearranged the package dependencies as well

The base (docker) images usually comes with the standard packages installed.
So even without the standard packages in dependency list, the installation will go through.
But its good to have all the required packages in the dependency list.

Change-Id: Iacab7993dffaa00efd1344d3eafb55f6317d1509
2024-06-14 20:34:22 -04:00
Jacob Lambert 3c5b304992 SWDEV-459586 - Clarify warning for amdgpu-arch failure
We more clearly define what happens in the case of amdgpu-arch
failure, and instruct developers on how to workaround the failure

Change-Id: Ifff569a7d688b6545ca457116e534a1830fa03c0
2024-06-14 15:13:37 -04:00
kjayapra-amd d1b833e509 SWDEV-467706 - Do not set HostMemoryDirectAccess flag for vaddr mem creation.
Change-Id: Iac30e906eea8a05a192a981f9069a5bbade10728
2024-06-14 06:55:11 -04:00
Branislav Brzak f014124527 SWDEV-465203 - Treat 0 elf length images as invalid
This addresses:
SWDEV-465203
SWDEV-465202

Change-Id: I49fcdd537fd07585e25c5fdef37cd10815466f79
2024-06-14 04:56:43 -04:00
Marko Arandjelovic d12af175af SWDEV-441296 - Fixes related to hipTexObjectCreate unit test
- Avoid potential division by zero
 - Nullptr check

Change-Id: Ic857eb4fe968173c852eb7a67934e33fc74c055f
2024-06-14 03:58:34 -04:00
Jaydeep Patel c03ccdb9b9 SWDEV-461702 - Disable interprocess for >3GBs local memory due to PAL failure.
Change-Id: I211d4de2e04a45148b92d256378516d2f79e210a
2024-06-14 00:12:21 -04:00
Ioannis Assiouras d44f44a5b1 SWDEV-467069 - Added safety check in activity prof for accumulate command
Adding a safety check prevents an invalid memory access
if timestamps and kernelNames vectors are of different size.

The patch also moves the addKernelNames for the accumulate command
into dispatchAqlPacket function.

Change-Id: Iea0927e1253800403a1ae3f3d72de1e7d96476c3
2024-06-12 21:53:03 +01:00
Ioannis Assiouras 3edf1501cc SWDEV-463865 - namespace changes to prevent symbol conflicts in static builds
Change-Id: I09ceb5962b7aa19156909f47167c87d6887c9cd1
2024-06-12 16:22:27 -04:00
Ranjith Ramakrishnan b7d203edf6 Move cmake config files to hip-dev/devel package
cmake config files were part of hip runtime package rather than dev/devel package
Corrected the same

Change-Id: I5e52658f28c551c830294d3b1525907f1b7cbc50
2024-06-12 12:52:11 -04:00
German Andryeyev ae2992ea43 SWDEV-459610 - Skip destruction for the child process
Fork() duplicates all system memory resources, but runtime can't duplicate
GPU resources. Thus, avoid tearDown() calls for the child process(s).

Change-Id: Id6b12bacd5112b9ad3747c218e09cba98ea1b42c
2024-06-12 11:12:39 -04:00
Anusha GodavarthySurya 3a5cbb91b9 SWDEV-461072 - Add reference to function parameter
Change-Id: I9ad5dafc6d697d12fbd1675f19f88f83ad2d7b9c
2024-06-12 01:20:28 -04:00
Jaydeep Patel 5c77e30b18 SWDEV-457316 - Other graph can free mem alloc node and return invalid val only if there is double mem free node in all captured graphs.
Change-Id: Icf12164bf0ecd171a4673ff4f384528e7671f944
2024-06-12 00:44:50 -04:00
Jacob Lambert 4e77806ee5 SWDEV-1 - [NFC] Fix typo in Log output
Change-Id: Ibcd779fa5ed1d8eda0241c7cd2531af4b60cf33f
2024-06-11 15:08:52 -04:00
Ioannis Assiouras 055e05a12a SWDEV-466601 - Fix invalid mem acccess in kernarg readback path
Change-Id: I4654ae592adc8cf9c687136d45eb1b28d99c7ae1
2024-06-10 15:13:05 +01:00
Satyanvesh Dittakavi 1815fc808d SWDEV-464927 - Update the Get by PCI BusId logic and Hop count
- Update the intra socket weight for partitions within single socket as
it is changed to 13 by the driver.
- Use the PCIe function to distinguish the partitions of the same device
such as TPX mode in gfx942.

Change-Id: I8e64023d44e37c2dbb105cbb343441a48021ba7b
2024-06-10 04:46:50 -04:00
Ioannis Assiouras 8f42ad6aa3 SWDEV-464648 - code and comment cleanups
Change-Id: I5ba3f1bff500b3cd5903c2f441017735e688f83f
2024-06-07 22:38:09 +01:00
Ioannis Assiouras 775dc204aa SWDEV-463865 - changed device,roc and pal namespaces to be nested under amd
Change-Id: Icad342843c039c634e249a13a7aa31400730b1dd
2024-06-07 12:23:06 -04:00
kjayapra-amd 1590b39f9e SWDEV-464455 - Init Segment flags and check for valid segment before passing to hsa APIs for allocation.
Change-Id: Ibe640093acdb7856115b6a4109bcf010adf20353
2024-06-07 10:40:57 -04:00
kjayapra-amd 892071aeb2 SWDEV-460948 - Changes to alloc, set, capture under single function.
Change-Id: I7b2d40e99e812b97c53535c5e63c41ad64a8f543
2024-06-06 16:57:53 -04:00
Ioannis Assiouras b8c2ac4de4 SWDEV-463865 - symbol renamings to prevent conflicts in static build
Change-Id: Id7fbb638c1088c23df52fee877cd790d637b1ffb
2024-06-06 04:05:55 -04:00
Saleel Kudchadker ecff928284 SWDEV-463428 - Acquire correlation ID after clear
Change-Id: I472085178d5751f5e2c8a6dfe190b6b3249317f0
2024-06-06 03:49:01 -04:00
Jaydeep Patel 774a10201f SWDEV-465461 - Use command's queue instead as it might be changed while constructing memcpy command on MGPU.
Change-Id: Ia6ac40289e1eea320925203cbd52b30f3b64ad2b
2024-06-05 06:47:49 +00:00
Gu, Wangfeng 0c6a952a90 SWDEV-460019 - [OGLP][Nv2x] DaVinci Resolve Studio: Crash observed when editing in color tab
When CL-GL interop is used, a GL context are used by two or more threads at the same time, which causes race condition.

Solution:
Add lock when accessing GL functions during CL-GL interop.

Change-Id: I3a34da3cbdf74c401111cc4e3a04ad84cc52709e
2024-06-04 16:35:44 -04:00
Fabian Ritter 819e537dc5 Add __device__ specifier to HIP's warpSize constexpr variable
The warpSize variable is set to the value of the __AMDGCN_WAVEFRONT_SIZE macro,
which is a meaningless default in host code.
The resolution for SWDEV-449015 will introduce diagnostics for uses of this
macro in host code, which includes the current definition of the warpSize
variable. With the __device__ specifier, the definition of the warpSize
variable will not cause these diagnostics.

This change does not stop the variable from being used in host code since clang
intentionally does not diagnose uses of __device__ constexpr variables in host
code.

Change-Id: I0317217affe94fdf2dfd9ad0f134e68f5173245f
2024-06-04 09:32:52 -04:00
kjayapra-amd fa4c1a0206 SWDEV-458026 - Check for hsa_handle/svm_ptr before removing from MemObjMap.
Change-Id: I967735c01c6321eeb768963ecb88667dbbe92f08
2024-06-01 17:50:54 -04:00