hipmallocasync Interface Reference#
hipfort::hipmallocasync Interface Reference
Allocates memory with stream ordered semantics. More...
Public Member Functions | |
| integer(kind(hipsuccess)) function | hipmallocasync_ (dev_ptr, mysize, stream) |
Detailed Description
Allocates memory with stream ordered semantics.
Inserts a memory allocation operation into stream. A pointer to the allocated memory is returned immediately in *dptr. The allocation must not be accessed until the allocation operation completes. The allocation comes from the memory pool associated with the stream's device.
- Note
- The default memory pool of a device contains device memory from that device.
- Basic stream ordering allows future work submitted into the same stream to use the allocation. Stream query, stream synchronize, and HIP events can be used to guarantee that the allocation operation completes before work submitted in a separate stream runs.
- During stream capture, this function results in the creation of an allocation node. In this case, the allocation is owned by the graph instead of the memory pool. The memory pool's properties are used to set the node's creation parameters.
- Parameters
-
[out] dev_ptr Returned device pointer of memory allocation [in] size Number of bytes to allocate [in] stream The stream establishing the stream ordering contract and the memory pool to allocate from
- Returns
hipSuccess,hipErrorInvalidValue,hipErrorNotSupported,hipErrorOutOfMemory
- See also
- hipMallocFromPoolAsync, hipFreeAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess
- Warning
- This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.
- Note
- This API is implemented on Linux and is under development on Microsoft Windows.
Member Function/Subroutine Documentation
◆ hipmallocasync_()
| integer(kind(hipsuccess)) function hipfort::hipmallocasync::hipmallocasync_ | ( | type(c_ptr) | dev_ptr, |
| integer(c_size_t), value | mysize, | ||
| type(c_ptr), value | stream | ||
| ) |
The documentation for this interface was generated from the following file: