Commit Graph

187 Commits

Author SHA1 Message Date
jatang e8cd1e93e8 SWDEV-1 - Not to truncate size_t in print when it's 64bit
Change-Id: Iab8b7eb128c767b6808b19cbeac5169b7a97f1ad
2022-12-13 09:13:33 -05:00
kjayapra-amd e56a611b92 SWDEV-371904 - Adding pseudo fine grain flag to hsa memory allocation for device fine grained memory.
Change-Id: I8cada90f0e3880dfbc5bf5a3fac4554e7a0cb08e
2022-12-11 08:15:17 -05:00
pghafari 402504f548 SWDEV-366279 - updating p2p error msg
Change-Id: I294e7770efd11f511dd5817eb28bd3c97d9d4926
2022-12-09 00:05:04 -05:00
Ioannis Assiouras b445717f72 SWDEV-369547 - Ensure that ipc_mem_detach is not called for non-ipcShared MemObj.
Change-Id: Ia73b60b9f08d593301879e0f72c395edbc215112
2022-11-30 02:16:13 -05:00
Anusha GodavarthySurya 446a3fc688 SWDEV-354074 - cache hsa queue and delete when device is destroyed
Change-Id: I26365521d785f0bc612e32bdcdb6caacb3af9a11
2022-11-23 07:17:45 +00:00
German b40823ccc1 SWDEV-328670 - Enable ROCr interop
Change-Id: I932afa2a0e75b1f1771c4be1e984b32966636afb
2022-11-17 09:40:34 -05:00
Maneesh Gupta a52f5bda8f SWDEV-299940 - Query global memory available on device with HSA attribute HSA_AMD_AGENT_INFO_MEMORY_AVAIL
This reverts commit 4afca0647e.

Reason for revert: ROCr query should now be usable in upcoming release.

Change-Id: I2207761ca6af5d585d090bae1af09eb9a8e9bad6
2022-11-09 10:48:47 -05:00
Saleel Kudchadker 3e465c5ff8 SWDEV-364052 - Print free memory on queue callback
Change-Id: I7d15b6f6277326d5f3e9b784a3443f18ec6ba58a
2022-11-04 13:19:33 -04:00
Ajay 261620a2ef SWDEV-357207 - Linux: enable StreamWrite/Wait APIs in deviceAttribute
Change-Id: I593df2dbb7a0233dd42f8d873510d85bbb27feff
2022-10-21 12:44:35 -04:00
Laurent Morichetti 9a82118c85 SWDEV-362046 - Report HIP_OPS activities using the ROCr driver_node_id instead of the device's index
The ROCclr assigns zero-based IDs to GPUs in the order they are
discovered. That zero-based ID is what is used to identify the GPU
on which the HIP_OPS activity took place.

When multiple ranks are used, each rank's first logical device always
has GPU ID 0, regardless of which physical device is selected with
CUDA_VISIBLE_DEVICES. Because of this, when merging trace files from
multiple ranks, GPU IDs from different processes may overlap.

The long term solution is to use the KFD's gpu_id which is stable
across APIs and processes. Unfortunately the gpu_id is not yet exposed
by the ROCr, so for now use the driver's node id.

Change-Id: Ib78854527d600d175bb76e2df0747c33f898c615
2022-10-20 12:31:30 -04:00
Julia Jiang dacd55f3d7 SWDEV-357122 - fix failure in vdi so as to handle unreasonable input size in MallocManagedNegativeTest
Change-Id: I1ed1916b652afc67327b0935c3c60fc2a404df30
2022-10-20 12:19:22 -04:00
kjayapra-amd 951a5b9e7d SWDEV-307411 - Require comment/message string in guarantee().
Change-Id: I55a699c5366f6a7d167ede4c9be2ec5b15cea9d0
2022-10-13 16:21:21 -04:00
Saleel Kudchadker 9b5cbd37a2 SWDEV-352001 - Store last scopes for dispatch
- Store last fence scopes and use the last value to determine if we need a cache flush again. This helps cases where hipExtLaunchKernel API is
used.
- Purge code for ROC_EVENT_NO_FLUSH

