Commit Graph

172 Commits

Author SHA1 Message Date
sdashmiz 96640b24ff SWDEV-350569 - add proper indexing for attribute
- rocr attribute needs to be updated after each iteration

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


[ROCm/clr commit: 50e0ddb055]
2022-08-18 09:59:42 -04:00
Sarbojit Sarkar a70f836779 SWDEV-344210 - Fixed page fault when mempool accessed from remote device
Change-Id: Ie41b0c0499f7733d4541ccd50b3d0d976c6431c9


[ROCm/clr commit: a28b22d9b4]
2022-08-09 23:26:27 -04:00
Anusha Godavarthy Surya 1b2f5fbce1 SWDEV-299940 - Query global memory available on device with HSA attribute HSA_AMD_AGENT_INFO_MEMORY_AVAIL
Change-Id: Ifcfb95f59d110b3b037a7131be21d5348601d2e2


[ROCm/clr commit: 73021582d3]
2022-08-05 06:55:12 -04:00
sdashmiz 3389e6077a SWDEV-334233 - add support for p2p in windows
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I9109120b5444c400e65cfff869cb36e876ffd1fc


[ROCm/clr commit: e176e27bf7]
2022-07-14 15:07:33 -04:00
Tao Sang 664578080a SWDEV-286739 - Support hipDeviceAttributeWallClockRate
Part 1: Query constant frequence of wall clock from RocR

Change-Id: I52cbba6d67d11cde6d019c5ab530059f426a9bf2


[ROCm/clr commit: 1e26165cd0]
2022-07-12 17:53:11 -04:00
Saleel Kudchadker 7fd80925cd SWDEV-335626 - Use ROCr copy for IPC
Detect IPC buffer and use ROCr copy api instead of blit

Change-Id: Ie6bdd6fc45dbd7457611011d81570b53d5fd5276


[ROCm/clr commit: faaa41aab8]
2022-07-08 13:32:19 -04:00
Saleel Kudchadker b3ad41f6e4 SWDEV-335780 - Indicate if handler is queued
Maintain status of handler callback. For event records we no longer
submit callbacks to reduce the load on the async handler thread. However
without a callback we leak command memory/decrement refcounts. Indicate
status of the handler which we can use to queue a callback when
finish is called.

Change-Id: I89fd02f3d047a0e8162664ee17581a14795f1928


[ROCm/clr commit: 5df34a2f7a]
2022-06-14 20:55:06 -04:00
German Andryeyev acf2856677 SWDEV-339296 - Delay hidden heap allocation till the usage
Move hidden heap creation to the kernel launch to make sure it's
allocated on the actual first usage.

Change-Id: I1b65a82fc06d9129ed45a69765bf14ea3d945b04


[ROCm/clr commit: 4975f69337]
2022-06-14 12:18:34 -04:00
German Andryeyev df01016c97 SWDEV-336024 - Clear device heap to 0 in ROCr path
Change-Id: Id100ca6d6d5bd7fb16ca8c98ff0b12c9df1d69ab


[ROCm/clr commit: 830898753d]
2022-05-20 11:51:08 -04:00
German Andryeyev 0ecf22bb53 SWDEV-336024 - Clear device heap to 0
This reverts commit 8624574866.

Reason for revert: Fix regressions

Change-Id: I7d883e1c3cbd27bb64b581ec800243ad7dfe24fd


[ROCm/clr commit: 07c1b9a998]
2022-05-19 09:10:08 -04:00
German Andryeyev 8624574866 SWDEV-336024 - Clear device heap to 0
The heap must be cleared once per device, but ROCclr doesn't
create a queue per device in HIP. Hence, the clear operation will
be performed during the first queue creation.

Change-Id: I52ceb06d67d11cde6d019c5ab510059f426a9bfb


[ROCm/clr commit: 04bfd93569]
2022-05-11 11:03:56 -04:00
Christophe Paquot 2c3faaa3a0 SWDEV-322620 - Virtual Memory Management
Add a virtualMemoryManagement_ flag to device.info.

Change-Id: Iabd039010d83fc51b4bcef600c609f5c65e7b1ae


