Skip to content

Commit f4b0715

Browse files
authored
Merge pull request #1044 from ldorau/Fix_use_cuda_device_handle_in_cu_memory_provider_initialize
Fix: use cuda_device_handle in cu_memory_provider_initialize
2 parents 40d0ebe + 279b6bf commit f4b0715

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/provider/provider_cuda.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2024 Intel Corporation
2+
* Copyright (C) 2024-2025 Intel Corporation
33
*
44
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
55
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -313,7 +313,7 @@ static umf_result_t cu_memory_provider_initialize(void *params,
313313
CUmemAllocationProp allocProps = {0};
314314
allocProps.location.type = CU_MEM_LOCATION_TYPE_DEVICE;
315315
allocProps.type = CU_MEM_ALLOCATION_TYPE_PINNED;
316-
allocProps.location.id = cu_provider->device;
316+
allocProps.location.id = cu_params->cuda_device_handle;
317317
CUresult cu_result = g_cu_ops.cuMemGetAllocationGranularity(
318318
&min_alignment, &allocProps, CU_MEM_ALLOC_GRANULARITY_MINIMUM);
319319
if (cu_result != CUDA_SUCCESS) {

0 commit comments

Comments
 (0)