Grafik Komit

69 Melakukan

Penulis SHA1 Pesan Tanggal
German 53a10c9039 SWDEV-377991 - Remove liquidflash support
Change-Id: Iba6455e5c0210c3223a06fec332404cd9f489154
2023-01-20 09:57:06 -05:00
German c8927cd84e SWDEV-377991 - Remove Liquidflash extension
Initial check-in to untie dependencies with HIP and OCL repos

Change-Id: I363b63954c3f118f40a6ed893545d6a4ac44144c
2023-01-18 13:16:20 -05:00
Sourabh Betigeri 5d7f3f9f3c SWDEV-305894 - Cooperative groups grid and multi grid sync support for gfx940+
Change-Id: I35d72f1cb50c3a96eee56a612b72d641852b145f
2022-12-05 16:30:30 -05:00
Laurent Morichetti 52eb28930a SWDEV-351980 - Consolidate registration tables in the roctracer library
Remove the activity_prof::CallbacksTable. The table was redundant with
the information already stored in the roctracer library. Instead use a
single callback into the roctracer library to query whether the activity
is enabled, and to report it.

Change-Id: I2e05b0881bb4a1953c14361d00ea310d02eb6e0c
2022-09-21 05:54:09 -04:00
Laurent Morichetti e713b5c7d0 SWDEV-351980 - Enable profiling for commands reporting activities
Profiling should be enabled for any command reporting activities as the
activity record captures the profilingInfo's start and end timestamps.

Since IS_PROFILER_ON is only used to determine whether API tracing is
enabled, there is no need to expose it globally, it should be a property
of the activity_prof::CallbacksTable.

Change-Id: I44a0d19ed2862606cfbc9a98c1a07a336ab7e26c
2022-09-21 05:53:59 -04:00
Laurent Morichetti 4fbae91468 SWDEV-351980 - Move activity_ to the ProfilingInfo
The activity_ is only instantiated if profiling is enabled.

Remove the HIP private global record ID. Instead, use the correlation ID
stored in the hip_api_data_t by the profiler while the last HIP function
is in scope.

For NDRange and Copy commands, store the kernel name and byte size
(respectively) in the record.

General cleanups to improve the code's readability.

Change-Id: I01907484b0d9611eb9440c3a7c4865479dc42289
2022-09-21 05:53:47 -04:00
Anusha Godavarthy Surya 7b1c6d06d5 SWDEV-345683 - Fix HIP out of memory
If for every eventRecord handler is not submitted,
memory is not getting released during hipFree and leads to OOM.

Change-Id: I19b61a0c523502e9e1a3564ce8b791f3e2cea02c
2022-07-28 07:36:38 -04:00
Ajay 236178d0d4 SWDEV-337331 - command queue logs for debugging option
Change-Id: I198aecc5fd12369d87d4acc9910acc9435c1967a
2022-06-22 19:41:38 +00:00
Sarbojit Sarkar 356e22f910 SWDEV-325379 - Fix for remote copy crash
Change-Id: I22152c0b3538cf7cfc80f82505bc255c01d98f7b
2022-06-16 23:59:11 -04:00
Saleel Kudchadker 02566677cf SWDEV-334152 - Set release as systemscope
Set release scope as system for dispatch AQL when events are passed to
hip*LaunchKernelGGL*

Change-Id: I93b91591e0ab023f1ecc5247f7905eca26147358
2022-04-29 13:19:29 -04:00
Saleel Kudchadker fa76f03654 SWDEV-334150 - Force callback to cycle commands
Enqueue a handler callback for hipEventRecords(aka marker_ts_) for every
64 submits, This recycles the memory if we dont end up calling
synchronize for the longest time.