[ROCm/clr commit: b4645c7d4e]
2022-05-09 22:54:42 -07:00
Julia Jiang 1d74dfe1d5 SWDEV-334574 - Rename _bkendDevice in VDI
Change-Id: I1c04dad226e08f02bca11fa0d1981fafa7ea2d2a


[ROCm/clr commit: b7c7917256]
2022-04-27 11:21:24 -04:00
Sarbojit Sarkar 8649f60ad7 SWDEV-333438 - Fix for hipEnablePeerAccess segfault
Change-Id: I60720d1d9b9c522d15fe17dcfbc609571a4fd266


[ROCm/clr commit: 6b15e0a1cc]
2022-04-26 05:21:52 -04:00
Christophe Paquot 5f42bfd145 SWDEV-322620 - Virtual Memory Management
Implement map/unmap for PAL backend
Create commands since PAL uses the IQueue to map/unmap

Change-Id: I97e26a7d28ae5e10774c9ca65307153100945621


[ROCm/clr commit: 67657d6099]
2022-04-22 18:09:26 -04:00
sdashmiz dafc64ea0a SWDEV-204804 - Detecing pcie atomic support
- check pcie atomci support for printf functionality
- if not enabled printf wont work

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


[ROCm/clr commit: 15f1632dfa]
2022-04-22 08:53:16 -04:00
Saleel Kudchadker 415c5a5766 SWDEV-333237 - Disable cache status
Enable Cache status only for ROC_EVENT_NO_FLUSH

Change-Id: I0de4c5af2226bccd66fd704be23c2db33050f2e2


[ROCm/clr commit: 8864e53265]
2022-04-20 18:12:33 -04:00
Christophe Paquot 1024cb58a7 SWDEV-322620 - Virtual Memory Management
Adding virtual memory management APIs to rocclr.
The HIP layer will handle virtual allocs on devices.

Change-Id: Ia978f105c2c3fed3959c77580ba228e845105754


[ROCm/clr commit: b5f555f9ec]
2022-04-15 00:10:02 -04:00
Saleel Kudchadker 3d0100c5ab 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


[ROCm/clr commit: 8eeaa998c0]
2022-04-12 12:27:31 -04:00
German Andryeyev 2f380870df SWDEV-328670 - Enable arena for ROCr interops
Add ROCR memory detection and enable arena mem object for possible
access in HIP

Change-Id: Icf86ac789176bfee4ea8d36b0970a817d4c6a2f7


[ROCm/clr commit: 28597ec5b5]
2022-03-30 16:46:36 -04:00
Saleel Kudchadker 62a60eb1c4 SWDEV-301947 - Report regular CU count for OpenCL
Change-Id: I3ea058bba98f3c6554cbde37173bbd772f489cf5


[ROCm/clr commit: 61d0b999be]
2022-03-29 16:19:14 -04:00
Saleel Kudchadker 4dbec887a2 SWDEV-301667 - Selectively queue handler
- Queue handler for hipEventRecord(aka marker_ts_) only if there is a
callback associated with it.

Change-Id: I8a9877ae0e342556053abbaacc9510744a8e772a


[ROCm/clr commit: 3c3c0ca4c5]
2022-03-24 19:46:28 -04:00
German Andryeyev b813a78c80 SWDEV-307185 - Move memory allocation under device layer
It can be too early to allocate memory at the begining of
Device::create() under PAL

Change-Id: I4bd76db7be3f6fb246243ea68022d8b0f860471d


[ROCm/clr commit: 3af3fe10de]
2022-03-21 16:17:22 -04:00
Sarbojit Sarkar d58efdd1a8 SWDEV-325708 - Query for FineGrained support
Change-Id: Idd20a71467595ab6577bf47c081c437a4b166988


[ROCm/clr commit: 3c2dc1f646]
2022-03-16 05:09:42 -04:00
German Andryeyev 7d5ed33e8f SWDEV-307185 - Create heap for device memory allocator
Pass the allocated heap with the kernel arguments

Change-Id: Icdec09b7f937845c39e21cbca7071dc3ba791af9


[ROCm/clr commit: 7b114a2b8b]
2022-03-04 00:44:41 -05:00
Saleel Kudchadker ebcc5f9388 SWDEV-301947 - Rename device Info element
Rename maxBoostComputeUnits to maxPhysicalComputeUnits_.

