Stream memory operations#
- 
hipError_t hipStreamWaitValue32(hipStream_t stream, void *ptr, uint32_t value, unsigned int flags, uint32_t mask)#
- Enqueues a wait command to the stream.[BETA]. - Enqueues a wait command to the stream, all operations enqueued on this stream after this, will not execute until the defined wait condition is true. - hipStreamWaitValueGte: waits until *ptr&mask >= value - hipStreamWaitValueEq : waits until *ptr&mask == value - hipStreamWaitValueAnd: waits until ((*ptr&mask) & value) != 0 - hipStreamWaitValueNor: waits until ~((*ptr&mask) | (value&mask)) != 0 - See also - hipExtMallocWithFlags, hipFree, hipStreamWaitValue64, hipStreamWriteValue64, hipStreamWriteValue32, hipDeviceGetAttribute - Note - when using hipStreamWaitValueNor, mask is applied on both ‘value’ and ‘*ptr’. - Note - Support for hipStreamWaitValue32 can be queried using ‘hipDeviceGetAttribute()’ and ‘hipDeviceAttributeCanUseStreamWaitValue’ flag. - Warning - This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues. - Parameters:
- stream – [in] - Stream identifier 
- ptr – [in] - Pointer to memory object allocated using hipMallocSignalMemory flag 
- value – [in] - Value to be used in compare operation 
- flags – [in] - Defines the compare operation, supported values are hipStreamWaitValueGte hipStreamWaitValueEq, hipStreamWaitValueAnd and hipStreamWaitValueNor 
- mask – [in] - Mask to be applied on value at memory before it is compared with value, default value is set to enable every bit 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipStreamWaitValue64(hipStream_t stream, void *ptr, uint64_t value, unsigned int flags, uint64_t mask)#
- Enqueues a wait command to the stream.[BETA]. - Enqueues a wait command to the stream, all operations enqueued on this stream after this, will not execute until the defined wait condition is true. - hipStreamWaitValueGte: waits until *ptr&mask >= value - hipStreamWaitValueEq : waits until *ptr&mask == value - hipStreamWaitValueAnd: waits until ((*ptr&mask) & value) != 0 - hipStreamWaitValueNor: waits until ~((*ptr&mask) | (value&mask)) != 0 - See also - hipExtMallocWithFlags, hipFree, hipStreamWaitValue32, hipStreamWriteValue64, hipStreamWriteValue32, hipDeviceGetAttribute - Note - when using hipStreamWaitValueNor, mask is applied on both ‘value’ and ‘*ptr’. - Note - Support for hipStreamWaitValue64 can be queried using ‘hipDeviceGetAttribute()’ and ‘hipDeviceAttributeCanUseStreamWaitValue’ flag. - Warning - This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues. - Parameters:
- stream – [in] - Stream identifier 
- ptr – [in] - Pointer to memory object allocated using ‘hipMallocSignalMemory’ flag 
- value – [in] - Value to be used in compare operation 
- flags – [in] - Defines the compare operation, supported values are hipStreamWaitValueGte hipStreamWaitValueEq, hipStreamWaitValueAnd and hipStreamWaitValueNor. 
- mask – [in] - Mask to be applied on value at memory before it is compared with value default value is set to enable every bit 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipStreamWriteValue32(hipStream_t stream, void *ptr, uint32_t value, unsigned int flags)#
- Enqueues a write command to the stream.[BETA]. - Enqueues a write command to the stream, write operation is performed after all earlier commands on this stream have completed the execution. - See also - hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64 - Warning - This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues. - Parameters:
- stream – [in] - Stream identifier 
- ptr – [in] - Pointer to a GPU accessible memory object 
- value – [in] - Value to be written 
- flags – [in] - reserved, ignored for now, will be used in future releases 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipStreamWriteValue64(hipStream_t stream, void *ptr, uint64_t value, unsigned int flags)#
- Enqueues a write command to the stream.[BETA]. - Enqueues a write command to the stream, write operation is performed after all earlier commands on this stream have completed the execution. - See also - hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64 - Warning - This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues. - Parameters:
- stream – [in] - Stream identifier 
- ptr – [in] - Pointer to a GPU accessible memory object 
- value – [in] - Value to be written 
- flags – [in] - reserved, ignored for now, will be used in future releases 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipStreamBatchMemOp(hipStream_t stream, unsigned int count, hipStreamBatchMemOpParams *paramArray, unsigned int flags)#
- Enqueues an array of stream memory operations in the stream.[BETA]. - Batch operations to synchronize the stream via memory operations. - Warning - This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues. - Parameters:
- stream – [in] - Stream identifier 
- count – [in] - The number of operations in the array. Must be less than 256 
- paramArray – [in] - The types and parameters of the individual operations. 
- flags – [in] - Reserved for future expansion; must be 0. 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipGraphAddBatchMemOpNode(hipGraphNode_t *phGraphNode, hipGraph_t hGraph, const hipGraphNode_t *dependencies, size_t numDependencies, const hipBatchMemOpNodeParams *nodeParams)#
- Creates a batch memory operation node and adds it to a graph.[BETA]. - See also - hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64. hipStreamWriteValue64, hipStreamBatchMemOp - Warning - This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues. - Parameters:
- phGraphNode – [in] - Returns the newly created node 
- hGraph – [in] - Graph to which to add the node 
- dependencies – [in] - Dependencies of the node 
- numDependencies – [in] - Number of dependencies 
- nodeParams – [in] - Parameters for the node 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipGraphBatchMemOpNodeGetParams(hipGraphNode_t hNode, hipBatchMemOpNodeParams *nodeParams_out)#
- Returns a batch mem op node’s parameters.[BETA]. - Returns the parameters of batch mem op node hNode in nodeParams_out. The paramArray returned in nodeParams_out is owned by the node. This memory remains valid until the node is destroyed or its parameters are modified, and should not be modified directly. - See also - hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64. hipStreamWriteValue64. hipGraphBatchMemOpNodeSetParams - Warning - This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues. - Parameters:
- hNode – [in] - Node to get the parameters for 
- nodeParams_out – [in] - Pointer to return the parameters 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipGraphBatchMemOpNodeSetParams(hipGraphNode_t hNode, hipBatchMemOpNodeParams *nodeParams)#
- Sets the batch mem op node’s parameters.[BETA]. - Sets the parameters of batch mem op node hNode to nodeParams. - See also - hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64. hipStreamWriteValue64, hipGraphBatchMemOpNodeGetParams - Warning - This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues. - Parameters:
- hNode – [in] - Node to set the parameters for 
- nodeParams – [in] - Parameters to copy 
 
- Returns:
- hipSuccess, hipErrorInvalidValue 
 
- 
hipError_t hipGraphExecBatchMemOpNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const hipBatchMemOpNodeParams *nodeParams)#
- Sets the parameters for a batch mem op node in the given graphExec.[BETA]. - Sets the parameters of a batch mem op node in an executable graph hGraphExec. The node is identified by the corresponding node hNode in the non-executable graph, from which the executable graph was instantiated. - See also - hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64. hipStreamWriteValue64, hipStreamBatchMemOp - Warning - This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues. - Parameters:
- hGraphExec – [in] - The executable graph in which to set the specified node 
- hNode – [in] - Batch mem op node from the graph from which graphExec was instantiated 
- nodeParams – [in] - Updated Parameters to set 
 
- Returns:
- hipSuccess, hipErrorInvalidValue