Change-Id: I3d39fe76d52a5d81387927edd85b5663b563682c
2022-04-28 12:30:23 -04:00
Saleel Kudchadker b6cbfaf499 SWDEV-301667 - Separate scope from marker_ts_
Change-Id: I19f4d394e898bfb8c9d9a2c2edf9d5bf5def3b08
2022-04-16 19:26:31 -04:00
Saleel Kudchadker 8eeaa998c0 SWDEV-301667 - Add cache state for a device
- Add a global cache state for a device to indicate scopes of submitted
AQL packets
- Remove scopes for TS marker if hipEventReleaseToDevice is passed. Set
env ROC_EVENT_NO_FLUSH=1 to use NOP AQL for event records.
It would flush caches by default with system scope release.
- Calling finish() should ensure if caches are flushed, if not queue a
marker

Change-Id: Ibbbdbb1cd7ac61cb35649169212142545be159e0
2022-04-12 12:27:31 -04:00
Saleel Kudchadker 3c3c0ca4c5 SWDEV-301667 - Selectively queue handler
- Queue handler for hipEventRecord(aka marker_ts_) only if there is a
callback associated with it.

Change-Id: I8a9877ae0e342556053abbaacc9510744a8e772a
2022-03-24 19:46:28 -04:00
haoyuan2 439af94dd9 SWDEV-290298 - add a flag to indicate the primary context active status
Change-Id: Ia31790706d3f855bc1eedf5ef874e471
2021-12-09 23:28:54 -05:00
Sarbojit Sarkar aedbad0109 SWDEV-314254 - Fix for hipMemcpy3D test crash
Change-Id: Iac70bfe0d351cfb5b56fefc9a6487d3f26f2b4ef
2021-12-09 11:46:52 -05:00
Sarbojit Sarkar 2afeacc858 SWDEV-310181 - Fix for mGPU dtest failure
Change-Id: Id0898bd45e23f2d637bef25a3e69f26d9dc40785
2021-11-22 01:01:47 -05:00
German Andryeyev 7e12cf6318 SWDEV-257789 - Initial change to skip kernel arg copy
The optimization is controlled with ROCR_SKIP_KERNEL_ARG_COPY.
This is initial check-in for experiments. Extra changes are
necessary for full support:
- handle graph capture with the original sysmem alloc
- avoid memobject references, otherwise there is a race condition with
reusage of the arg buffer
- Remove arg setup from hip

Change-Id: Ib0af710f93e79834711fa4049a7c66093711e68b
2021-10-28 20:35:35 -04:00
Vladislav Sytchenko d934612948 SWDEV-1 - Prepare for c++17 switch
std::mem_fun() and std::bind2nd() are removed in c++17. Switch to
simpler logic that does not require those functions.

Change-Id: I19a31f076e1813e367615bd377b424046ce144c7
2021-09-08 16:18:33 -04:00
German Andryeyev ff15c0893e SWDEV-292018 - Switch to internal signals for markers
Add ref counting to ProfilingSignal class to track the last release.
If a signal was used in the marker, then don't reuse it,
but create a new one for internal usage.
Don't rely on HSA callback for the command status update if there
are no pending dispatches.

Change-Id: I19f14ed9d80acfe79993b343b2187635f8428a20
2021-08-22 23:56:07 -07:00
German Andryeyev f34c1b9ff8 SWDEV-292820 - Add a new notify lock
HSA signal calback may occur during the actual marker submit. That
may cause a deadlock, because shared lock_ object. Create the new
notify_lock_ field to protect the notification.

Change-Id: I9752af84e59895530620fac3932c6fc276de8658
2021-08-22 23:56:07 -07:00
agunashe d96481fb36 SWDEV-293742 - Update copyright end year VDI repo
Change-Id: I69d2fea4a7a43adf96ccea794270e4af991c5261
2021-08-22 23:56:07 -07:00
German Andryeyev ce8dad2ecc SWDEV-290160 - Switch to global HSA signals
Runtime can't assign internal HSA signals for HIP events, because
HIP application can destroy the HIP stream or signal reuse may
occur internally. Switch to global HSA signals for HIP events.

Change-Id: Ieaea2d6b039e492b2e7c5112782a8f4e601e50a1
2021-08-22 23:56:07 -07:00
Christophe Paquot 133287f31f SWDEV-240806 - Release resources in Command::terminate for HIP
We do not want to release resources during setStatus in HIP because of Graphs

