What should I set the flags field of CUDA_BATCH_MEM_OP_NODE_PARAMS?

62 views Asked by At

The CUDA graph API exposes a function call for adding a "batch memory operations" node to a graph:

CUresult cuGraphAddBatchMemOpNode (
   CUgraphNode* phGraphNode, 
   CUgraph hGraph, 
   const CUgraphNode* dependencies, 
   size_t numDependencies, 
   const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams 
);

but the documentation for this API call does not explain what the flags field of ... is used for, and what one should set the flags to. So what value should I be passing?

1

There are 1 answers

0
einpoklum On

A related API function is cuStreamBatchMemOp

CUresult cuStreamBatchMemOp (
    CUstream stream, 
    unsigned int count,
    CUstreamBatchMemOpParams* paramArray, 
    unsigned int flags 
);

it essentially takes the fields of CUDA_BATCH_MEM_OP_NODE_PARAMS as its separate parameters. Its documentation says that flags is "reserved for future expansion; must be 0".