Change-Id: I531cf9c9c60d5e2b3a9e265d0f52f79ed2fa8a8c
2022-09-22 11:34:10 -04:00
Maneesh Gupta 4afca0647e SWDEV-352502 - SWDEV-355630 - Revert "SWDEV-299940 - Query global memory available on device with HSA attribute HSA_AMD_AGENT_INFO_MEMORY_AVAIL"
This reverts commit 73021582d3.

Change-Id: I86175ccf2b543c3ff3dffec6ccae410976972f22
2022-09-12 07:34:32 -04:00
Sourabh Betigeri b15b3173f4 SWDEV-326798 - Avoids waiting for the signal with a timeout and instead queries the current status
Change-Id: I8b4052d5439ca930ceb924da30cb0335f0826a95
2022-09-06 12:49:46 -04:00
sdashmiz 50e0ddb055 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
2022-08-18 09:59:42 -04:00
Sarbojit Sarkar a28b22d9b4 SWDEV-344210 - Fixed page fault when mempool accessed from remote device
Change-Id: Ie41b0c0499f7733d4541ccd50b3d0d976c6431c9
2022-08-09 23:26:27 -04:00
Anusha Godavarthy Surya 73021582d3 SWDEV-299940 - Query global memory available on device with HSA attribute HSA_AMD_AGENT_INFO_MEMORY_AVAIL
Change-Id: Ifcfb95f59d110b3b037a7131be21d5348601d2e2
2022-08-05 06:55:12 -04:00
sdashmiz e176e27bf7 SWDEV-334233 - add support for p2p in windows
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: I9109120b5444c400e65cfff869cb36e876ffd1fc
2022-07-14 15:07:33 -04:00
Tao Sang 1e26165cd0 SWDEV-286739 - Support hipDeviceAttributeWallClockRate
Part 1: Query constant frequence of wall clock from RocR

Change-Id: I52cbba6d67d11cde6d019c5ab530059f426a9bf2
2022-07-12 17:53:11 -04:00
Saleel Kudchadker faaa41aab8 SWDEV-335626 - Use ROCr copy for IPC
Detect IPC buffer and use ROCr copy api instead of blit

Change-Id: Ie6bdd6fc45dbd7457611011d81570b53d5fd5276
2022-07-08 13:32:19 -04:00
Saleel Kudchadker 5df34a2f7a 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
2022-06-14 20:55:06 -04:00
German Andryeyev 4975f69337 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
2022-06-14 12:18:34 -04:00
German Andryeyev 830898753d SWDEV-336024 - Clear device heap to 0 in ROCr path
Change-Id: Id100ca6d6d5bd7fb16ca8c98ff0b12c9df1d69ab
2022-05-20 11:51:08 -04:00
German Andryeyev 07c1b9a998 SWDEV-336024 - Clear device heap to 0
This reverts commit 04bfd93569.

Reason for revert: Fix regressions

Change-Id: I7d883e1c3cbd27bb64b581ec800243ad7dfe24fd
2022-05-19 09:10:08 -04:00
German Andryeyev 04bfd93569 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
2022-05-11 11:03:56 -04:00
Christophe Paquot b4645c7d4e SWDEV-322620 - Virtual Memory Management
Add a virtualMemoryManagement_ flag to device.info.

Change-Id: Iabd039010d83fc51b4bcef600c609f5c65e7b1ae
2022-05-09 22:54:42 -07:00
Julia Jiang b7c7917256 SWDEV-334574 - Rename _bkendDevice in VDI
Change-Id: I1c04dad226e08f02bca11fa0d1981fafa7ea2d2a
2022-04-27 11:21:24 -04:00
Sarbojit Sarkar 6b15e0a1cc SWDEV-333438 - Fix for hipEnablePeerAccess segfault
Change-Id: I60720d1d9b9c522d15fe17dcfbc609571a4fd266
2022-04-26 05:21:52 -04:00
Christophe Paquot 67657d6099 SWDEV-322620 - Virtual Memory Management
Implement map/unmap for PAL backend
Create commands since PAL uses the IQueue to map/unmap