Change-Id: Idc7b188ab5f8be6975ea91005dd2bbf177401f8c
2021-08-22 23:56:07 -07:00
German Andryeyev c49f1069ab SWDEV-290160 - Don't send notification for batch markers
Batch marker already has a barrier with HSA signal callback

Change-Id: I69fc63d72320c2e9cc2d2e59ebd3f07c0bd0e3b5
2021-08-22 23:56:07 -07:00
German Andryeyev 85c70a7495 SWDEV-284671 - Add HW event wait to improve hipDeviceSynchronize
If AMD event contains a reference to a HW event, then runtime
could check/wait for HW event. CPU status update will occur later
after HSA signal callback, but it's not important for the result.

Change-Id: I591391a953bbdba6a25ac07e2cd98aeb17cd4596
2021-08-22 23:56:07 -07:00
Saleel Kudchadker 9d0846e732 SWDEV-286092 - Enable handler for marker always
For DD, send a NOP packet so that we leverage the handler to indicate
completion.

Change-Id: Ie57ea0124a8497d39cc49da1c4575c2cd86b9319
2021-08-22 23:56:07 -07:00
German Andryeyev fa2e154a8b SWDEV-278894 - Use GPU waits for HIP events
Save HW events in amd::Event.
Use HW events for synchronization

Change-Id: I98cf9c2d0ec3c7fcaf254b749ac6c568d7270ae0
2021-05-25 13:41:15 -04:00
Anusha GodavarthySurya c9c6bed022 SWDEV-240806 - [hip-graph] Added functions updateEventWaitList and resetStatus
Change-Id: I6a753e9584bdacd39ee676466a884ec6b7859879
2021-04-20 09:43:40 -04:00
Saleel Kudchadker 9307ab43e4 SWDEV-278336 - Print time info only when profiling
Change-Id: Ic8d04e58cf4558fbfc5ed6db35f3ff2d788803f9
2021-04-09 13:17:31 -04:00
Satyanvesh Dittakavi a711a49881 SWDEV-264244 - Hide Notifications from HIP
This fixes hipStreamQuery returning hipErrorNotReady when idle
Change-Id: I3f77666a00bc6a7162b6c660d79e76c09669d94f
2021-03-16 06:30:55 -04:00
German Andryeyev 7f32d0b425 SWDEV-272496 - Detect callbacks and force AQL barrier
HIP tests require HIP callbacks to be processed in another thread.
This change will use a thread from HSA signal callbacks to make
sure a HIP callback was done asynchronously.
Also process the callback before changing the status of command

Change-Id: Icef85d0e0f808663882cf6881ff1be3e5eca29ac
2021-03-05 11:33:51 -05:00
Sarbojit Sarkar 14d54a7b29 SWDEV-254329 - Fix for profiler ON/OFF
Change-Id: Iea72ae96ebe7ed95322dfc39d785ac326b47f6dc
2021-03-02 02:16:14 -05:00
German Andryeyev 24299e25bd SWDEV-272496 - Fix multiple timing issues
- Don't notify if the batch is empty, because that means
the current command was processed already.
- Disable pinning optimization to avoid a race condition on stall.
- TS marker submition requires extra AQL barrier
to track the status.

Change-Id: I17eff4ad12ac66cfe1bb44048bebb1891805279d
2021-03-01 12:46:57 -05:00
German Andryeyev a9b0e20d26 SWDEV-272496 - Fix a regression in PAL
Skip notification for markers with direct dispatch only,
since they are blocking always

Change-Id: I6bb17650f73371dae6e29c59fd6bb2012cc062fd
2021-02-25 11:11:42 -05:00
Vladislav Sytchenko 184b2631d5 SWDEV-271964 - Revert "SWDEV-264244 Fix StreamSync"
This reverts commit a148a71075.

Change-Id: I870c8b71edeb31f587fffe2447762acba61a7938
2021-02-24 11:43:08 -05:00
German Andryeyev 0587fb7450 SWDEV-272496 - Disable notification for the previous notify
Direct disaptch doesn't insert extra barriers for Markers if
AQL barrier was the last issued command already.