Change-Id: I5941515ac4f1f4348b3b10478bf4e01444f0a864


[ROCm/clr commit: e888c9e491]
2022-02-25 16:48:15 -08:00
Saleel Kudchadker 7fa538bf79 SWDEV-301667 - Fix maxNode size for get_mempolicy
Change-Id: Ifd84c94394b86580cf39178ad0e7f85580b24edb


[ROCm/clr commit: c02d3fd7d8]
2022-02-19 12:48:22 -05:00
Satyanvesh Dittakavi 31aa18f1a9 SWDEV-317716 - Add uuid in device info structure
Change-Id: Ie7f48d0faf7d722bd9bb8bd0f8962a7832dbe4f6


[ROCm/clr commit: 824704c87b]
2022-02-03 12:17:28 -05:00
Saleel Kudchadker d0e8d72bfa SWDEV-301947 - Use new enum for CU count
Use HSA_AMD_AGENT_INFO_COOPERATIVE_COMPUTE_UNIT_COUNT to get compute
units. This is needed to work around assymentric CU harvesting bug on
gfx90a. Add a new device property to get the max available CUs on the
device.

Change-Id: I878f38f14f16c1af01fc0a77157aea1e816a63b8


[ROCm/clr commit: 33aca5a4a6]
2022-01-31 12:57:50 -05:00
Satyanvesh Dittakavi 85c2cac111 SWDEV-306939 - Fix vdi errors/warnings by CppCheck
Change-Id: I56d910f8363787f1050d5d7e8064ed553c5827fd


[ROCm/clr commit: e20dd61932]
2022-01-12 00:22:16 -05:00
Julia Jiang 41eef3076e SWDEV-308644 - reorganize extra blit kernel in PAL stack
Change-Id: I9d853e8d417ef75b522184d83646ec4b9fa8669b


[ROCm/clr commit: 376ea1e293]
2021-12-07 14:55:20 -05:00
Satyanvesh Dittakavi b219bf8292 SWDEV-309286 - save the max system mem size in device info
Change-Id: I9955625aca6ceda059aef6354d909de636b610ba


[ROCm/clr commit: 9dabdcdc3e]
2021-12-02 10:59:07 -05:00
Julia Jiang ea2741f631 SWDEV-308644 - merge roc blit kernels
Change-Id: I378e511959fe17c03fa45066022e9670a4d181f0


[ROCm/clr commit: f5c9ad5b1d]
2021-11-25 10:07:51 -05:00
Saleel Kudchadker 04a391004a SWDEV-299893 - Set preferred node affinity
Set affinity to the closest node of the current GPU. This reduces
the latency to fetch kernel args since device would query the CPU cache
of core which did the dispatch. This behavior is controlled with
AMD_CPU_AFFINITY env var(disabled by default)

Change-Id: I65afba62cb818ea25a311b88d1c0dd5c51330292


[ROCm/clr commit: b192beea52]
2021-11-19 04:42:42 -05:00
Julia Jiang e3f6db3d64 SWDEV-308644 - update blit kernel setup in rocm
Change-Id: Iaa9ff97b3ed7d379189c359696be932a83cf203c


[ROCm/clr commit: ef3d6f7b28]
2021-11-15 13:28:07 -05:00
German Andryeyev 7a9f92d95e SWDEV-305016 - Add a timeout wait into IsHwEventReady()
Just signal check will still submit the marker and then later
runtime will have a timeout, but the barrier packet is still
generated. Hence early timeout will allow to skip the marker.

Change-Id: Ieb7d89becbcff43a4f4c46715354ca65ab4a80b9


[ROCm/clr commit: bbb635bc32]
2021-11-02 11:37:23 -04:00
jujiang 7efd69cecd SWDEV-306207 - clean up CL definition in ROCclr
Change-Id: I92e2c7c63ebddd119df390784e372ab2f42f3b0d


[ROCm/clr commit: 90b0e8430a]
2021-10-07 11:45:43 -04:00
German Andryeyev 2cb7467eff SWDEV-303560 - Remove coarse grain setup by default
The original logic was left after initial testing when HMM
couldn't handle xnack properly

Change-Id: I0abf01805704171e931dfba8b6d95bfe87d5fab1


