Граф коммитов

155 Коммитов

Автор SHA1 Сообщение Дата
Anusha GodavarthySurya 08c92f4793 SWDEV-480209 - Make internal callbacks non-blocking
Change-Id: Ic918d08f341abfd9a7c167d09f9c723cdc43157f


[ROCm/clr commit: 683a942364]
2025-01-10 02:16:11 -05:00
Rahul Manocha b1ef5972d6 SWDEV-504215 - fix rocalution perf drop by disabling cpu wait
Change-Id: I878f3420073b05cc6241f524ac428e47c0ce823d


[ROCm/clr commit: 05baf9ff22]
2025-01-07 17:02:24 -05:00
Jaydeep Patel 12ed697705 SWDEV-505205 - Fix hipStreamLegacy segfault with hipStreamWaitEvent.
Change-Id: I17fdaf7ac323507f99a7c071066944296537489c


[ROCm/clr commit: a05a02e527]
2024-12-20 04:18:21 -05:00
Anusha GodavarthySurya c34f55babb SWDEV-489084 - Avoid using queue colliding with the graph launch stream
Change-Id: I3ecaf8836c8e0883441275139041c702aba0937e


[ROCm/clr commit: 06e6561eb5]
2024-11-29 08:15:58 -05:00
Anusha GodavarthySurya bfc89974e0 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


[ROCm/clr commit: 17e7b7c2ef]
2024-11-27 10:29:15 -05:00
Vladana Stojiljkovic a72274c22e Revert "SWDEV-492768 - Match hipStreamAddCallback capture behavior with nvidia"
This reverts commit 30571de816.

Reason for revert: It is considered a breaking change.

Change-Id: I9b2dfc60f62eec7268c0374b0b33e45eca7b3bbb


[ROCm/clr commit: ed458615c4]
2024-11-07 09:49:55 -05:00
Vladana Stojiljkovic 30571de816 SWDEV-492768 - Match hipStreamAddCallback capture behavior with nvidia
Change-Id: I7a084d8eeffe8b5095f7eb9969a565a40e76bb4b


[ROCm/clr commit: f6c8bbf4dc]
2024-10-31 12:42:17 -04:00
German Andryeyev 3191f8e942 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


[ROCm/clr commit: 403f624bf8]
2024-10-25 15:20:50 -04:00
Anusha GodavarthySurya 1a472b9703 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


[ROCm/clr commit: f9f995c6d0]
2024-10-22 12:30:46 -04:00
German Andryeyev faea40cbb3 SWDEV-486602 - Optimize HSA callback performance
- Don't generate callbacks for HIP events
- Don't process profiling info in the callback for HIP events
- Wait for CPU status update of the submitted commands
every 50 calls. That will allow to drain the commands and
destroy HSA signals.

Change-Id: Ib601a350e7e7c2b6c6209a172385389baccf73a9


[ROCm/clr commit: 364dfb0ed1]
2024-10-11 14:50:25 -04:00
Jaydeep Patel 7983801b0c SWDEV-485866 - Return OOM if stream creation fails due to insufficient memory.
Change-Id: I4e57ecc81921bde274bb6a4e0890f0fc6a17955a


[ROCm/clr commit: 5ccc140e1b]
2024-10-10 00:44:54 -04:00
Satyanvesh Dittakavi 1ef9123b54 SWDEV-478776 - Fix segfault with streamsync using hipStreamLegacy
Change-Id: Ifb412d0bcfa33bc1130b47b757ee276ca9bc1c3a


[ROCm/clr commit: 8ee065c5bd]
2024-09-17 15:02:18 -04:00
Rahul Manocha 900f906827 SWDEV-462192 SWDEV-459056 Check if m_streams is empty
1) Since g_devices is not initialized when stream_per_thread constructor
is called on windows, m_streams is empty when hipDeviceReset is called.
2) clear_spt tries to access empty vector causing segfaults in
hipDeviceReset call.
3) on linux ROCCLR_INIT_PRIORITY makes sure that g_devices is initialized
first before tls constructor creates stream_per_thread object.

Change-Id: Ib2ba643d1278d820287ea3b242ed0878d7529165


[ROCm/clr commit: 450eca293b]
2024-09-01 17:17:20 -04:00
Sourabh Betigeri d1d6c448c9 SWDEV-462192 SWDEV-459056 - Fixes corruption
SPT is destroyed with hipDeviceReset(). If a
stream is created right after reset, the same
object id could be reused. Later SPT destructor
incorrectly verifies that the stream is valid
referring to the reused object id causing the
corruption.

Change-Id: I3b1f7ffdf8bab874dca7b8fde22318162997b8f6


[ROCm/clr commit: f6a68b3c2e]
2024-08-21 11:33:44 -04:00
Satyanvesh Dittakavi 6bd51db0b1 SWDEV-475185 - Handle device id for hipStreamLegacy
Change-Id: Ib56e6edb77a923f3f9738df64cb9d9ef0b4ba564


[ROCm/clr commit: aa6d07518f]
2024-08-12 09:59:17 -04:00
Jaydeep Patel 12eea11370 SWDEV-457316 - Release graph exec before stream gets deleted.
Releasing graph exec after wait completes and before delete hip::stream obj
during stream destroy.