Change-Id: I00fbc658547d83dd3ee64ec391ed50e5f8a08e30
2021-02-23 17:04:59 -05:00
German Andryeyev 6966d8098e SWDEV-269654 - Fix HIP stream busy query
- Avoid GPU wait on the marker submission and update the command
batch after HSA signal callback upon HSA barrier completion.

Change-Id: I5c1c97212aefc2ae4b99aa9e2a81627ee9a38c1c
2021-02-09 12:57:12 -05:00
Satyanvesh Dittakavi a148a71075 SWDEV-264244 Fix StreamSync
Change-Id: I3a46a607a77aaf46dcd1fcf08db7e926613fe8d1
2021-01-08 02:06:31 -05:00
Sarbojit Sarkar 0e4b4255b2 SWDEV-262857: minor fix for D2D
Change-Id: Ica3cb9108e7a0d40d6a910f318df0a2420145603
2020-12-16 23:13:15 -05:00
Saleel Kudchadker d0c35f1c40 Fix event reporting for AMD_DIRECT_DISPATCH
Change-Id: I2ff74b9470da976852228c30fefbd4abd8e1952b
2020-12-09 15:09:41 -05:00
Sarbojit Sarkar f403b1c079 [SWDEV-259635] explicit allow_access for hipMemcpy2D
Change-Id: Ia3206c08f92f417dc486c5f0dd40474f77b473d9
2020-12-09 01:09:53 -05:00
German Andryeyev 5b31c69a95 Add batch tracking for direct dispatch
Make sure the logic updates the command status when it's done in
HW, but not on submission.
Add the last command tracking, otherwise queue sync logic in the HIP
upper layer may skip synchronization, assuming the queue is empty.

Change-Id: I2d046792553e74df090a10f7d7a78914610f6df2
2020-12-04 10:16:17 -05:00
German Andryeyev 532f0ae951 Add direct dispatch simple hack for testing
The hack dosn't really track the commands status. It may be not
necessary for HIP, but will cause early resource release.

Change-Id: I791ad36dd8abd3b6b3d2c9b16a210a555c08ca64
2020-11-13 10:36:23 -05:00
Sarbojit Sarkar 099f8d61dd SWDEV-258573 : fix for OCLP2PBuffer test failure
Change-Id: I363d4fb2bb94d9bc03e96844d31dec7ef9b2ce33
2020-11-13 02:25:53 -05:00
German Andryeyev bd340d8cbf Correct reported info in ROC profiler
OCL can't distinguish different copy types, but ROC profiler
expects SDMA transfer visibility. Add extra code to detect
a transfer with the host memory and substitute OCL command

Change-Id: I5290acd0e10bc082e00c1d4ae1474a075de7f165
2020-10-23 18:29:48 -04:00
Jason Tang c5184d61b4 SWDEV-252150 - No need to send a Marker if the event is completed in Event::notifyCmdQueue()
Change-Id: Iaa1c550ce0849c12298a24812604345dbf877a5e
2020-10-14 09:29:24 -04:00
Sarbojit Sarkar 4a025e1a87 [perf]hipMalloc performance optimization
Change-Id: I6e8a918cc1c4cafad197b09e10755cd180e11ead
2020-10-06 03:19:41 -04:00
Laurent Morichetti 5d4b6f74d3 Use std::atomic
Replace amd::Atomic with std::atomic. Remove make_atomic uses by
converting the variable to std::atomic and making sure the memory
order is relaxed when synchronizes-with is not needed.

Delete utils/atomic.hpp.

Change-Id: I0b36db8d604a8510ac6e36b32885fd16a1b8ccfa
2020-09-09 14:55:29 -04:00
Saleel Kudchadker 1c24072d13 Revert "SWDEV-241977 [ROCm QA] Random Soft hang observed while running TF and Caffe2 benchmarks"
This reverts commit ce038f3163.

Change-Id: Ib56493c92eca793f1dfb6f1cbefb32f0b4f65e89
2020-09-01 18:09:10 -04:00