[ROCm/clr commit: d17108e8d0]
2021-10-05 17:20:59 -04:00
kjayapra-amd ead79defbe SWDEV-295277 - Report max waves per cu from ROCr backend.
Change-Id: Ie170b26b53f1cc2da851034c96b21de38ce7b563


[ROCm/clr commit: 3081f7ca53]
2021-10-05 12:38:44 -04:00
Tao Sang e425c5e79b SWDEV-305884 - Clear up codes
Fix a log typo error
Change-Id: I887ecbdcfe414c2119247228bdd1255b8308da1d


[ROCm/clr commit: 10abe8ab37]
2021-10-04 18:11:32 -04:00
Jason Tang e1b16403b9 SWDEV-1 - More 'delete' clean up
info_.extensions_ and settings_ are deleted at amd::Device()::~Device().

Change-Id: I06f240a42e5c131dbd4e61a759f905bcdf84b45a


[ROCm/clr commit: f212fc91ca]
2021-09-21 11:17:24 -04:00
German Andryeyev 83d83e6166 SWDEV-302383 - Get active state from device
The queue can be destroyed at the time the app will request
the event status. Hence just get the active state from the device.

Change-Id: I887ecb0cfe414c2119247228b0d1255b8308da1e


[ROCm/clr commit: f116959b54]
2021-09-14 19:01:44 -04:00
German Andryeyev e4ae79ca4a SWDEV-282419 - Use HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE for unset
When unsetting runtime should use HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE
for the agent and not HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE_IN_PLACE

Change-Id: I3814802d1fb3b72c54e7566defafafed6b0d5cee


[ROCm/clr commit: d8a86e4870]
2021-09-13 15:05:20 -04:00
Jason Tang e94aec09bd SWDEV-1 - Some 'delete' clean up
Change-Id: I02564f0f0e349375bde1471e9f82df268703367b


[ROCm/clr commit: 73967c3b17]
2021-09-09 12:12:40 -04:00
Saleel Kudchadker 1bf9b39cf8 SWDEV-301667 - Kern arg placement
Add a env var ROC_USE_FGS_KERNARG to toggle kernel arg placement
By default its in Fine Grain Kernel arg segment for supported asics.

Change-Id: I3d57ed69a1a4db2b392b0438ead499f3ddca4716


[ROCm/clr commit: e29b9c00ee]
2021-09-02 12:36:49 -04:00
Jason Tang d1a3931d68 SWDEV-1 - Disable OpenCL support for gfx8 in ROCm path
Change-Id: Ie1e0c0d6273edf6b734909447c2a08252cba305b


[ROCm/clr commit: 7f83bcdb45]
2021-08-31 12:48:47 -04:00
Satyanvesh Dittakavi 9805fb774e SWDEV-299491 - Update data index in GetSvmAttributes appropriately
Fixes Seg fault caused when the attribute hipMemRangeAttributeAccessedBy
is queried using hipMemRangeGetAttribute

Change-Id: I2ceb2267d89bfc31a55d9eae2685610c7ad89b1f


[ROCm/clr commit: 48c1b895c0]
2021-08-26 13:36:35 -04:00
Satyanvesh Dittakavi 6c0e65ed4b SWDEV-274145 - Fix to return correct data when queried for hipMemRangeAttributeReadMostly attribute
Change-Id: I9041c974b61e7a9c8fbdc748a407bbd04c060876


[ROCm/clr commit: b46ffd5fe0]
2021-08-22 23:56:08 -07:00
German Andryeyev ee69220fb9 SWDEV-295555 - Add SVM mode query
The new query MemRangeAttribute::CoherencyMode can return current
coherency mode for the provided memory region. Coherency mode can
be one of the following types: FineGrain, CoarseGrain and
Indeterminate

Change-Id: Ib66feeeb14f57a8b1cc731c65bb3d0276d297ff7


[ROCm/clr commit: 992830bab7]
2021-08-22 23:56:08 -07:00
German Andryeyev f19e3f0a13 SWDEV-290384 - Enable active wait on CPU if HIP requested
Change-Id: Idea5adf7a4705cb999da6785e6229fe3200dce17


[ROCm/clr commit: 2babcfbdbb]
2021-08-22 23:56:08 -07:00