Commit Graph

199 Commits

Author SHA1 Message Date
Anusha GodavarthySurya c2a4062392 SWDEV-470612 - Add stream id to DOT print when DEBUG_HIP_GRAPH_DOT_PRINT is enabled
Change-Id: Iec3630ba6fb2206925653ea939770bb9820d7c52


[ROCm/clr commit: 19bf971134]
2024-08-21 00:37:41 -04:00
German Andryeyev 35c7a87014 SWDEV-470612 - Add the optimized multistream path
- Added the optimized multi stream path in graph execution. It uses a fixed number of async streams in the execution
- Optimize the launch latency, where commands
creation and execution is done at the same time
- Optimize the scheduling to use less barriers and waiting signals if
the same queue  can be detected
- The new path is controlled by  DEBUG_HIP_FORCE_GRAPH_QUEUES
environment variable, where 0 will use the original path and any other
value will force the number of asynchronous queues for execution
- DEBUG_HIP_FORCE_ASYNC_QUEUE can force single queue async
execution in graphs(applicable for Navi families only)

Change-Id: I7eb40bc15c45f508d6911868a6f6d4c3598d380e


[ROCm/clr commit: 9db52f9a46]
2024-08-02 14:19:44 -04:00
Anusha GodavarthySurya 31927fefd6 SWDEV-468424 - Add support to capture multiple AQL Packets
=> Added support to capture multiple AQL Packets.
=> Added Interface to callback to hip runtime from rocclr to allocate
kernel args from the graph kernel arg pool.
=> Enabled Support to capture memset node.

Change-Id: I7e1c2ba06927459e024653058af142bd82192c43


[ROCm/clr commit: bd3a35bde1]
2024-08-01 23:55:51 -04:00
Vladana Stojiljkovic 91800f18ea SWDEV-465142 - Copy memAllocNodePtrs_ when cloning graph
Change-Id: I5a0907e59397e71b44db59c44b551b74a6e59ba0


[ROCm/clr commit: d62c1dea72]
2024-08-01 11:05:06 +02:00
Anusha GodavarthySurya b6d82323e9 SWDEV-468424 - Refactor kernel arg
For refactoring of childGraph to have its own graphExec,
kernelArgs needs to be separated from the graphExec object.
All the childNodes part of graph should share same kernelArg pool.
Otherwise we endup creating multiple device kernel arg memory chucks
for single graphExec.

Change-Id: I4029a46ebc1fa112d87df64ab1fecbf288fabe5e


[ROCm/clr commit: 35079e834e]
2024-07-16 08:38:44 -04:00
sdashmiz ba07492b20 SWDEV-421021 - Add APIs cuMemcpyNodeGet/Set params
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I24bc0da56aad34c9d5876a3d83b59515f11dc3ea


[ROCm/clr commit: 57e79802cd]
2024-07-10 12:53:01 -04:00
Jaydeep Patel 130b72302a SWDEV-457316 - Return invalid val from add mem free node if corresponding mem alloc node is missing.
Change-Id: Ib0c346a439fc38ebfd106bcbdf75bd10bfd2f090


[ROCm/clr commit: cf0320a0b9]
2024-07-04 13:09:46 -04:00
Anusha GodavarthySurya af6dd5d865 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


[ROCm/clr commit: 9ad7e79e50]
2024-06-28 02:11:44 -04:00
Jaydeep Patel 2897632ad9 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


[ROCm/clr commit: 5c77e30b18]
2024-06-12 00:44:50 -04:00
Jaydeep Patel 24a3ca5f94 SWDEV-457316 - Some validations related to Graph Node.
Free node should be added in same graph and once.
Graph clone containing mem alloc/mem free node not supported.
Destroy mem alloc/mem free node is not supported if already added in graph.

Change-Id: I40459e66d7dd84f3b5298617990313b41458c804


[ROCm/clr commit: ca3c2ac185]
2024-05-28 06:31:10 +00:00
Anusha GodavarthySurya 3b85ba70df SWDEV-461072 - Extend AQL Optimization for child graph nodes
Change-Id: I6baf906add7240b29ea653020a9a0b56206ee2a7


[ROCm/clr commit: 243dad92c9]
2024-05-28 06:31:10 +00:00
sdashmiz 2889266aeb SWDEV-429053 - Add check for StreamLegacy
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I402185a3b81935aaa1c8c4963407b8de21c72d8a


