Graf commitů

71336 Commity

Autor SHA1 Zpráva Datum
Xie, AlexBin c877be2afe rocr: make sure the member variable is conctructed (#1387)
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
2025-11-05 17:19:33 -05:00
alexxu-amd a330fb6b91 fix latest docs doesn't get synchronized issue (#1714) 2025-11-05 17:08:19 -05:00
Joseph Macaranas 865a8d4d59 Revert "Update amdgpu-windows-interop with latest changes (#1718)" (#1725)
This reverts commit 321e497048.
2025-11-05 15:38:23 -05:00
systems-assistant[bot] 321e497048 Update amdgpu-windows-interop with latest changes (#1718)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-11-05 21:13:32 +01:00
lancesix 280cda3196 clr: SWDEV-547890 - Maintain an MQD for the emulated AQL queue (#1669)
* clr: SWDEV-547890 - Maintain an MQD for the emulated AQL queue

To simplify the shader debugger implementation, maintain the relevant
parts of the emulated AQL queue's MQD (amd_queue_t): read_dispatch_id,
write_dispatch_id, compute_tmpring_size.

With this MQD, the shader debugger can handle the emulated AQL queue
the same way it does the real AQL queue, no specialization is required.

* clr: SWDEV-547890 - Conservatively update the MQD's read_dispatch_id

The read_dispatch_id cannot be smaller than the current aql_packet_id
- hsa_queue.size for the debugger to work correctly.

The read_dispatch_id really should be updated when the CmdBuf is marked
as complete. Left a FIXME to address it in a future commit.

---------

Co-authored-by: Laurent Morichetti <laurent.morichetti@amd.com>
2025-11-05 17:39:33 +00:00
Rakesh Roy 8797bb0150 Revert "SWDEV-562996 - Build fix: Ubertrace callback calling convention mismatch on x86 (#1587)" (#1717)
This reverts commit 8d31383dfe.

Reason for revert: It is breaking TheRock build on Windows
2025-11-05 11:48:02 -05:00
Apurv Mishra eded1f3529 rocrtst: Add check for SVM support in Runtime (#1687)
Signed-off-by: Apurv Mishra <Apurv.Mishra@amd.com>
Approved-by: David Yat Sin <David.YatSin@amd.com>
2025-11-05 11:36:38 -05:00
Galantsev, Dmitrii 982737a852 Fix missing iomanip and cstdio in tests
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2025-11-05 10:14:19 -06:00
Galantsev, Dmitrii 87ace88e72 Fix missing iomanip and cstdio in tests
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 982737a852]
2025-11-05 10:14:19 -06:00
MachineTom 3b1c0c3464 SWDEV-558845 - Support image in rocr on Windows (#1582)
Enable image build in Windows.
Remove some useless codes that fail building in Windows.
Some minor improvement.
Temporarily exclude mipmap test files.
Prevent negative tests affect some tests.
Move some catch info log codes into failed cases.
2025-11-05 09:33:41 -05:00
yangsu13 3c17717624 librocdxg: Remove std::call_once to fix repeated libdxcore.so loading failures
The use of std::call_once caused the initialization flag to be set permanently,
preventing proper re-attempts to load libdxcore.so when needed. This change removes
the once_flag mechanism and relies solely on dxcore_handle_ checks to manage library
loading, allowing proper re-initialization attempts.

Signed-off-by: yangsu13 <Yang.Su2@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui 1bc5af684c update hsa header
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui a32d71124f librocdxg: implement stub hsaKmtAisReadWriteFile
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Chengjun Yao b5dd613ccd librocdxg: Integrate DXCore loader into WDDM thunks
Replace direct D3DKMT API calls with DXCORE_CALL macro in WDDM
thunk layer. This enables dynamic loading of DXCore functions
while maintaining the same API interface.

Updated thunk functions:
- MapGpuVirtualAddress, CreateAllocation, DestroyAllocation
- ReserveGpuVirtualAddress, FreeGpuVirtualAddress
- MakeResident, Evict, ShareObjects
- QueryResourceInfoFromNtHandle, OpenResourceFromNtHandle

All existing functionality is preserved while adding flexibility
for runtime DXCore availability detection.

Signed-off-by: Chengjun Yao <Chengjun.Yao@amd.com>
Signed-off-by: Yang Su <Yang.Su2@amd.com>
Reviewed-by: Shi.Leslie <Yuliang.Shi@amd.com>
2025-11-05 18:53:37 +08:00
Chengjun Yao 15ff43c4ce librocdxg: Integrate DXCore loader into WDDM thunks
Replace direct D3DKMT API calls with DXCORE_CALL macro in WDDM
thunk layer. This enables dynamic loading of DXCore functions
while maintaining the same API interface.

Updated thunk functions:
- MapGpuVirtualAddress, CreateAllocation, DestroyAllocation
- ReserveGpuVirtualAddress, FreeGpuVirtualAddress
- MakeResident, Evict, ShareObjects
- QueryResourceInfoFromNtHandle, OpenResourceFromNtHandle

All existing functionality is preserved while adding flexibility
for runtime DXCore availability detection.

Signed-off-by: Chengjun Yao <Chengjun.Yao@amd.com>
Signed-off-by: Yang Su <Yang.Su2@amd.com>
Reviewed-by: Shi.Leslie <Yuliang.Shi@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui bf818a2e75 librocdxg: update rocr queue type to amd_queue_v2_t
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Chengjun Yao c8fbb93f03 librocdxg: Remove static DXCore library dependency
Remove static linking to libdxcore library from CMakeLists.txt.
This prepares for dynamic loading implementation and eliminates
hard dependency on DXCore being present at build time.

The DXCore functionality will be loaded dynamically at runtime
in subsequent patches, making the library more flexible for
different deployment scenarios.

Signed-off-by: Chengjun Yao <Chengjun.Yao@amd.com>
Signed-off-by: Yang Su <Yang.Su2@amd.com>
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Shi.Leslie <Yuliang.Shi@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui 28c81cffda librocdxg: include rocr headers
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui 3149006d29 librocdxg: update rocr queue type to amd_queue_v2_t
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui 25c2b74037 librocdxg: add rocr header files
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui c5d2a0040e librocdxg: load rocr symbols
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui 99da7e60ec wsl/libhsakmt: adapt to the new check for kernel object
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/99>
2025-11-05 18:53:37 +08:00
Flora Cui 45cc96aeb8 librocdxg: include rocr headers
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui e2a1f0c7fc wsl/libhsakmt: refactor handling of kmd priv data
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/98>
2025-11-05 18:53:37 +08:00
Flora Cui 3915c38957 librocdxg: rename hsakmt to rocdxg
Signed-off-by: Flora Cui <flora.cui@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui 0e8f794b1c wsl/libhsakmt: simplify adapter_info
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/97>
2025-11-05 18:53:37 +08:00
Flora Cui c5d7d487dc wsl/libhsakmt: adapt to the new check for kernel object
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/99>
2025-11-05 18:53:37 +08:00
Flora Cui 70b9951b0c wsl/libhsakmt: refactor WDDMDevice creation
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/95>
2025-11-05 18:53:37 +08:00
Flora Cui 72cbeeff6d wsl/libhsakmt: refactor handling of kmd priv data
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/98>
2025-11-05 18:53:37 +08:00
Flora Cui 838421c540 wsl/libhsakmt: refactor check for supported device
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/95>
2025-11-05 18:53:37 +08:00
Flora Cui c3f022822b wsl/libhsakmt: add !atomic handling for vender specific packet
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>q
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/97>
2025-11-05 18:53:37 +08:00
Flora Cui 887056d64a wsl/libhsakmt: remove redundant #include "libhsakmt.h"
move libhsakmt.h inclusion to he makefile

Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/95>
2025-11-05 18:53:37 +08:00
Flora Cui 1217d4eae7 wsl/libhsakmt: simplify adapter_info
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/97>
2025-11-05 18:53:37 +08:00
tiancyin 575e25b7e4 wsl/libhsakmt: move IPC functions from device to thunk runtime
IPC use system memory, it has nothing to do with wddm device.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui 15b8ce7529 wsl/libhsakmt: fix handling of HSA_OVERRIDE_GFX_VERSION option
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/96>
2025-11-05 18:53:37 +08:00
tiancyin 3e40beb68c wsl/libhsakmt: move ReserveGpuVirtualAddress from device to thunk runtime
For multi-GPU supporting, local heap and system heap managers are
implemented in thunk runtime, so the heap allocation function
ReserveGpuVirtualAddress should be moved to runtime too.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:37 +08:00
Flora Cui d520b11006 wsl/libhsakmt: refactor WDDMDevice creation
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/95>
2025-11-05 18:53:37 +08:00
Flora Cui e0f40ae8d4 wsl/libhsakmt: refactor check for supported device
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/95>
2025-11-05 18:53:37 +08:00
Flora Cui b39d8a7487 wsl/libhsakmt: remove redundant #include "libhsakmt.h"
move libhsakmt.h inclusion to he makefile

Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/95>
2025-11-05 18:53:37 +08:00
Flora Cui e41b405f53 wsl/libhsakmt: fix hsaKmtRuntimeDisable ret value
As ROCR exclusively accepts HSAKMT_STATUS_SUCCESS. returning any other
value is treated as an error and will trigger an exit due to failure.

Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/95>
2025-11-05 18:53:37 +08:00
Flora Cui e99fcfee51 wsl/libhsakmt: remove redundant PAGE_SHIFT
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/95>
2025-11-05 18:53:37 +08:00
Chengjun Yao c16ea5e561 wsl/libhskmt: Remove scratch_backing_memory_byte_size
Signed-off-by: Chengjun Yao <Chengjun.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/93>
2025-11-05 18:53:37 +08:00
Horatio Zhang 5c16eddc67 wsl/libhsakmt: update WIN_KMD_VERSION to 25.20
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/92>
2025-11-05 18:53:37 +08:00
Flora Cui 6ffd750632 wsl/libhsakmt: fix return value for hsaKmtUnmapMemoryToGPU
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/89>
2025-11-05 18:53:37 +08:00
Flora Cui 23bc53e9a8 wsl/libhsakmt: fix abused memory flag in allocation_map_
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/89>
2025-11-05 18:53:37 +08:00
tiancyin ccc3849de8 wsl/libhsakmt: move IPC functions from device to thunk runtime
IPC use system memory, it has nothing to do with wddm device.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:37 +08:00
tiancyin 8c6a4d59d4 wsl/libhsakmt: move ReserveGpuVirtualAddress from device to thunk runtime
For multi-GPU supporting, local heap and system heap managers are
implemented in thunk runtime, so the heap allocation function
ReserveGpuVirtualAddress should be moved to runtime too.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:37 +08:00
tiancyin 593e919bcd wsl/libhsakmt: move handle aperture from device to thunk runtime
In multi-GPU, handle aperture is shared between all GPUs, not belongs to
specific one GPU, so move it from wddm device (which presents a specific GPU)
to thunk runtime which has gloable view, can manage handle aperture for all GPUs.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:36 +08:00
tiancyin f8d1663b39 wsl/libhsakmt: move handle aperture from device to thunk runtime
In multi-GPU, handle aperture is shared between all GPUs, not belongs to
specific one GPU, so move it from wddm device (which presents a specific GPU)
to thunk runtime which has gloable view, can manage handle aperture for all GPUs.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:36 +08:00
tiancyin 557f888e1c wsl/libhsakmt: move system heap from device to thunk runtime
In multi-GPU, system heap space is shared between all GPUs, not belongs to
specific one GPU, so move it from wddm device (which presents a specific GPU)
to thunk runtime which has gloable view, can manage system heap for all GPUs.

Introduce a new va_Mgr instance to manage system heap, since local heap
and system heap both comply with SVM(Shared Virtual Memory), without
this new mgr, every allocation has to call KMD at least once (each GPU
needs a call) to allocate GPU VA, the new mgr manage the space itself,
no longer call KMD.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:36 +08:00