Change-Id: I1d68aa8d844f7d3af330c6d09c44af07f8553551


[ROCm/clr commit: 8e80429b87]
2024-08-06 00:39:37 -04:00
taosang2 f33637b1c6 SWDEV-474091 – Fix sporadic crash in streamcallback test
Also in the scope of SWDEV-467540.
Fix sporadic crash in Unit_hipStreamAddCallback_MultipleThreads by
deferring release() of block_command.
The test will invoke 1000 threads on the same stream thus there
is a chance to free block_command too early in original code.
By deferring release() of block_command we can make sure block_command
is always valid during calling block_command->notifyCmdQueue().

Change-Id: I31555ee18e6958e34b89f04181867fa4e932a38c


[ROCm/clr commit: e3ef19e22a]
2024-07-23 10:24:10 -04: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
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
Rakesh Roy 9630492a1d SWDEV-450361 - Add nullptr validation for waitStream
- Application is passing null for parameter stream in API hipStreamWaitEvent
- When event stream isn't capturing and event is not recorded, causes segfault because we are accessing deviceId() from waitStream

Change-Id: I8b87ffd6f234677f68b66dcb7ef44b2ff04a7c91


[ROCm/clr commit: 880f1f0049]
2024-04-04 02:07:18 -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
Ioannis Assiouras 8b875d0248 SWDEV-430437,SWDEV-434702 - Split the streamset per device
Change-Id: If1bcca45825c9899462bb95ed6f637f5af806cc8


[ROCm/clr commit: be2bdabb76]
2024-03-18 19:08:52 -04:00
Anusha GodavarthySurya ec391d7249 SWDEV-436126 - hipStreamDestroy to remove stream from capture list
Change-Id: Ie735f27b9c5df4faf39bd4be10fbe4401fd88cdb


[ROCm/clr commit: 476dc4c87c]
2024-03-14 11:32:10 -04:00
German Andryeyev 4bb028a49d SWDEV-311271 - Add dependency tracking for streams
Mempool has capability to track dependency between streams for
faster memory reuse. Enable that capability.

Change-Id: I28266a7e38d0fc4c5d027b9542d3719653840821


[ROCm/clr commit: 17d0c166d2]
2024-03-05 12:53:09 -05:00
Saleel Kudchadker 34fd1b7fe5 SWDEV-301667 - Remove resetFenceDirty
Dont track the status of fence_dirty_ flag on the host, instead clear it
when we submit a barrier on the respective stream.

Change-Id: I4d98dbf20c81379c9c5da9f5b67629a8f9f6dfcd


[ROCm/clr commit: 0b0df605d4]
2024-01-15 15:43:14 -05:00
Jatin Chaudhary a65d07302f SWDEV-438181 - check stream associated with event
...before we dereference it. It might have been deleted.

Change-Id: Ief832ee0907658a40ca42b9d78d19658153a05dd


[ROCm/clr commit: 2cfb8bc3c1]
2024-01-12 10:39:20 -05:00
Saleel Kudchadker 9864d6e56c SWDEV-301667 - Missing marker for hipExtLaunch* optimization
- Use isFenceDirty() check in hipStreamQuery.
In case if there is a stopEvent for hipExtLaunch* API we avoid system
scope if there are consecutive hipExtLaunch* and replace them with agent
scope, but then if one uses hipStreamQuery it should detect we need a
barrier with system scope.

Change-Id: I539810f659d4e1c49104e3a0da6ff2803c6b3dee


[ROCm/clr commit: 4b3c4709ff]
2024-01-11 18:19:30 -05:00
German Andryeyev 3a4261966c SWDEV-311271 - Release freed memory from MemPools
Runtime has to release extra memory, held by the pools,
in synchronization points for event, stream or device.

Change-Id: Id533a5e1d137812aa72bdfe101b4b333c6a43d66


[ROCm/clr commit: 3fa4e31180]
2023-12-19 13:47:04 -05:00
Saleel Kudchadker f969d89aa4 SWDEV-301667 - Logging refactor
- Remove newline from logging as log function internally inserts a new
line

Change-Id: I25eb2242a1f1e87cf811bcc373d1d485b2e027a8


[ROCm/clr commit: 058b2702db]
2023-12-07 12:12:57 -05:00
Saleel Kudchadker 3dfef513b1 SWDEV-433634 - Check Relaxed capture interaction mode for the thread
- Allow capture to be less rectrictive if we set the global thread
interaction mode for the thread.

Change-Id: I84f65d9418ac26ada0477c85a45a3831c2351ce4


[ROCm/clr commit: 59a6a6c12e]
2023-12-06 22:35:20 +00:00
Ioannis Assiouras 4a96c2fe15 SWDEV-435715 - Acquire the streamSetLock prior to iterating the set in WaitActiveStreams
Change-Id: I0a9721dcde1a3716192d532e290d8a7afc8ac9fc


[ROCm/clr commit: 3c6505c2d5]
2023-12-05 04:12:24 -05:00
Ioannis Assiouras ab411c8f34 SWDEV-434702 - get the nullstream in constant time in iHipWaitActiveStreams
Change-Id: Ib92cc4d2ca1b725cf30b24cdd711c873fd513d95


