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
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
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
tiancyin
0fae2bb262
wsl/hsakmt: add supporting contiguous memory allocation
...
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com >
Signed-off-by: tiancyin <tianci.yin@amd.com >
2025-11-05 18:53:35 +08:00
Flora Cui
4b9ef909b4
wsl/hsakmt: relax the check conditions for the pointer
...
Signed-off-by: Flora Cui <flora.cui@amd.com >
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com >
Reviewed-by: tiancyin <tianci.yin@amd.com >
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/9 >
2025-11-05 18:53:35 +08:00
tiancyin
820f24b4df
wsl/hsakmt: make hsaKmtImportDMABufHandle as internal interface
...
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
15a1702636
wsl/hsakmt: add handle aperture
...
The CLR use memory handle as svm ptr, this cause
problem in BLAS test, add handle aperture to align with native.
Reviewed-by: Longlong Yao <Longlong.Yao@amd.com >
Reviewed-by: Shane Xiao <shane.xiao@amd.com >
Signed-off-by: tiancyin <tianci.yin@amd.com >
2025-11-05 18:53:35 +08:00
tiancyin
b4df74f198
wsl/hsakmt: add sub-allocator
...
Reviewed-by: Shane Xiao <shane.xiao@amd.com >
Reviewed-by: lyndonli <Lyndon.Li@amd.com >
Signed-off-by: tiancyin <tianci.yin@amd.com >
2025-11-05 18:53:35 +08:00
Flora Cui
b062a23dfa
wsl/hsakmt: add mem flag to protect queue cmd buffer
...
Signed-off-by: Flora Cui <flora.cui@amd.com >
2025-11-05 18:53:35 +08:00
Horatio Zhang
6d5324c957
wsl/hsakmt: Standardize warning logging with pr_warn_once
...
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com >
Reviewed-by: Flora Cui <flora.cui@amd.com >
Reviewed-by: Shane Xiao <shane.xiao@amd.com >
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/40 >
2025-11-05 18:53:35 +08:00
Horatio Zhang
c52d47b644
wsl/hsakmt: Standardize debug logging with pr_debug
...
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com >
Reviewed-by: Flora Cui <flora.cui@amd.com >
Reviewed-by: Shane Xiao <shane.xiao@amd.com >
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/40 >
2025-11-05 18:53:35 +08:00
lyndonli
c898104228
wsl/hsakmt: Introduce WSL_CHECK_AVAIL_SYSRAM environment variable
...
By default, this variable is 0. Set it to 1 to compare available
system memory with the requested amount before allocation. It helps
identify system hangs caused by excessive memory allocation.
Signed-off-by: lyndonli <Lyndon.Li@amd.com >
Reviewed-by: Flora Cui <flora.cui@amd.com >
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/32 >
2025-11-05 18:53:35 +08:00
tiancyin
efd0158724
wsl/hsakmt: use GpuMemory object address as va in physical memory handle case
...
Signed-off-by: tiancyin <tianci.yin@amd.com >
2025-11-05 18:53:35 +08:00
Flora Cui
3f66ce03f8
wsl/hsakmt: implement hsaKmtRegisterGraphicsHandleToNodesExt
...
Signed-off-by: Flora Cui <flora.cui@amd.com >
2025-11-05 18:53:35 +08:00
Longlong Yao
48395b2295
wsl/hsakmt: rename rocr_proxy to thunk_proxy
...
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com >
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/26 >
2025-11-05 18:53:35 +08:00
Longlong Yao
c6fe6807e8
wsl/hsakmt: Set uncached for kernel arg region
...
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/libhsakmt/-/merge_requests/5 >
2025-11-05 18:53:35 +08:00
lyndonli
bc9b11d754
wsl/hsakmt: Remove pre-allocation free memory check
...
This change removes the check for sufficient free memory before allocation.
The previous check could cause performance degradation. Reserving a portion
of system memory helps prevent system hangs due to insufficient memory.
However, if free memory is still insufficient, memory allocation may still
lead to system hangs.
Signed-off-by: lyndonli <Lyndon.Li@amd.com >
Reviewed-by: Flora Cui <flora.cui@amd.com >
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/10 >
2025-11-05 18:53:35 +08:00
tiancyin
90759bc89a
wsl/hsakmt: implement vmm
...
Reviewed-by: Shi.Leslie <Yuliang.Shi@amd.com >
Reviewed-by: Aaron Liu <aaron.liu@amd.com >
Signed-off-by: tiancyin <tianci.yin@amd.com >
2025-11-05 18:53:35 +08:00
tiancyin
d00c4446e9
wsl/hsakmt: just reserve SVM virtual memory for scratch pool
...
the allocation from InitScratchPool() does not really need VRAM
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
b4b0b54c79
wsl/hsakmt: Add clear_allocation_map
...
If fork() is called, clear allocation map
that is invalid in the child process.
Signed-off-by: lyndonli <Lyndon.Li@amd.com >
Reviewed-by: Shi.Leslie Yuliang.Shi@amd.com
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/3 >
2025-11-05 18:53:35 +08:00
Longlong Yao
ccb3950068
wsl/hsakmt: clean up namespace
...
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com >
Reviewed-by: lyndonli <Lyndon.Li@amd.com >
Reviewed-by: Flora Cui <flora.cui@amd.com >
Part-of: <http://10.67.69.192/wsl/libhsakmt/-/merge_requests/7 >
2025-11-05 18:53:35 +08:00
Flora Cui
79a63cf292
wsl/hsakmt: initial commit
...
Signed-off-by: lyndonli <Lyndon.Li@amd.com >
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com >
Signed-off-by: Shi.Leslie <Yuliang.Shi@amd.com >
Signed-off-by: LonglongYao <Longlong.Yao@amd.com >
Signed-off-by: tiancyin <tianci.yin@amd.com >
Signed-off-by: Frank Min <Frank.Min@amd.com >
Signed-off-by: Aaron Liu <aaron.liu@amd.com >
Signed-off-by: Shane Xiao <shane.xiao@amd.com >
Signed-off-by: Lang Yu <lang.yu@amd.com >
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Ruili Ji <ruiliji2@amd.com >
Signed-off-by: Qiang Yu <qiang.yu@amd.com >
Signed-off-by: Flora Cui <flora.cui@amd.com >
2025-11-05 18:53:15 +08:00