Commit Graph

6810 Commits

Author SHA1 Message Date
Branislav Brzak f2dba978f5 SWDEV-490860 - Include signal_is_required in dot file dumps
Change-Id: Iec4b433b11fbecb71a4ce68beb7d6f681d25b8e6
2024-12-05 04:51:59 -05:00
Shane Xiao 231b2410a0 SWDEV-492049 - Remove the handle of Phy Mem from Memobj
The hipGraph will use VMM by default when allocating memory.
However, the handle of Phy mem has been added to Memobj by default.
Since the Memobj will track the whole address range from handle to
handle + size, this needs the system to reserve the whole address
range. If the system range have not reserved by the system, then it
will have the potential issue that clr finds the Memobj incorrectly.

This patch removes the handle from the Memobj to fix this potential
issue.

Change-Id: I2da38e6b2d11d0d48e1afe66c46899500c290624
2024-12-04 19:39:52 -05:00
German Andryeyev efd3ea4b30 SWDEV-501403 - Switch to std::shared_mutex for streamSetLock
Shared mutex allows to have access to the list of streams  from
multiple threads at the same time.

Change-Id: Ibee64b846cde03321d5b17dbee2829c0bab7e7d6
2024-12-04 12:06:51 -05:00
Anusha GodavarthySurya b89977d518 SWDEV-469422 - Always schedule graph nodes
Change-Id: Icc636527fa19e7bf3eb111bc4b1bb9a5f9acff73
2024-12-03 23:44:23 -05:00
Saleel Kudchadker 6611cc015d SWDEV-494149 - Improve hipGet/Set Device
Change-Id: If8975687a3ba9caadafc48a0066f19a4ebaab9e2
2024-12-03 13:36:38 -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
Marko Arandjelovic 08aee16573 SWDEV-499794 - Update AQL packet after updating GraphNode
Change-Id: I332d70bdf42a276894a548a02d636e370c2ca08c
2024-12-02 12:29:35 -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
Anusha GodavarthySurya c47f9dda58 SWDEV-469422 - Cleanup graph code remove parallellists and nodewaitlists
Change-Id: I00c7b2894333bd13d47b913d3fcdd6e1ffcb741f
2024-11-30 04:40:51 -05:00
taosang2 f1f4f40c5b SWDEV-447973 - Support generic targets
Change-Id: I32db83843e45e0f013591493aafd7a532c881e16
2024-11-29 10:12:10 -05:00
Vladana Stojiljkovic b75b0d9a53 SWDEV-494612- Add capture support for hipLaunchCooperativeKernel
Change-Id: I6b3c6af55c60cffd43ce6f47b75998f750b75703
2024-11-29 08:17:41 -05:00
Anusha GodavarthySurya fb7ad8361c SWDEV-489084 - Update max streams for graph
Change-Id: I6d0992b2e80ebf3184911593a4f3574327b2e9c3
2024-11-29 08:16:16 -05:00
Anusha GodavarthySurya 06e6561eb5 SWDEV-489084 - Avoid using queue colliding with the graph launch stream
Change-Id: I3ecaf8836c8e0883441275139041c702aba0937e
2024-11-29 08:15:58 -05:00
Sebastian Luzynski 019abdc3bd SWDEV-465085 - replace asserts inside API calls
This change replaces some asserts, that were only available in debug
mode, with standard error handling.

Signed-off-by: Sebastian Luzynski <Sebastian.Luzynski@amd.com>
Change-Id: I112f9e56f921abd72daf0d11e4ecdcb7b1a9f9e6
2024-11-29 04:11:39 -05:00
Marko Arandjelovic e94d9b1763 SWDEV-489617 - Make any host to any host memcpy synchronous
Change-Id: I2a29d1a433508f9b4b67b48c47bb4a4eebac0cb3
2024-11-29 03:48:28 -05:00
Satyanvesh Dittakavi e3b8754448 SWDEV-477584 - Match hipGetLastError behavior with CUDA using env var
Change-Id: I4c5acff180ae904028f7c5fdf4e109ffd1f0c4ef
2024-11-28 01:33:52 -05:00
Anusha GodavarthySurya 17e7b7c2ef SWDEV-472840 SWDEV-461980 - Fix null stream sync performance
=> If null stream is not created during sync skip nullstrm creation
=> Do cpu wait on blocking & null stream if it exists

Change-Id: I90d6ced6a2dd1782ba58f3fed4e3608fc0efa55a
2024-11-27 10:29:15 -05:00
Aidan Belton-Schure 9652d69575 SWDEV-436099 Use new amdgcn_ballot builtin
Change-Id: I024fabc6c5b3f39c66885eb7615953f4d0432e9a
2024-11-27 04:34:50 -05:00
Satyanvesh Dittakavi 70b20857e9 SWDEV-494808 - Do not allow hipMallocAsync/hipFreeAsync when another stream is capturing
hipMallocAsync/hipFreeAsync APIs should return error stating
operation is not supported, if a stream is actively capturing
and is different from the passed stream

