Commit Graph

127 Commits

Author SHA1 Message Date
SaleelK c4537e8050 SWDEV-553126 - Improve logging (#835)
* Ability to mask COPY api usage in logs
* Show total graph nodes in logs
* Add another log level for detailed debug
2025-09-04 10:08:41 -07:00
Danylo Lytovchenko 2ff2316227 Adjust clang format to the new versions, revert broken macro layout (#714) 2025-08-22 17:23:22 +02:00
Danylo Lytovchenko f7338717ae SWDEV-470698 - fix formatting, add format check workflow (#657) 2025-08-20 19:58:06 +05:30
Xie, Jiabao(Jimbo) 42a97a2c16 SWDEV-477219 - fix using external api calls on hipEventRecordWithFlags (#650)
Co-authored-by: Jimbo Xie <jiabaxie@amd.com>

[ROCm/clr commit: e8128f975f]
2025-08-15 13:40:52 -07:00
Manocha, Rahul b3ccf487da SWDEV-545952 - API definitions for hipStreamSet/GetAttribute (#831)
Co-authored-by: Rahul Manocha <rmanocha@amd.com>

[ROCm/clr commit: 0f49c4a97f]
2025-08-15 12:51:35 -07:00
Xie, Pengda 213623506f SWDEV-534394 - Kernel launch stream check (#533)
hipErrorInvalidResourceHandle is returned if stream is not on the launching device

[ROCm/clr commit: 7e777d3755]
2025-08-05 10:39:37 -07:00
Hernandez, Gerardo f47693b755 SWDEV-534207 - fix use of uninitialized variable at hipEventRecord_common() (#771)
[ROCm/clr commit: 2c6ec7df45]
2025-07-23 16:49:12 +05:30
Belton-Schure, Aidan 5d4ae6346e SWDEV-508977 - return error in global capture mode for hipEventQuery (#388)
[ROCm/clr commit: 51dd60a64f]
2025-05-22 23:17:57 +05:30
Xie, Pengda d0b5bee680 SWDEV-527781 - Remove Stream Validation in HIP APIs
[ROCm/clr commit: 0457b634f8]
2025-05-13 13:45:27 -07:00
Godavarthy Surya, Anusha ff69bcc903 SWDEV-469422 - Avoid using of hipStream_t in internal methods (#69)
Change-Id: Ifd5362f371c846a88241927383cb95cf046548ef

[ROCm/clr commit: fb92683d86]
2025-04-28 15:09:11 +05:30
Andryeyev, German 3ceab5ba02 SWDEV-524849 - Fix HIP error returned during capture (#141)
Always use the latest dependent nodes during hipEventRecord capture

[ROCm/clr commit: 3514f45544]
2025-04-03 20:08:25 +05:30
Saleel Kudchadker 5070d4b654 SWDEV-508004 - Improve hipStreamWaitEvent & Fix typo
- hipStreamWaitEvent may not resolve streams
- Correct usage of flag passed to streamWait function

Change-Id: I2ee163615d303b98937c1035d60da283cce6f677


[ROCm/clr commit: 940347ad42]
2025-03-05 11:56:01 -05:00
Saleel Kudchadker c8f39ec2b0 SWDEV-502365 - Track last used command
- This change tries to save extra synchronization packets we may insert
  as we didnt track the completion signals for every command. We track
the current enqueued command until it exits the enqueue stage. We also
record the exit scope to know if we flushed the caches
- Handle correct release scopes and store completion signal as HW events
- Use a new finishCommand implementation to only wait for the command
  passed as the argument

Change-Id: Ie4350c5dd24f5d48dfa6ccbabd892f0544caadcc


[ROCm/clr commit: e03e4f3b5d]
2025-03-04 16:05:02 -05:00
Ioannis Assiouras efd1f3f012 SWDEV-509788 - Code cleanups in Event class
Change-Id: I4163ce6c1dabeaab92de13b51b6a46b7be83e2bd


[ROCm/clr commit: e9b33af45a]
2025-02-27 17:16:50 -05:00
Jimbo Xie 8a42a52d0f SWDEV-477219 - implement hipEventRecordWithFlags
Change-Id: Icf07e85fc8c15f921f6e7c9fbd31dd3856dc988b


[ROCm/clr commit: 7a4a22d454]
2025-02-19 13:53:00 -05:00
Aidan Belton-Schure 4b4a35b86b SWDEV-508279 - Improve HIP event profiling
There are 2 functional changes to this patch:
* Use GPU timing for internal markers for HIP.
* Measure CPU time closer to GPU timer, to reduce delta between GPU/CPU timestamp measurements.

There are some smaller non-functional updates:
* waifForFence -> waitForFence typo
* Remove unused drmProfiling

Change-Id: I4c5fa600a842ab60e454888779edcac8449a902a


[ROCm/clr commit: 179801a750]
2025-02-13 04:15:40 -05:00
Jatin Chaudhary db2a3214c4 SWDEV-504769 - Allow hipEvent_t to record on hipStreamLegacy
Change-Id: Ib86412255adad172598620ea81214e5eb56020ea


[ROCm/clr commit: e560d94d2c]
2025-02-12 07:02:35 -05:00
Ioannis Assiouras a349b23474 SWDEV-514686 - Fixed hipEventSynchronize/hipStreamWaitEvent for IPC events
Resolved an issue where hipEventSynchronize and hipStreamWaitEvent APIs
did not function correctly for events created with the hipEventInterprocess flag.
The bug caused the event to be incorrectly marked as "recorded,"
leading to these APIs failing to wait for the event as expected.

Change-Id: Ic9fdfaab2393beb93d6e0b83661545e902a63499


[ROCm/clr commit: 1cdfbfd270]
2025-02-11 18:43:06 -05:00
Saleel Kudchadker 6a416008aa SWDEV-508004 - Improve hipEventRecord
- Resolve stream once for event record. We should avoid calling
  getStream again in addMarker

Change-Id: I78448c4f151ae10a5c8e8c248b2f4078b84191cb


[ROCm/clr commit: a22c45d635]
2025-01-09 16:47:46 -05:00
German Andryeyev d5b3b0830a SWDEV-504650 - Switch to shared_mutex for events
Use shared mutex for events validation

Change-Id: Iff291c758d9edd65717c506150f3b9d39e5306ba


[ROCm/clr commit: e3efce20be]
2024-12-17 11:04:58 -05:00
Satyanvesh Dittakavi 5a16db0cd5 SWDEV-477584 - Match hipGetLastError behavior with CUDA using env var
Change-Id: I4c5acff180ae904028f7c5fdf4e109ffd1f0c4ef


[ROCm/clr commit: e3b8754448]
2024-11-28 01:33:52 -05:00
Saleel Kudchadker 672e4fa835 SWDEV-446123 - Revert "Match hipGetLastError behavior with CUDA using env var"
This reverts commit 941cfd5b36.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I11a456655393bcf4b82d749ce7259bc1b78d1424


[ROCm/clr commit: 582dc7dd6d]
2024-11-08 20:35:13 -05:00
Satyanvesh Dittakavi 941cfd5b36 SWDEV-446123 - Match hipGetLastError behavior with CUDA using env var
Change-Id: Iaec697c1304d746376ecf2bfe2ad683b15ee189f


[ROCm/clr commit: 5f477900a3]
2024-11-07 12:02:34 -05: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 566984676e SWDEV-487988 - Reserve event flag in hip::Event.
Don't create new hip:Function if it is already registered.

Change-Id: I3ecd5d61146659be6ba434717b0f21d3fc04cfc9


[ROCm/clr commit: a6c5c6a95a]
2024-10-08 05:29:32 -04:00
Satyanvesh Dittakavi b758610a55 SWDEV-478708 - Remove forced wait of 10us in hipEventQuery
Change-Id: I868aae14311c3cdfc09aa03252ac324c4b79b864


[ROCm/clr commit: ade1954015]
2024-10-01 06:27:42 -04:00
kjayapra-amd f19260d568 SWDEV-480772 - Remove name variable from amd::Monitor class.
Change-Id: Ie2a4fa44f485786227230f8a892e090e718aa30e


[ROCm/clr commit: 12a39fbf22]
2024-09-19 11:55:01 -04:00
Ajay 5b731168ca SWDEV-439581 - hip event flags clean up
Change-Id: I2197762d912da41a8b53b32b3446f0a958c988a6


[ROCm/clr commit: 6ec5074d74]
2024-05-28 06:31:10 +00:00
Ajay cea4f4290a SWDEV-439581 - hipEventBlockingSync flag for hip events
Change-Id: I0d7785a568f8007f82f999776a7ad23d0acc81b7


[ROCm/clr commit: a5a4b78606]
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
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
German Andryeyev cffd87fc79 SWDEV-311271 - Move mempool clean-up into hipEventSynchronize
Generic event synchronize can be called from mempool implementation directly.

Change-Id: Id66ab9cdab486390df4dd405a4ac291eb0bb568f


[ROCm/clr commit: 140a075b6a]
2024-02-05 05:08:11 +00: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
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
Saleel Kudchadker f3c28c6d5c SWDEV-301667 - StreamwaitEvent may not flush caches
Change-Id: I8d648f96273b36d4930216ffa05bf1adb3c408da


[ROCm/clr commit: 514b7fc470]
2023-11-14 15:59:08 -05: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 d8022cd081 SWDEV-407568 - Move graph implementation to hip namespace
Change-Id: I7023f202a7e3eb25b17db6d3e361205594ae81a5


[ROCm/clr commit: fd97dde1e6]
2023-07-26 06:52:45 +00: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
Anusha GodavarthySurya 18edb0d97c SWDEV-366636 - Fix performance drop in TF-RCCL models
Change-Id: Ie04219daacc29654d0f47e1c15ed5cd78d88d8c8


[ROCm/clr commit: a2785c68b2]
2023-03-03 03:27:00 -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
Saleel Kudchadker 9fdbbe53dc SWDEV-364604 - Add support for hipEventDisableSystemFence
Change-Id: I1a6451c873fb22729ac61e4e80f8531251e990f0


[ROCm/clr commit: 7fc5ae2226]
2023-02-21 23:11:40 -05:00
Ioannis Assiouras 2633e62801 SWDEV-381402 - Derive hip::Stream from amd::HostQueue
Change-Id: I6c1aca5eb350c32d974ae4ffcc725705355956d8


[ROCm/clr commit: e3633dc8f4]
2023-02-21 18:12:03 -05:00
sdashmiz 42a08627ef SWDEV-360031 - check for stream capture finish.
- stream capture should be done before any sync APIs.

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


[ROCm/clr commit: be966acb0c]
2023-01-16 13:09:24 -05:00
German Andryeyev d8f1606489 SWDEV-360031 - Erase destroyed stream from capture
Parallel streams can be destroyed during capture. Make sure runtime
removes the destoryed streams from the list of parallel captured streams

Change-Id: I46b6cbb951e8711f0bf02f2826c3b890b2541ffe


[ROCm/clr commit: 38ad6234f9]
2023-01-03 13:34:07 -05:00
Ioannis Assiouras be16c31b60 SWDEV-374402 - Added check for invalid events in hipExtLaunchKernel
Change-Id: I8dfd69aa1ef38971a72b98c723d2099347a66d11


[ROCm/clr commit: b83271b4ca]
2022-12-21 12:37:12 -05:00
Satyanvesh Dittakavi d73204ebc4 SWDEV-363369 - Elapsed time needs only stop event timings if both start and stop events are recorded
Change-Id: I91c9ce79aacf1014ae77600d1250cfccd9dd6039


[ROCm/clr commit: 30d6497953]
2022-11-09 00:31:06 -05:00
pghafari a20fb7d571 SWDEV-342010 - in progress keeping track of events
Change-Id: Ic87e4b46d4eebe9922a34af5867e9fc32fcb4066


[ROCm/clr commit: ec16be77fc]
2022-08-22 03:45:57 -04:00