76333 İşleme

Yazar SHA1 Mesaj Tarih
Flora Cui b3c685585e wsl/libhsakmt: add .NodeId() in WDDMDevice
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/82>
2025-11-05 18:53:36 +08:00
Flora Cui 006ee57aa3 wsl/libhsakmt: add get_num_wddmdev()
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/82>
2025-11-05 18:53:36 +08:00
Longlong Yao 7855113a9f wsl/libhsakmt: reimplement GetClockCounters
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/80>
2025-11-05 18:53:36 +08:00
tiancyin 83af0bef55 wsl/hsakmt: add more memory type info
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:36 +08:00
Horatio Zhang aeb666c210 wsl/hsakmt: Add w7900d device id
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Reviewed-by: tiancyin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/74>
2025-11-05 18:53:36 +08:00
Chengjun Yao 872476061a wsl/hsakmt: remove unessary struct _HsaVersionCapability
Signed-off-by: Chengjun Yao <Chengjun.Yao@amd.com>
Reviewed-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/73>
2025-11-05 18:53:36 +08:00
Chengjun Yao 13fc35d8de wsl/hsakmt: Configure Capability Info to Disable alloc mem in dev mem
Regardless of whether the HSA_ALLOCATE_QUEUE_DEV_MEM variable is set
in the environment, set the dev_mem_queue_buf_ of the region to false.
This is due to large BAR PCIe being disabled.

Signed-off-by: Chengjun Yao <Chengjun.Yao@amd.com>
Reviewed-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/71>
2025-11-05 18:53:36 +08:00
tiancyin c6627102d3 libhsakmt: fix resource count in memory export
D3DKMTShareObjects() need resource count paramenter not the allocations count.
There is only one resource no matter how many allocations for a buffer.

Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:36 +08:00
Flora Cui aff8e508df wsl/libhsakmt: move PAGE_SIZE/SHIFT to static global var
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/68>
2025-11-05 18:53:36 +08:00
Flora Cui e98a872650 wsl/libhsakmt/openclose: Dynamically allocate static global memory
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/68>
2025-11-05 18:53:36 +08:00
Flora Cui 4c60c0cf65 wsl/libhsakmt/topology: Dynamically allocate static global memory
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/68>
2025-11-05 18:53:36 +08:00
Flora Cui 56553974d0 wsl/libhsakmt/memory: Dynamically allocate static global memory
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/68>
2025-11-05 18:53:36 +08:00
tiancyin 95ec7d5c27 wsl/libhsakmt: remove suballocator's lock
Signed-off-by: tiancyin <tianci.yin@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/68>
2025-11-05 18:53:36 +08:00
Flora Cui 053ea9d2fe wsl/libhsakmt: add more exported symbols
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/67>
2025-11-05 18:53:36 +08:00
Shi.Leslie c3e8645230 wsl/hsakmt: Disable thunk sub-allocator by default
Signed-off-by: Shi.Leslie <Yuliang.Shi@amd.com>
Reviewed-by: Longlong Yao Longlong.Yao@amd.com
2025-11-05 18:53:36 +08:00
tiancyin a343839e3c libhsakmt: work around VaMgr free_list_ size is not 1
In some cases, the upper modules of rocr-runtime did not free all of the
memories at the end of the application's life time, it causes below
error logs:

pid:13066 tid:0x7f08718c4080 [~VaMgr] free_list_ size is not 1.
pid:13066 tid:0x7f08718c4080 [~VaMgr] frag_map_ size is not 1.

Change the log level from debug to info to work around this problem.

Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:36 +08:00
Longlong Yao 875539a4f8 libhsakmt: change to device id for R9700
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/56>
2025-11-05 18:53:36 +08:00
Flora Cui 9489ddb3fe wsl/libhsakmt: correct gfx family id
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/54>
2025-11-05 18:53:36 +08:00
Longlong Yao 334c7d9bac libhsakmt: correct gfx version
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/53>
2025-11-05 18:53:36 +08:00
Longlong Yao eff0a3e893 libhsakmt: add new asic support
It would be changed to correct device id if there is available
release IFWI for Navi48 XTW.

Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: lyndonli <Lyndon.Li@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/49>
2025-11-05 18:53:36 +08:00
Longlong Yao 5b6f63917a libhsakmt: add a check for Windows driver version
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: lyndonli <Lyndon.Li@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/47>
2025-11-05 18:53:36 +08:00
Longlong Yao b016d1e09c libhsakmt: filter AMD asics before QueryAdapterInfo
Signed-off-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: lyndonli <Lyndon.Li@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/45>
2025-11-05 18:53:36 +08:00
Longlong Yao be242bfc46 libhsakmt: change the unit of clock according to kmd version
Windows KMD driver(25.10) has changed the unit of clock from
MHz to KHz.

Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: lyndonli <Lyndon.Li@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/43>
2025-11-05 18:53:36 +08:00
Longlong Yao 65b42fb70a libhsakmt: add support to get driver version number
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Reviewed-by: lyndonli <Lyndon.Li@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/43>
2025-11-05 18:53:36 +08:00
lyndonli b5a9a5c36b wsl/hsakmt: Improve error handling in allocation
This change ensures consistent error
handling across build configurations.

Signed-off-by: lyndonli <Lyndon.Li@amd.com>
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/40>
2025-11-05 18:53:36 +08:00
Longlong Yao f44abf508e wsl/libhsakmt: change device id
Reviewed-by: lyndonli <Lyndon.Li@amd.com>
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/38>
2025-11-05 18:53:36 +08:00
Flora Cui 8c47e25315 wsl: drop libdrm dependency
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Shi.Leslie <Yuliang.Shi@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/2>

wsl/libhsakmt: move drm headers to dedicated directory