[ROCm/clr commit: 627ccfa502]
2024-05-28 06:31:10 +00:00
Vladana Stojiljkovic bf817aeaa3 SWDEV-454681 - Add nullptr check for memsetParams in hipDrvGraphAddMemsetNode
Change-Id: Ife8784b23179c5613c29cde27dd2975cb729aaae


[ROCm/clr commit: d543ab6a0b]
2024-05-28 06:31:10 +00:00
shadi 19ce99d104 SWDEV-421027 - Add more Graph APIs
Signed-off-by: shadi <shadi.dashmiz@amd.com>
Change-Id: I0a1fc284e48317a49ca88d4ed4e3a10e752efd58


[ROCm/clr commit: e705e5e0d9]
2024-05-28 06:28:17 +00:00
Anusha GodavarthySurya 085703c225 SWDEV-460770 - Handle Graph Exec release
Handle GraphExec instance is destroyed before async launch completes
GraphExec instance is destroyed after async launch completes
GraphExec instance is destroyed without a launch

Change-Id: I45a7c82295fea916c7559bd8f796df710513aea1


[ROCm/clr commit: bf4d10ff61]
2024-05-28 06:28:17 +00:00
Anusha GodavarthySurya ece7fa9f76 SWDEV-454247 - Fix graph multi threading issue
Change-Id: I565889da6f7091030b7f6a2d6234b82c389358e3


[ROCm/clr commit: de95625f09]
2024-05-28 06:28:17 +00:00
shadi 15b8dc404c SWDEV-420016 - Add more driver side graph APIs
Signed-off-by: shadi <shadi.dashmiz@amd.com>
Change-Id: Iff3ee7dcbcd24836f227fdc9bd5ff4b554ac914f


[ROCm/clr commit: f2b01782ac]
2024-04-25 12:50:43 -04:00
Rahul Manocha 85a372e4eb [SWDEV-454661][SWDEV-454653] - GraphExecMemcpyNodeSetParam to return error on memcpy direction change
Change-Id: I2c8f5ea394caeaaa6895003e63cd62a052c491f8


[ROCm/clr commit: 880963346d]
2024-04-23 12:56:30 -04:00
Jaydeep Patel 3dae883e73 SWDEV-453535 - Capture hipMemset3DAsync.
Change-Id: I517c2557573db258b3e3e353f02f6a56652b0fde


[ROCm/clr commit: 12e0bdcd32]
2024-04-18 00:05:45 -04:00
Anusha GodavarthySurya ff29b47bb8 SWDEV-452787 - correct hipDrvGraphAddMemcpyNode check
Change-Id: Id58f982edd4f17d675f7a0f61a9b4dea0baebd9b


[ROCm/clr commit: ea4f09e8c0]
2024-03-29 00:56:12 -04:00
Anusha GodavarthySurya ae296c8fad SWDEV-443567 - SWDEV-436126 - Fix Prohibited and Unhandled Operations during capture
=> hipDeviceSynchronize is not allowed during capture.
=> hipEventSynchronize during capture should return hipErrorCapturedEvent error
=> hipEventQuery during capture should return hipErrorCapturedEvent error
hipStreamSynchronize, hipEventSynchronize, hipStreamWaitEvent, hipStreamQuery
For Side Stream(Stream that is not currently under capture):
=> If current thread is capturing in relaxed mode, calls are allowed
=> If any stream in current/concurrent thread is capturing in global mode, calls are not allowed
=> If any stream in current thread is capturing in ThreadLocal mode, calls are not allowed
For Stream that is currently under capture
=> calls are not allowed
=> Any call that is not allowed during capture invalidates the capture sequence
=> It is invalid to call synchronous APIs during capture. Synchronous APIs,
such as hipMemcpy(), enqueue work to the legacy stream and synchronize it before returning.

Change-Id: I201c6e63e1a5d93fd416a3b520264c0fdbe31237


[ROCm/clr commit: 19b4660cbb]
2024-03-28 22:10:31 -04:00
Jaydeep Patel 1bbbff9dd9 SWDEV-452299 - Pass dst pitch while capturing hipMemcpyParam2DAsync & elementSize should be 1 as width is in bytes while capturing hipMemset2DAsync.
Change-Id: I8f9122a30cba0a07c097dfd7609432090caab142


[ROCm/clr commit: 0be92b8f09]
2024-03-21 12:49:34 -04:00
Anusha GodavarthySurya 41ec66ff67 SWDEV-448586 - Added implementation for new API hipStreamBeginCaptureToGraph
Change-Id: I1ce802102cef2b66c92d3375f769983841de793f


