Commit Graph

181 Commits

Author SHA1 Message Date
Six, Lancelot 7b72c1b786 SWDEV-517078 - Update 2nd level trap handlers (#148)
* SWDEV-517078 - Maintain the trap handler ABI version in CLR

The trap handler ABI version is communicated to the debugger using
the r_version field in the r_debug structure.  This structure is
an external dependency, which makes it complicated to keep the trap
handler source (in CRL) and the ABI version number (external dependency)
in sync.

This patch proposes to patch the trap handler ABI version number in
_amdgpu_r_debug before communicating it to the debugger.

We can't directly include sc's executable.hpp file in CRL as it relies
on conflicting definition of ELF related types, so instead we need to
rely on a-priori knowledge on the r_debug structure.  Fortunately, this
structure is part of a stable ABI, so its layout is guaranteed to be
kept stable.

Update the 2nd level trap handler to follow updates from the
ROCr-runtime.  The trap handlers are stripped from parts dedicated to
architectures unsupported by CLR.

Bump the r_debug.r_version to track the ABI changes in the trap handler.
2025-04-11 18:59:54 +01:00
Patel, Jaydeepkumar b5c9cbc236 SWDEV-508632 - Align address to 2 MBs for hidden heap allocation. (#29) 2025-04-02 16:33:29 +05:30
agunashe ea804e16f8 SWDEV-507967 - Deprecate gfx9, gfx8, gfx7 on Windows
PAL_CLIENT_INTERFACE_MAJOR_VERSION from 872 --> 910

Change-Id: I03dfa2924ccdae4c2f13f09d5f34ee58298e1343
2025-02-17 02:59:41 -05:00
taosang2 d82d6a78cf SWDEV-479958 - Support different address mode
Support different address modes in X, Y, Z directions

Change-Id: If1db5a8af33c92dd14b48968c3e8eceb97daea6c
2024-12-23 16:39:54 -05:00
Gerardo Hernandez 03e4057fce SWDEV-496392 - Remove references to ASIC Polaris22 in pal::Settings and pal::Device (it is being retired)
Change-Id: I6318abf3e46ed250d087a3d2266d2ae3d4c8c000
2024-12-10 06:01:32 -05:00
Jaydeep Patel 4aa52155ee SWDEV-491149 - OCL does not need to update scratch as it can't update stack size using API unlike hipDeviceSetLimit.
for HIP, Update should be only if compiler notifies use of stack size.

Change-Id: Ic781bcac6fcf586da39ec4aafd4809da3652ede3
2024-11-01 01:05:07 -04:00
Anusha GodavarthySurya b498103f9b SWDEV-485904 - propagate hsa_amd_vmem_address_free error to hip API
Unit_hipMemSetAccess_GrowVMM test fails with
HSA_STATUS_ERROR_RESOURCE_FREE silently

Change-Id: I7a78410e432de4a2e877062782abf8761645f392
2024-10-21 10:12:32 -04:00
Jaydeep Patel 292842ad28 SWDEV-471422 - Free memory being double deducted on APUs due to system_total_alloced var holds local memory.
Change-Id: I3fbbc8f8aaa156881ff95cad6a4f82fd3df651d1
2024-10-04 04:49:20 -04:00
Rahul Manocha 9da90fe848 SWDEV-487903 - Fix for Empty Kernel Segfault in PAL
Change-Id: Ia1c19cf4ea24188cdb2d374b07f975f794e02dba
2024-09-30 13:00:15 -04:00
kjayapra-amd 12a39fbf22 SWDEV-480772 - Remove name variable from amd::Monitor class.
Change-Id: Ie2a4fa44f485786227230f8a892e090e718aa30e
2024-09-19 11:55:01 -04:00
Daniel Livingston e550032d25 SWDEV-77148 - Add UberTrace support to PAL device
This PR adds UberTrace-based tracing support to ROCclr's PAL device class.
Legacy RGP-based tracing is still available and is the default.
If UberTrace support is enabled tool-side, this new code path will activate.

Change-Id: I268b2dcef70e850a50e2caef8355f38bf51d4641
2024-09-17 16:06:37 -04:00
Jaydeep Patel 9c90bc43a5 SWDEV-475938 - Update dynamic stack in submit kernel internal.
Change-Id: I816bf9cfe8aaac5486ff3b719dbdc4f4d6134e01
2024-09-11 00:59:45 -04:00
kjayapra-amd 6211037f63 SWDEV-439234 - Access check before memcpy and kernel operations.
Change-Id: I7057125c03460db205409e19980145298c190fe2
2024-09-06 14:30:00 -04:00
kjayapra-amd 2a9cb89228 SWDEV-478099 - Fix multiple mapping case on PAL/Windows backend.
Change-Id: Id1fe7939fbf90649cda1848890b3b4ca9a1fcd00
2024-08-27 11:19:39 -04:00
German Andryeyev 1bac09ea20 SWDEV-469602 - Focre unaligned memory mode with RDP
Change-Id: I770f3dc8dde49d8e4ecdf5c38819e44df3960bce
2024-07-23 18:31:52 -04:00
German Andryeyev 4c763e45a1 SWDEV-470585 - Disable double copy in HIP
- HIP path doesn't support resource tracking. Thus, double copy can't be enabled,
because it requires resource tracking.

Change-Id: I0f9c4e185b5b2d2b1abde041fca21bb099db9ccd
2024-07-19 18:32:34 -04:00
kjayapra-amd 11817b4405 SWDEV-439234 - Implement Set/Get Access APIs in PAL/Windows.
Change-Id: I997c330880da70c5128b187e1ef4d9c449218880
2024-07-19 10:42:41 -04:00
kjayapra-amd e7a7feb273 SWDEV-464828 - Initial implementation of VMM IPC on PAL/Windows.
Change-Id: I3d5e148fad9105704db6724b00df06bef4fc9d2f
2024-07-16 10:38:35 -04:00
Jaydeep Patel c03ccdb9b9 SWDEV-461702 - Disable interprocess for >3GBs local memory due to PAL failure.
Change-Id: I211d4de2e04a45148b92d256378516d2f79e210a
2024-06-14 00:12:21 -04:00
Ioannis Assiouras 8f42ad6aa3 SWDEV-464648 - code and comment cleanups
Change-Id: I5ba3f1bff500b3cd5903c2f441017735e688f83f
2024-06-07 22:38:09 +01:00
Ioannis Assiouras 775dc204aa SWDEV-463865 - changed device,roc and pal namespaces to be nested under amd
Change-Id: Icad342843c039c634e249a13a7aa31400730b1dd
2024-06-07 12:23:06 -04:00
kjayapra-amd 931431fc38 SWDEV-417091 - Disable GWS Init for PAL/Windows side.
Change-Id: Ib6295f063daa835c1f33f21f50c083241a9026ff
2024-05-28 06:31:10 +00:00
German Andryeyev 9fdddb7c5d SWDEV-447691 - Correct handle type for DX12 semaphore
Change-Id: Id23882286cb2a0d0472964ffc501ab27b7dc7f00
2024-04-25 11:24:56 -04:00
Rakesh Roy fb217fa9e0 SWDEV-453180 - Add UUID support for HIP_VISIBLE_DEVICES on Windows
- UUID needs to be specified in the format GPU-<body>, <body> encodes UUID as a 16 chars
- Convert set UUID in HIP_VISIBLE_DEVICES to device index internally
- Then use existing device index logic for HIP_VISIBLE_DEVICES

Change-Id: I654f492a49cd4d7a9b7339360ab558165240caa5
2024-04-20 02:39:19 -04:00
kjayapra-amd d52d16c8e6 SWDEV-413997 - Fixing multiple device cases.
Change-Id: I10ad3fbfca887e92cd81f68392fa1acf753cbd2b
2024-04-13 06:14:03 -04:00
Sourabh Betigeri dbac2976e4 SWDEV-451964 - Limit gpu single allocation percentage for gfx940 only
Change-Id: Iadcdadd734e7aeeb23742e426353defa972d3ad5
2024-04-05 09:43:42 -04:00
cadolphe bc80802c1a SWDEV-446726 - Disable large bar for 32 bit windows
When large bar is enabled, persistent memory leads to overallocation for 32 bit architecture.

Change-Id: Iae39359d8128588de02e42d77fe58e868b8e71fd
2024-04-03 15:36:41 -04:00
cadolphe 47e3ed545d Revert "SWDEV-374668 - Observed one subtest failure in ocltst32"
This reverts commit 60d413a5b9.

Change-Id: I42d6248204107f741a462101f9608e01a7ba91d5
2024-03-02 14:05:44 -05:00
Ajay e643406caa SWDEV-347670 - StreamWait and StreamWrite on Windows
__amd_streamOpsWrite blitkernel in device-libs has only 3 args.
so getting rid of the 4th unused arg (sizeBytes)

Change-Id: I81cc1107f8b424bf58558c93a2495a1b878aef91
2024-02-26 22:45:10 -05:00
German Andryeyev bfa469ddc4 SWDEV-445692 - Query OS for free memory
Latest VidMM can provide free memory available on the system.
Use PAL interface to report free memory on the system instead
of per process.

Change-Id: I0e78b9d340299c16829177a8c5182d21cc353384
2024-02-13 09:53:36 -05:00
kjayapra-amd 7d5b4a8f7a SWDEV-437832 - Changes to update host unified memory and iommuv2 flags.
Change-Id: I88998cf57c21fc446fa28e250f826c607923670b
2024-02-07 06:27:47 -05:00
Ioannis Assiouras 5d322c027a SWDEV-441201,SWDEV-441727 - Move BlitProgram creation after trap handler build
Change-Id: I89199ccc4bdf79940dc6693e07c03115c52bf613
2024-02-05 05:08:11 +00:00
German 85c15d720d SWDEV-438958 - Calculate persistent memory stored in the cache
- Make sure persistent memory from resource cache is properly adjusted
in free memory calculation.

Change-Id: I74ef68975ccde4694fb1cb904617c418e85dfc9f
2024-01-08 10:11:52 -05:00
German 7d661bc7df SWDEV-404889 - Enable debugger interface in PAL
Add GPU_DEBUG_ENABLE to control ttpm behavior. If enabled,
then HW will collect more debug info at some perf cost

Change-Id: Icee0686b903a7b1bd483710b9d611877cd43c6aa
2024-01-02 11:51:42 -05:00
kjayapra-amd ec010e4d2d SWDEV-413997 - Fixing MGPU cases on PAL side by passing Global Context to virtual alloc.
Change-Id: I6614058d1456d199d710b12acd95160a79aa48c8
2023-12-14 11:34:32 -05:00
German Andryeyev fb3dfcf889 SWDEV-436859 - Enable pitch for COPY_HOST_PTR
Original logic didn't use pitch because, abstraction layer had
a sysmem copy without pitch. Since extra sysmem copy was
disabled, the code has to accept pitch values from the app.

Change-Id: Ia9fba7b33ddff4e9109b4e63d0d6afa52f501c8f
2023-12-13 16:50:16 -05:00
taosang2 1faf1a4cb9 SWDEV-431104 - Query atomics attribute in Win
Make hipDeviceAttributeHostNativeAtomicSupported return
right value in Windows

Change-Id: I149a8629769cd0d5848ffefb24f1752678a685b8
2023-11-24 09:16:41 -05:00
German a49d633883 SWDEV-429529 - Allocate glb_ctx_ even for one device
Move context allocation into Device::init() method to simplify the logic and handle
HIP_VISIBLE_DEVICES properly

Change-Id: I0fc6f37c7ae39bedbdad0290295d6794c66d6c54
2023-10-27 15:00:15 -04:00
German 694fe4bedb SWDEV-427689 - Report LUID in Windows
Pass LUID infromation from PAL to HIP device properties.
NodeMask is calculated based on the order of devices in PAL

Change-Id: Ic53707b68b16f392e5284a0105bf1f3941b46653
2023-10-18 15:07:39 -04:00
kjayapra-amd 3ef829939a SWDEV-413997 - Initial VMM changes for ROCm path.
Change-Id: I4405fd7b53182eb4c4622835c811c0dc08461537
2023-10-16 11:29:16 -04:00
Jatin Chaudhary 2989840511 SWDEV-306642 - [ABI Break] Add texture/surface/device capabilities device struct entries
- alias hipGetDeviceProperties to hipGetDevicePropertiesR0600
- alias hipDeviceProp_t to hipDeviceProp_tR0600
- remove gcnArch from new device property struct
- add new requested struct members

Change-Id: If3f5dbef3d608487d9f6f419285f4bf577ea9bf0
2023-10-12 11:16:18 -04:00
taosang2 6398f604b0 SWDEV-299127 - Support External Mipmap
Support hipExternalMemoryGetMappedMipmappedArray().
Add ImageExternalBuffer to differiate ImageBuffer.
Currently we only support tiling_optimal mode as
vulkan driver doesn't provide tiling information.

Change-Id: I7e3524cdde53e4df9f728894bcebf4bd3f58d4d9
2023-10-05 09:58:17 -04:00
German e1d34cb24f SWDEV-404889 - Debugger support, trap handler
Add trap handler code into runtime and compile/load during
device initialization. The current interface for trap handler in
PAL is obsolete and the new interface will be provided later.

Change-Id: I1fa702c5d1f2e6731f781369c980d546cf422328
2023-09-19 16:05:02 -04:00
German bd00826446 SWDEV-3 - Move PAL to version 818
Restore PAL platform destruction.
Update CmdAllocatorCreateInfo::AllocInfo for the new interface.

Change-Id: Iea418eed7ee26166039a4a9cc1999438856e9097
2023-08-29 12:46:28 -04:00
German 077311153a SWDEV-407533 - [ABI Break]Purge unused env vars
Change-Id: I627950e8ebb6299affc602754a20d442dbe42b14
2023-08-24 14:11:40 -04:00
German d97cc0abbd SWDEV-404889 - Inital change for debugger support
- Program unique AQL index for debugger. The logic manages AQL array of packets per HW queue.
- Provide debug state to PAL

Change-Id: I38fa1f5435fa711fd1d44dc391f2e61eb2a25efa
2023-08-23 13:21:58 -04:00
Todd tiantuo Li b4933f1d00 SWDEV-403758 - support new ASIC Revisions for Hawk Point1 and Hawk Point2
Change-Id: Ib8383b16e85abaa0bbf481c1aac71a11cd5b9218
2023-08-18 10:32:09 -04:00
German 618cc4d9ee SWDEV-416527 - Disable PAL platform destruction until a proper fix in PAL
Change-Id: I465aa15959187eb27354caa9b8308f1266be46ed
2023-08-11 10:51:37 -04:00
Todd tiantuo Li 04b9ab49eb SWDEV-333557 - add PAL_HIP_IPC_FLAG for PAL HIP device allocations
Change-Id: I9017f4e3b03d4817bf233c788e30775fb2297589
2023-07-17 08:10:25 -04:00
Todd tiantuo Li 8434feed16 SWDEV-333557 - 1.Add support for IPC memory to enable hipIpcGetMemHandle() and hipIpcOpenMemHandle() in PAL path. Set interprocess flag for device allocations in HIP PAL. 2.Fix PAL IPC path with ResourceCache and SubAllocation 3.Minor fixes for IpcBuffer constructor and IpcAttach 4.Remove redundant checks that may go wrong
Change-Id: Ie9d99847c7c2c7b3b2aaefaaf60d23bf71b68635
2023-07-12 17:49:32 -04:00