to maintain a clean and organized codebase.

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/3>
2025-11-05 18:53:35 +08:00
tiancyin 5f219029c2 wsl/hsakmt: implement ipc signal
IPC Signal only support sys ram backend and CPU&GPU both accessible,
IPC Memory only support vram backend and only GPU accessible.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:35 +08:00
tiancyin fb429237ac wsl/hsakmt: fix incorrect addr info of hsaKmtQueryPointerInfo
rocr runtime will take care of the block offset(ref Runtime::IPCCreate),
just returning the block base is enough in suballocator case.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:35 +08:00
tiancyin 2081ab01e6 wsl/hsakmt: implement ipc mem of rocr non-legacy mode
The legacy mode means buffer sharing through KFD, KFD provide a buffer
id to exporter, exporter pass it to importer, importer pass buffer id
to KFD to query and import this buffer.

The non-legcay mode relys on socket to pass dmabuf fd between processes.

In hsa-runtime, the legcay mode is the default mode, setting environment
variable HSA_ENABLE_IPC_MODE_LEGACY to 0 can force hsa-runtime to new
mode code path.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:35 +08:00
tiancyin f4390637fb wsl/hsakmt: implement ipc signal
IPC Signal only support sys ram backend and CPU&GPU both accessible,
IPC Memory only support vram backend and only GPU accessible.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:35 +08:00
lyndonli b4e6cce204 wsl/hsakmt: Implement fetching of UUID
Signed-off-by: lyndonli <Lyndon.Li@amd.com>
Reviewed-by: Shi.Leslie <Yuliang.Shi@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/25>
2025-11-05 18:53:35 +08:00
tiancyin 29ed03ab0a wsl/hsakmt: forcing enable_ipc_mode_legacy_ to false to support ipc mem
Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:35 +08:00
Flora Cui 4b5a9a0f8c wsl/hsakmt: add ULARGE_INTEGER
for updated d3dukmdt.h

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/22>
2025-11-05 18:53:35 +08:00
tiancyin 390708c594 wsl/hsakmt: implement ipc mem of rocr non-legacy mode
The legacy mode means buffer sharing through KFD, KFD provide a buffer
id to exporter, exporter pass it to importer, importer pass buffer id
to KFD to query and import this buffer.

The non-legcay mode relys on socket to pass dmabuf fd between processes.

In hsa-runtime, the legcay mode is the default mode, setting environment
variable HSA_ENABLE_IPC_MODE_LEGACY to 0 can force hsa-runtime to new
mode code path.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:35 +08:00
Longlong Yao 129da6526c wsl/hsakmt: Add is_dgpu check for wddm device
Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/18>
2025-11-05 18:53:35 +08:00
Horatio Zhang 914a8ecbc0 wsl/hsakmt: Configure Capability Info to Disable Fine-Grained VRAM Management
This fix is for Unit_cache_coherency_cpu_gpu. Regardless of whether the
HSA_FORCE_FINE_GRAIN_PCIE variable is set in the environment, set the user_visible
of the region to false. This applies to the functionality of exposing VRAM as
uncached/fine grain over PCIe or XGMI.

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/34>
2025-11-05 18:53:35 +08:00
Flora Cui 240dc71b91 wsl/hsakmt: move src/inc to include/impl
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/15>
2025-11-05 18:53:35 +08:00
tiancyin ee73fc046e wsl/hsakmt: set to system domain when cpu want to access the buffer
Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:35 +08:00
tiancyin c83aca9878 wsl/hsakmt: fix a typo in FreeSystemHeapSpace
Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
2025-11-05 18:53:35 +08:00
Flora Cui f342af52c5 wsl/hsakmt: fix gpu_mem handle
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/28>
2025-11-05 18:53:35 +08:00
Flora Cui 5db21f53da wsl/hsakmt: add get_gpu_mem()
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/28>
2025-11-05 18:53:35 +08:00
Flora Cui f7d2df7486 wsl/hsakmt: add more gfx1100 asic to kGfxipTable
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/27>
2025-11-05 18:53:35 +08:00
lyndonli 33ea72a993 wsl/hsakmt: Implement fetching of UUID
Signed-off-by: lyndonli <Lyndon.Li@amd.com>
Reviewed-by: Shi.Leslie <Yuliang.Shi@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/25>
2025-11-05 18:53:35 +08:00
Flora Cui 73a64175a1 wsl/hsakmt: fix pci bdf
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: lyndonli <Lyndon.Li@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/24>
2025-11-05 18:53:35 +08:00
Longlong Yao 255069da95 wsl/hsakmt: Add is_dgpu check for wddm device
Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/18>
2025-11-05 18:53:35 +08:00
Longlong Yao 3c3af5c586 wsl/hsakmt: check hsakmt_is_dgpu for hsakmt
To align with Native Linux, use NumCPUCores in GPU and
NumFComputeCores in CPU to determine if the asic is dGPU.

This value is only for libhsakmt internal use.

Reviewed-by: Flora Cui <flora.cui@amd.com>
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/18>
2025-11-05 18:53:35 +08:00
Flora Cui 7734c0baad wsl/hsakmt: move src/inc to include/impl
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/15>
2025-11-05 18:53:35 +08:00
Horatio Zhang ce64cf0314 wsl/hsakmt: Fix conversion warnings by using 0 for Non-Pointers
This patch addresses several compiler warnings related to the use of
NULL with non-pointer types, such as D3DKMT_HANDLE, uint64_t, and uint32_t.

Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>
Reviewed-by: tiancyin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/16>
2025-11-05 18:53:35 +08:00
Flora Cui 9f5bda00ca wsl/hsakmt: refactor topology related code
Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed by: Shi.Leslie <Yuliang.Shi@amd.com>

Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/13>
2025-11-05 18:53:35 +08:00