[ROCm/clr commit: 4feb1f9337]
2024-03-07 05:24:49 +00:00
Rahul Manocha 0a269e98a9 [SWDEV-448077][SWDEV-448067] - Changes to Kernel Node Attribute related APIs
Change-Id: Ibbf773fd5f134a62b7ce04f6956b10c1086b1782


[ROCm/clr commit: 2c0fa829b4]
2024-02-28 18:14:41 -05:00
Anusha GodavarthySurya 4499ded668 SWDEV-445981 - Handle hipGraphExecUpdate to update graph kernel node params with graph performance optimizations
Change-Id: I3b05c6bfc83404152bcae9b31cfdf56af7cc61a4


[ROCm/clr commit: 4b4ec7fc52]
2024-02-27 15:20:23 -05:00
Anusha GodavarthySurya 80887e8559 SWDEV-444767 - Fix graph tests for context change between Inst & launch with DEBUG_CLR_GRAPH_PACKET_CAPTURE
When graph is Instantiate on device 0 graph and launch on device1 switch to command creation and enqueue during launch.

Change-Id: Ied34dc99b2a776130d1354ed3830c6ccab9068e4


[ROCm/clr commit: 7d09e1abed]
2024-02-14 17:02:36 +00:00
Anusha GodavarthySurya fe3c0a3fdc SWDEV-445084 - Add DEBUG_CLR_GRAPH_PACKET_CAPTURE support for hipGraphInstantiateWithFlags/Params
Change-Id: I5096b4c8d73d1faf972dfd23ab86a53d888946c4


[ROCm/clr commit: d6bc40e822]
2024-02-08 04:55:53 -05:00
Rahul Manocha b564fbef5d SWDEV-421025 - Graph Instantiate with Params API Update
Change-Id: I3ed821ced02420858d360e8dab5e1e931c350c7e


[ROCm/clr commit: f964975db0]
2024-02-07 11:35:21 -05:00
Anusha GodavarthySurya daf22604af SWDEV-439637 - Updated to compile with clang compiler
Change-Id: Ib0a8e1cc007f083fb1d1f4363cf89ba76ad3c4f2


[ROCm/clr commit: a1b2cbe44e]
2024-02-06 23:57:13 -05:00
Rahul Manocha 7bccc07147 SWDEV-421025 - hipGraphInstantiateWithParams API changes
Change-Id: Ib07d4dd1698220b68ed27f91d58d3bd315a8804c


[ROCm/clr commit: 1a3901fa49]
2024-02-05 05:08:11 +00:00
Anusha GodavarthySurya 3dc533e1e1 SWDEV-439628 - hipGraphExecKernelNodeSetParams to update graph kernel node params with graph performance optimizations.
During hipGraphExecKernelNodeSetParams kernel function can also be updated.
Hence size required for kernel parameters differs from what is allocated during graphInstantiation.
So, create new 128KB kernel pool and allocate kernel args from the pool.
If the pool is full create new 128KB pool. Release kernel pools when graph exec object is destroyed.

Change-Id: I9567946d63400c79cbfd4c5439c654c92557ceae


[ROCm/clr commit: e9957151f3]
2024-02-05 05:08:11 +00:00
Anusha GodavarthySurya 49e684361f SWDEV-422207 - Added debug env to dump graph during Instantiation
Change-Id: Ibde2ae5b8d240f3986bcd168facc513a319c0f17


[ROCm/clr commit: 0a055f874b]
2024-02-05 05:08:11 +00:00
Rahul Manocha 3b42f3c995 SWDEV-421025 - Graph Kernel Node priority Attribute Set/Get
Change-Id: I5c422728aa694c8dabb5cf9bade441101512a249


[ROCm/clr commit: f40c380cdb]
2024-01-17 12:44:35 -05:00
sdashmiz 29eba6df09 SWDEV-421027 - Add hipGraphAddNode
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ic8cf293ff483ee2547b52d2975062bcb9a6f5d17


[ROCm/clr commit: d23835ffbe]
2024-01-12 11:36:30 -05:00
sdashmiz 57c0674538 SWDEV-403382 - Add missing graph APIs
- add external semaphor signal and wait node

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: If205d48bc4fb60ce2966ca6ed0419e7700755bdd


[ROCm/clr commit: 087767d9ac]
2024-01-09 14:19:50 -05:00
Anusha GodavarthySurya 3789c40cb5 SWDEV-422207 - Fix graph catch tests with graph optimizations(DEBUG_CLR_GRAPH_PACKET_CAPTURE enabled)
Change-Id: I16297e0ddde286bf1798c90f2bf846e69819010d