[ROCm/clr commit: 8bdda90071]
2023-12-03 19:05:18 -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
German Andryeyev 2d492a201b SWDEV-423317 - Enable GPU wait for hip sync calls
hipStreamSynchronize and hipDeviceSynchronize won't longer wait
for CPU commands in DD mode

Change-Id: I079c8bbfc34ddc6d3e2d74c92a34665877e512a5


[ROCm/clr commit: fbea58ba11]
2023-09-22 13:04:27 -04:00
Sourabh Betigeri 5d160eb7ee SWDEV-326798 - [ABI Break] Fixes null stream sync behavior
Change-Id: I84ad21f61779145c198dc68bf0fe02a57d34bf64


[ROCm/clr commit: 3f88fe850b]
2023-09-21 11:57:58 -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
sdashmiz 780ab907ca SWDEV-405485 - fix the error to match cuda
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ia03a50e437c8eb189bc6578170b5ef20b470541c


[ROCm/clr commit: 41bbdfca94]
2023-06-27 15:01:14 -04:00
sdashmiz 6c174f79fa SWDEV-405485 - move the param validation
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ic3a27c47a88954da866a91494bcfb8721f33ad2b


[ROCm/clr commit: 2cdaf7e80f]
2023-06-22 23:33:48 -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
sdashmiz ebcab6e910 SWDEV-360031 - Correct APIs behaviour
- correct error for hipStreamWaitEvent when event recorded before
  capture
- correct hipEventSync when event is synced during capture

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


[ROCm/clr commit: 544318fffe]
2023-05-01 13:38:59 -04:00
Jaydeep Patel 97726d4215 SWDEV-391731 - Check thread local list too.
With global flag, In addition to global vector, we need to check
thread local vector too. If both of them are empty then only
return false.

Change-Id: I3a24d16a35c702b34b9a8867dc410ebd80108f25


[ROCm/clr commit: 09a081235c]
2023-04-19 01:00:09 -04:00
German 56dedad98b SWDEV-380703 - sync all streams individually
Avoid syncing blocking streams with the default stream,
since that introduces extra command dependencies and
doesn't allow to destroy memory after last submission

Change-Id: I618e9bd2091c4cf9157125612d8c4759030c5a80


[ROCm/clr commit: 1e88d2c52f]
2023-04-05 16:37:49 +00:00
Jaydeep Patel ac5c6ad299 SWDEV-362372 - Correct error code.
Change-Id: Ife4f6e3481d0e804e676fe076f0928870c6bae57


[ROCm/clr commit: 4ac87c051d]
2023-04-05 16:37:18 +00:00
Christophe Paquot e1b8ba3750 SWDEV-301667 - Optimize lock for graph global capture mode
Remove unneeded lock and add smaller scope

Change-Id: I03a437057d54ce2d72c07a080bb872693b7f3f6c


[ROCm/clr commit: 6e86d29a58]
2023-04-05 10:58:14 +00:00
Sourabh Betigeri 21d9eb467d SWDEV-387810 - Fixes to verify if the current stream matches the capture stream
- invalid to synchronize or query the execution status of a capturing stream but non-capturing streams can.

- If any local thread has an ongoing or concurrent capture sequence initiated with hipStreamCaptureModeGlobal, it is prohibited from unsafe calls

Change-Id: Ifa641e807216d3b7c3e8c2fb1be2f7a50bd641df


[ROCm/clr commit: 7809d2846b]
2023-04-05 10:53:33 +00:00
Ioannis Assiouras bf7e31c1ff SWDEV-388278 - Fix return HIP_RETURN(x)
Change-Id: I940ee3660a2427eade8690a9318966fb04a1fbe8


[ROCm/clr commit: e6520ddf8a]
2023-03-13 13:32:55 +00:00
Jatin Chaudhary 2bcde46b12 SWDEV-372153 - Add hipStreamGetDevice Implementation
Change-Id: Ifd1f13e311e8221ca6d94cf27f9131eb97678067


[ROCm/clr commit: a7049bf7a0]
2023-03-01 04:35:49 -05:00
Sourabh Betigeri 02a3fcff26 SWDEV-326798 - Revert "SWDEV-326798 - Changes in stream sync behavior"
This reverts commit 1932e88970.

Reason for revert: HIP tests on windows fails

Change-Id: I795ed19d76a41e2fd9971414cefa5bd3be45d4bc


[ROCm/clr commit: 08c8972d97]
2023-02-28 02:28:12 -05:00
Sourabh Betigeri 1932e88970 SWDEV-326798 - Changes in stream sync behavior
Change-Id: If6d0b3876a9bf197c7e49273eaa5ca5bfae46d0b


[ROCm/clr commit: 51adec2730]
2023-02-27 16:48:14 -05:00
sdashmiz 4c50e4a6ec SWDEV-379388 - remove check for all streams done
- cuda shows  a different behaviour and different error need more
  investigation

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


[ROCm/clr commit: ea5838320e]
2023-02-23 22:56:23 -05:00