From a8af1e5e56881dd6843fbd082ef615b1147acd22 Mon Sep 17 00:00:00 2001 From: shaoyunl Date: Fri, 16 Nov 2018 11:16:04 -0500 Subject: [PATCH] Thunk: make scratch memory only map to its own GPU Map scratch memory to the GPU that specified when allocate the memory Change-Id: I788f9ef0dccb63b894a75e75cac5f94a60d7ec48 Signed-off-by: shaoyunl [ROCm/ROCR-Runtime commit: 29b45b8c0a880cea4525539767107b88eb23bf3a] --- projects/rocr-runtime/src/fmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/src/fmm.c b/projects/rocr-runtime/src/fmm.c index fdca89067f..28f59c4427 100644 --- a/projects/rocr-runtime/src/fmm.c +++ b/projects/rocr-runtime/src/fmm.c @@ -2494,7 +2494,7 @@ static int _fmm_map_to_gpu_scratch(uint32_t gpu_id, manageable_aperture_t *apert /* map to GPU */ - ret = _fmm_map_to_gpu(aperture, address, size, NULL, NULL, 0); + ret = _fmm_map_to_gpu(aperture, address, size, NULL, &gpu_id, sizeof(uint32_t)); if (ret != 0) __fmm_release(obj, aperture);