Change-Id: I97e26a7d28ae5e10774c9ca65307153100945621
2022-04-22 18:09:26 -04:00
sdashmiz 15f1632dfa 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
2022-04-22 08:53:16 -04:00
Saleel Kudchadker 8864e53265 SWDEV-333237 - Disable cache status
Enable Cache status only for ROC_EVENT_NO_FLUSH

Change-Id: I0de4c5af2226bccd66fd704be23c2db33050f2e2
2022-04-20 18:12:33 -04:00
Christophe Paquot b5f555f9ec SWDEV-322620 - Virtual Memory Management
Adding virtual memory management APIs to rocclr.
The HIP layer will handle virtual allocs on devices.

Change-Id: Ia978f105c2c3fed3959c77580ba228e845105754
2022-04-15 00:10:02 -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
German Andryeyev 28597ec5b5 SWDEV-328670 - Enable arena for ROCr interops
Add ROCR memory detection and enable arena mem object for possible
access in HIP

Change-Id: Icf86ac789176bfee4ea8d36b0970a817d4c6a2f7
2022-03-30 16:46:36 -04:00
Saleel Kudchadker 61d0b999be SWDEV-301947 - Report regular CU count for OpenCL
Change-Id: I3ea058bba98f3c6554cbde37173bbd772f489cf5
2022-03-29 16:19:14 -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
German Andryeyev 3af3fe10de 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
2022-03-21 16:17:22 -04:00
Sarbojit Sarkar 3c2dc1f646 SWDEV-325708 - Query for FineGrained support
Change-Id: Idd20a71467595ab6577bf47c081c437a4b166988
2022-03-16 05:09:42 -04:00
German Andryeyev 7b114a2b8b SWDEV-307185 - Create heap for device memory allocator
Pass the allocated heap with the kernel arguments

Change-Id: Icdec09b7f937845c39e21cbca7071dc3ba791af9
2022-03-04 00:44:41 -05:00
Saleel Kudchadker e888c9e491 SWDEV-301947 - Rename device Info element
Rename maxBoostComputeUnits to maxPhysicalComputeUnits_.

Change-Id: I5941515ac4f1f4348b3b10478bf4e01444f0a864
2022-02-25 16:48:15 -08:00
Saleel Kudchadker c02d3fd7d8 SWDEV-301667 - Fix maxNode size for get_mempolicy
Change-Id: Ifd84c94394b86580cf39178ad0e7f85580b24edb
2022-02-19 12:48:22 -05:00
Satyanvesh Dittakavi 824704c87b SWDEV-317716 - Add uuid in device info structure
Change-Id: Ie7f48d0faf7d722bd9bb8bd0f8962a7832dbe4f6
2022-02-03 12:17:28 -05:00
Saleel Kudchadker 33aca5a4a6 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
2022-01-31 12:57:50 -05:00
Satyanvesh Dittakavi e20dd61932 SWDEV-306939 - Fix vdi errors/warnings by CppCheck
Change-Id: I56d910f8363787f1050d5d7e8064ed553c5827fd
2022-01-12 00:22:16 -05:00
Julia Jiang 376ea1e293 SWDEV-308644 - reorganize extra blit kernel in PAL stack
Change-Id: I9d853e8d417ef75b522184d83646ec4b9fa8669b
2021-12-07 14:55:20 -05:00
Satyanvesh Dittakavi 9dabdcdc3e SWDEV-309286 - save the max system mem size in device info
Change-Id: I9955625aca6ceda059aef6354d909de636b610ba
2021-12-02 10:59:07 -05:00
Julia Jiang f5c9ad5b1d SWDEV-308644 - merge roc blit kernels
Change-Id: I378e511959fe17c03fa45066022e9670a4d181f0
2021-11-25 10:07:51 -05:00
Saleel Kudchadker b192beea52 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
2021-11-19 04:42:42 -05:00
Julia Jiang ef3d6f7b28 SWDEV-308644 - update blit kernel setup in rocm
Change-Id: Iaa9ff97b3ed7d379189c359696be932a83cf203c
2021-11-15 13:28:07 -05:00