Change-Id: I2a1b8260c5eb22d99a936ac529d6788a83f81a17
2024-11-26 12:12:56 -05:00
Rahul Manocha 1ac9286b5a SWDEV-497288 - Fix Segfault when kernel param is nullptr
1) for case where kernelParam_.func = nullptr, the validation
fails in setParam call and memory is not alloced for kernelParams
2) destructor path segfaults trying to free the kernelParams memory.
3) copy of params is done after function validation is successful.

Change-Id: I6338e0c89f259632e4115f0508e2f240bc207fd9
2024-11-26 11:34:41 -05:00
Rahul Manocha e0c11624e5 SWDEV-497288 - Enable hipGraphExecSetParams for Ext SemWait and SemSignal Nodes
Change-Id: I7184a3a04ac17d3d841222ae1559db66d73a429c
2024-11-26 11:34:18 -05:00
kjayapra-amd 39b64b57d9 SWDEV-496106 - Use lock_ops to avoid race condition in safe_stream.
Change-Id: I5e98c34a41434e2f7d2e6406ea30ddcf01b1091c
2024-11-26 06:56:56 -05:00
Anusha GodavarthySurya 25a893658a SWDEV-491643 - DEBUG_HIP_FORCE_GRAPH_QUEUES is 1 enable capture path
Change-Id: Ibddd50592232b090bf5eab8395fe78a36bb3a14a
2024-11-25 05:21:10 -05:00
Maneesh Gupta ec6f83b544 Revert "SWDEV-475482 - hipTexObjectCreate align with cuda"
This reverts commit efce2f77c4.

Reason for revert: Even though this change is valid, this would break backward compatibility.

Change-Id: I9c7cab83198c8d5c8485b11194099162e3e7a874
2024-11-21 00:55:32 -05:00
Rahul Manocha efce2f77c4 SWDEV-475482 - hipTexObjectCreate align with cuda
Support zero width and height for hipTextObjectCreate to align
with cuda.

Change-Id: I5d4c48625faf5f060ed2a7e634ec65e4ecac9da5
2024-11-19 23:28:55 -05:00
Rahul Manocha a2d8199402 SWDEV-494409 - Fix destructor path for Static and Dynamic CO
1) For Dynamic CO variables, free the device pointer in
   DynCO destructor instead of DeviceVar destructor.
2) For Static CO Remove Fatbinary,
   only call hipFree for valid device Vars instead of all devices.

Change-Id: I84291f5371b2c05d1d0bcdb4f9c6bd122e7c9b21
2024-11-19 13:04:44 -05:00
Jaydeep Patel d997f78be4 SWDEV-498077 - Check topoOrder_ before accessing it.
Change-Id: I10e3c24ca8dc1009b8ac8ac27b3e9a6296f9a7ee
2024-11-19 04:50:47 -05:00
Ioannis Assiouras 1a710dabcf SWDEV-496003 - Add support for dynamic functions in hipFuncSetAttribute
Modified hipFuncSetAttribute to handle pointers to dynamic functions
returned by hipModuleGetFunction.

Change-Id: I54b98f9d31a79630dd7edcd363fad81f1d89219b
2024-11-19 04:50:15 -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
Jaydeep Patel 24c57cb984 SWDEV-496544 - Reset mem alloc node count for AutoFreeOnLaunch.
Change-Id: Ib32b04584548a46632606ecd85b58c6ce4a5894d
2024-11-11 11:03:32 +00:00
Saleel Kudchadker 582dc7dd6d SWDEV-446123 - Revert "Match hipGetLastError behavior with CUDA using env var"
This reverts commit 5f477900a3.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I11a456655393bcf4b82d749ce7259bc1b78d1424
2024-11-08 20:35:13 -05:00
Satyanvesh Dittakavi 5f477900a3 SWDEV-446123 - Match hipGetLastError behavior with CUDA using env var
Change-Id: Iaec697c1304d746376ecf2bfe2ad683b15ee189f
2024-11-07 12:02:34 -05:00
Branislav Brzak 6e55f40313 Revert "SWDEV-465201 - Match negative hipModuleLoad return with Cuda"
This reverts commit 68e5aeb93d.

Reason for revert: Breaking change that will be merged in at a later date

Change-Id: Idd300492cc08a57c50decc22df287ddcc5463c88
2024-11-07 09:51:50 -05:00
Vladana Stojiljkovic 62e1d50c2a Revert "SWDEV-491452 - Allow hipMemAdvise capturing only inrelaxed mode"
This reverts commit 02bbe11e56.

Reason for revert: It is considered a breaking change.

