From 52e6937a0ad2a1aaef6ffd9049c4bc15b37f8116 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 23 Aug 2026 12:03:51 -0700 Subject: [PATCH] Avoid aggregate graph access descriptor initialization --- cuda_core/cuda/core/graph/_graph_node.pyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cuda_core/cuda/core/graph/_graph_node.pyx b/cuda_core/cuda/core/graph/_graph_node.pyx index 4ecce8bb1f9..35a38dfa302 100644 --- a/cuda_core/cuda/core/graph/_graph_node.pyx +++ b/cuda_core/cuda/core/graph/_graph_node.pyx @@ -828,6 +828,7 @@ cdef inline AllocNode GN_alloc(GraphNode self, size_t size, object device, num_deps = 1 cdef vector[cydriver.CUmemAccessDesc] access_descs + cdef cydriver.CUmemAccessDesc access_desc cdef int peer_id cdef list peer_ids = [] @@ -835,11 +836,10 @@ cdef inline AllocNode GN_alloc(GraphNode self, size_t size, object device, for peer_dev in peer_access: peer_id = getattr(peer_dev, 'device_id', peer_dev) peer_ids.append(peer_id) - access_descs.push_back(cydriver.CUmemAccessDesc_st( - cumemlocation_from_id( - cydriver.CUmemLocationType.CU_MEM_LOCATION_TYPE_DEVICE, peer_id), - cydriver.CUmemAccess_flags.CU_MEM_ACCESS_FLAGS_PROT_READWRITE, - )) + access_desc.location = cumemlocation_from_id( + cydriver.CUmemLocationType.CU_MEM_LOCATION_TYPE_DEVICE, peer_id) + access_desc.flags = cydriver.CUmemAccess_flags.CU_MEM_ACCESS_FLAGS_PROT_READWRITE + access_descs.push_back(access_desc) cdef str memory_type_str = "device" if memory_type is None else str(memory_type)