[ROCm/clr commit: 2bb2446d8f]
2023-12-14 01:27:08 -05:00
sdashmiz 5e1985996c SWDEV-421021 - Add hipDrvmemsetnode for graph
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I0240a162a16e61549d46b5d086c831404550e833


[ROCm/clr commit: b8e820f835]
2023-12-13 09:30:36 -05:00
Anusha GodavarthySurya 3bdedf0cc7 SWDEV-351966 - Dispatch table for hip runtime
Change-Id: Ie4a44fa8cf1ff9c152146070bbbf6b0636d4e325


[ROCm/clr commit: 5e21f0c6bd]
2023-11-22 01:11:19 -05:00
sdashmiz 9b297f0006 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


[ROCm/clr commit: 9b567e1799]
2023-10-31 09:55:42 -04:00
sdashmiz fcfa0d0733 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


[ROCm/clr commit: c089ef4a2b]
2023-10-12 12:09:19 -04:00
Anusha GodavarthySurya 0404df28ef SWDEV-422207 - Capture AQL Packets for graph Kernel nodes during graph Inst. And enqueue AQL packet during launch
Change-Id: I1e5f7f9e2a70bd500d190193cb6ba0867f5a63e7


[ROCm/clr commit: e63c280d4d]
2023-10-05 00:34:29 -04:00
Satyanvesh Dittakavi be8dbcf736 SWDEV-375607 - Fix hipGraphExecUpdate behavior
Addresses the below scenarios like parameters mismatch
in memcopy node, difference in the count of nodes, difference
in the dependencies of the nodes.

Change-Id: I31c6516fb27cc1007809f1b50306fdb0c2356ccc


[ROCm/clr commit: f16d336e32]
2023-09-21 11:17:49 -04:00
Ioannis Assiouras a0ee7e2784 SWDEV-419996 - Allow both kernelParams and extra arguments to be set to null
When kernel function expects no parameters no error should be returned
if both kernelParams and extra arguments are set to null.

Change-Id: I5941bcc400b6fb380e623bdae0233ae3e4f73815


[ROCm/clr commit: 315082e554]
2023-09-07 12:57:46 -04:00
Ioannis Assiouras 0066c6cb6b SWDEV-420222 - Removed implementation of hipMemcpyArray functions
hipMemcpyArrayToArray, hipMemcpyFromArrayAsync, and hipMemcpyToArrayAsync
are deprecated in cuda and are missing the headers in hip_runtime_api.h.
Removed their implementation from hip_memory.cpp.

Change-Id: I9720aec6241515c56c66b7e90a37b2ed53347eb2


[ROCm/clr commit: 2bc6661737]
2023-09-04 13:35:08 +01:00
Jaydeep Patel 6258f8254f SWDEV-375596 - Device context should not be changed while graph exec update for graph nodes other than empty and host node.
Change-Id: I89d734b111aae5b042386175d2786ce9002771b9


[ROCm/clr commit: d2655d84fd]
2023-08-27 22:58:32 -04:00
Saleel Kudchadker d7a63b9d66 SWDEV-301667 - Port optimization to save extra packet to graphs
Change-Id: Ibaf64a4efe070c42620e6e153c1862a4a0b15664


[ROCm/clr commit: e1e5d071ba]
2023-08-23 16:58:21 -04:00
Anusha GodavarthySurya b25939b4de SWDEV-415772, SWDEV-414682 - Fix childgraph node execution
Change-Id: If9ffc08d98a57b8daa5f131f72ef1bf2317f29e1


[ROCm/clr commit: f76a40c26d]
2023-08-18 00:45:00 -04:00
Anusha GodavarthySurya d8022cd081 SWDEV-407568 - Move graph implementation to hip namespace
Change-Id: I7023f202a7e3eb25b17db6d3e361205594ae81a5


[ROCm/clr commit: fd97dde1e6]
2023-07-26 06:52:45 +00:00
Jatin Chaudhary dfc4d60ec4 SWDEV-412457 - remove unused header, add correct header for cpp
Change-Id: I2192daec7c033e94097c26db6177e14558a8728d


[ROCm/clr commit: b67d055eb6]
2023-07-21 11:30:59 -04:00
sdashmiz 9a3d3aef8c SWDEV-360031 - Event record clean up
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ic7b5edd501c5f61b2bce87252ac040cbc4083006


[ROCm/clr commit: 1e9dfdfe99]
2023-05-29 11:42:16 -04:00