Change-Id: Ia1f7b27a6d3caa4a9fe12bee469f5f0a6b8327fd
2024-11-07 09:50:21 -05:00
Vladana Stojiljkovic ed458615c4 Revert "SWDEV-492768 - Match hipStreamAddCallback capture behavior with nvidia"
This reverts commit f6c8bbf4dc.

Reason for revert: It is considered a breaking change.

Change-Id: I9b2dfc60f62eec7268c0374b0b33e45eca7b3bbb
2024-11-07 09:49:55 -05:00
Vladana Stojiljkovic 48df130d87 Revert "SWDEV-490474 - Allow hipMallocManaged capturing only in relaxed mode"
This reverts commit 6deecf1bfe.

Reason for revert: It is considered a breaking change.

Change-Id: I6bfd81dcc16d36304efa2f151969427249a4122f
2024-11-07 04:33:07 -05:00
Ajay aa4f27c29b SWDEV-495842 - use find_program clang, llvm-mc instead of hip_package
Helps in needing minimum files to build hip runtime on windows

Change-Id: I1d27b72d3b0551b9261524606f08361d00463394
2024-11-04 23:09:11 -05:00
Branislav Brzak 68e5aeb93d SWDEV-465201 - Match negative hipModuleLoad return with Cuda
Change-Id: Id6c682e7f9ec8d34e9c8d5d5933f31e003c67e27
2024-11-04 03:58:06 -05:00
Jaydeep Patel c24bc05cac SWDEV-491409 - Handle DynCO path to delete DeviceVars.
Change-Id: I757185e9c7c12f236e266219b67daf5836d2a122
2024-11-04 01:52:26 -05:00
Rahul Manocha 314d4a2c22 SWDEV-490864 - Optimize Alloc Node detection in graph
Change-Id: I6ac32f9abd0b44864071a0a9396463cb13f6941f
2024-11-01 11:45:49 -04:00
Satyanvesh Dittakavi ba2ebb3b99 SWDEV-489570 - Update AQL packet in hipDrvGraphExecMemsetNodeSetParams
After setting the new params in hipDrvGraphExecMemsetNodeSetParams, we
need to update the AQL packet as well, otherwise during the graph launch
it still dispatches the packet which has the original params and not the
updated one.

Change-Id: Ie49a641ba3f66c8085a29f92d88ac6ea6a1c0534
2024-11-01 07:01:10 -04:00
Vladana Stojiljkovic f6c8bbf4dc SWDEV-492768 - Match hipStreamAddCallback capture behavior with nvidia
Change-Id: I7a084d8eeffe8b5095f7eb9969a565a40e76bb4b
2024-10-31 12:42:17 -04:00
Vladana Stojiljkovic 02bbe11e56 SWDEV-491452 - Allow hipMemAdvise capturing only inrelaxed mode
Change-Id: I1ca5e050ff869b486e3a0a41d7f06390a88e1110
2024-10-31 12:41:47 -04:00
Vladana Stojiljkovic e08df57502 SWDEV-493526 - Create kernel node when hipLaunchByPtr is captured
Change-Id: Id3493485dfdb468436ab33e6d7cb19b6b0066fd4
2024-10-31 12:41:31 -04:00
Vladana Stojiljkovic ec60bb1aed SWDEV-489571 - Fix ihipGraphAddMemsetNode to allow memset of 3d portions of an array
* When hipMemset3dAsync is captured, a 3d extent can set be as a parameter (depth > 1). That worked on nvidia, but on amd wrong portion of array was filled because when creating Memset3D command, extent dimensions were used to create pitchedPtr, instead of original array width and height.
* Also, when capturing hipMemset3dAsync, nvidia allows any of the extent dimension to be 0, and in that case, no work should be done.

Change-Id: I46a605bf9ae801cd3348e98d528c21263a8eefce
2024-10-31 10:29:54 -04:00
German Andryeyev 403f624bf8 SWDEV-486602 - Add tracking of HSA handlers
Add an atomic counter to track the outstanding HSA handlers.
Wait on CPU for the callbacks if the number exceeds the value
in DEBUG_HIP_BLOCK_SYNC env variable.

Change-Id: I95dc8c4bf0258c7e59411b7504220709ed6898c5
2024-10-25 15:20:50 -04: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
Sourabh Betigeri 64e1b15551 SWDEV-450052 - Return if numDevices is more than device count on the platform
Change-Id: I538106d1b02084df9cd06b41427629207312e76f
2024-10-24 17:07:11 -04:00
Anusha GodavarthySurya f9f995c6d0 SWDEV-480209 - Handle GraphExec object release
=> GraphExec instance is destroyed before async launch completes,
destroy after all pending graph launches
=> Remove GraphExec destroy during next sync point(hipStreamSync,
hipDeviceSync etc..)

Change-Id: I4df682aae5787fd6e5240a7be936ce50361345d0
2024-10-22 12:30:46 -04:00