Internal use only. This API may change in the future
Pre-Compiled header for online compilation
@brief Pop configuration of a kernel launch.
@brief Push configuration of a kernel launch.
Attempt to identify the HIP installation path from the
HIP_PATH
environment variable, or if that isn’t available or doesn’t exist, use the
DEFAULT_HIP_PATH
.
@defgroup Callback Callback Activity APIs
@{
This section describes the callback/Activity of HIP runtime API.
@brief Binds a mipmapped array to a texture.
@brief Device which matches hipDeviceProp_t is returned
@}
/
/**
@brief Creates a texture object.
@}
/
/**
@brief Destroy a HIP context.
@brief Disable direct access from current context’s virtual address space to memory allocations
physically located on a peer context.Disables direct access to memory allocations in a peer
context and unregisters any registered allocations.
@brief Enables direct access to memory allocations in a peer context.
@brief Returns the approximate HIP api version.
@brief Set Cache configuration for a specific function
@brief Get the handle of the current/ default context
@brief Get the handle of the device associated with current/default context
@brief Return flags used for creating default context.
@brief Get Shared memory bank configuration.
@brief Pop the current/default context and return the popped context.
@brief Push the context to be set as current/ default context
@brief Set L1/Shared cache partition.
@brief Set the passed context as current/default
@brief Set Shared memory bank configuration.
@brief Blocks until the default context has completed all preceding requested tasks.
@brief Destroys an external memory object.
@brief Destroys an external semaphore object and releases any references to the underlying resource. Any outstanding signals or waits must have completed before the semaphore is destroyed.
@brief Destroys a texture object.
@}
/
/**
@brief Returns the compute capability of the device
@param [out] major
@param [out] minor
@param [in] device
@brief Disable direct access from current device’s virtual address space to memory allocations
physically located on a peer device.
@brief Enable direct access from current device’s virtual address space to memory allocations
physically located on a peer device.
@brief Returns a handle to a compute device
@param [out] device
@param [in] ordinal
@brief Query for a specific device attribute.
@brief Returns a handle to a compute device.
@param [out] device handle
@param [in] PCI Bus ID
@brief Get Cache configuration for a specific Device
@brief Returns the default memory pool of the specified device
@brief Get the mem attribute for graphs.
@brief Get Resource limits of current device
@brief Gets the current memory pool for the specified device
@brief Returns an identifer string for the device.
@param [out] name
@param [in] len
@param [in] device
@brief Returns a value for attr of link between two devices
@param [out] value
@param [in] attr
@param [in] srcDevice
@param [in] dstDevice
@brief Returns a PCI Bus Id string for the device, overloaded to take int device ID.
@param [out] pciBusId
@param [in] len
@param [in] device
@brief Returns bank width of shared memory for current device
@brief Returns numerical values that correspond to the least and greatest stream priority.
@brief Returns an UUID for the device.[BETA]
@param [out] uuid
@param [in] device
@brief Free unused memory on specific device used for graph back to OS.
@}
/
/**
@brief Get the state of the primary context.
@brief Release the primary context on the GPU.
@brief Resets the primary context on the GPU.
@brief Retain the primary context on the GPU.
@brief Set flags for the primary context.
@brief The state of current device is discarded and updated to a fresh state.
@brief Set L1/Shared cache partition.
@brief Set the mem attribute for graphs.
@brief Set Resource limits of current device
@brief Sets the current memory pool of a device
@brief The bank width of shared memory on current device is set
@}
/
/**
@defgroup Device Device Management
@{
This section describes the device management functions of HIP runtime API.
/
/**
@brief Waits on all active streams on current device
@brief Returns the total amount of memory on the device.
@param [out] bytes
@param [in] device
@brief Returns the approximate HIP driver version.
@brief Return hip error as text string form.
@brief Return handy text string message to explain the error which occurred
Copies memory for 2D arrays.
@brief Copies data between host and device.
@brief Copies data between host and device asynchronously.
@brief Returns information about the specified pointer.[BETA]
Create an event
@}
/
/**
@brief Destroy the specified event.
@brief Return the elapsed time between two events.
@brief Query event status
@brief Wait for an event to complete.
@brief Returns the link type and hop count between two devices
@brief Launches kernel from the pointer address, with arguments and shared memory on stream.
@brief Launches kernels on multiple devices and guarantees all specified kernels are dispatched
on respective streams before enqueuing any other work on the specified streams from any other threads
@brief Allocate memory on the default accelerator
@brief Create an asynchronous stream with the specified CU mask.
@brief Get CU mask associated with an asynchronous stream
@brief Maps a buffer onto an imported memory object.
@brief Free memory allocated by the hcc hip memory allocation API.
This API performs an implicit hipDeviceSynchronize() call.
If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.
@brief Frees an array on the device.
@brief Frees memory with stream ordered semantics
@brief Free memory allocated by the hcc hip host memory allocation API. [Deprecated]
@brief Frees a mipmapped array on the device
@brief Find out a specific attribute for a given function.
@brief Find out attributes for a given function.
@}
/
/**
@brief Set Cache configuration for a specific function
@brief Set shared memory configuation for a specific function
@brief Gets the channel descriptor in an array.
@brief Return the default device id for the calling host thread.
@brief Return number of compute-capable devices.
@brief Gets the flags set for current device
@brief Returns device properties.
@brief Return hip error as text string form.
@brief Return handy text string message to explain the error which occurred
@}
/
/**
@brief Gets a mipmap level of a HIP mipmapped array
@brief Gets device pointer associated with symbol on the device.
@brief Gets the size of the given symbol on the device.
@brief Gets resource descriptor for the texture object.
@brief Gets resource view descriptor for the texture object.
@brief Gets texture descriptor for the texture object.
@addtogroup TextureD Texture Management [Deprecated]
@{
@ingroup Texture
This section describes the deprecated texture management functions of HIP runtime API.
/
/**
@brief Gets the texture reference related with the symbol.
@brief Creates a child graph node and adds it to a graph.
@brief Adds dependency edges to a graph.
@brief Creates an empty node and adds it to a graph.
@brief Creates an event record node and adds it to a graph.
@brief Creates an event wait node and adds it to a graph.
@brief Creates a host execution node and adds it to a graph.
@brief Creates a kernel execution node and adds it to a graph.
@brief Creates a memcpy node and adds it to a graph.
@brief Creates a 1D memcpy node and adds it to a graph.
@brief Creates a memcpy node to copy from a symbol on the device and adds it to a graph.
@brief Creates a memcpy node to copy to a symbol on the device and adds it to a graph.
@brief Creates a memset node and adds it to a graph.
@brief Gets a handle to the embedded graph of a child graph node.
@brief Clones a graph.
@brief Creates a graph
@brief Destroys a graph
@brief Remove a node from the graph.
@brief Returns the event associated with an event record node.
@brief Sets an event record node’s event.
@brief Returns the event associated with an event wait node.
@brief Sets an event wait node’s event.
@brief Updates node parameters in the child graph node in the given graphExec.
@brief Destroys an executable graph
@brief Sets the event for an event record node in the given graphExec.
@brief Sets the event for an event record node in the given graphExec.
@brief Sets the parameters for a host node in the given graphExec.
@brief Sets the parameters for a kernel node in the given graphExec.
@brief Sets the parameters for a memcpy node in the given graphExec.
@brief Sets the parameters for a memcpy node in the given graphExec to perform a 1-dimensional
copy.
@brief Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the
@brief Sets the parameters for a memcpy node in the given graphExec to copy to a symbol on the
device.
@param [in] hGraphExec - instance of the executable graph with the node.
@param [in] node - instance of the node to set parameters to.
@param [in] symbol - Device symbol address.
@param [in] src - pointer to memory address of the src.
@param [in] count - the size of the memory to copy.
@param [in] offset - Offset from start of symbol in bytes.
@param [in] kind - the type of memory copy.
@returns #hipSuccess, #hipErrorInvalidValue
@warning : This API is marked as beta, meaning, while this is feature complete,
it is still open to changes and may have outstanding issues.
@brief Sets the parameters for a memset node in the given graphExec.
@brief Check whether an executable graph can be updated with a graph and perform the update if *
possible.
@brief Returns a graph’s dependency edges.
@brief Returns graph nodes.
@brief Returns graph’s root nodes.
@brief Returns a host node’s parameters.
@brief Sets a host node’s parameters.
@brief Creates an executable graph from a graph
@brief Creates an executable graph from a graph.
@brief Gets a node attribute.
@brief Gets kernel node’s parameters.
@brief Sets a node attribute.
@brief Sets a kernel node’s parameters.
@brief launches an executable graph in a stream
@brief Gets a memcpy node’s parameters.
@brief Sets a memcpy node’s parameters.
@brief Sets a memcpy node’s parameters to perform a 1-dimensional copy.
@brief Sets a memcpy node’s parameters to copy from a symbol on the device.
@brief Sets a memcpy node’s parameters to copy to a symbol on the device.
@brief Gets a memset node’s parameters.
@brief Sets a memset node’s parameters.
@brief Finds a cloned version of a node.
@brief Returns a node’s dependencies.
@brief Returns a node’s dependent nodes.
@brief Returns a node’s type.
@brief Release user object from graphs.
@brief Removes dependency edges from a graph.
@brief Retain user object for graphs.
@brief uploads an executable graph in a stream
@brief Allocate device accessible page locked host memory [Deprecated]
@brief Free memory allocated by the hcc hip host memory allocation API
This API performs an implicit hipDeviceSynchronize() call.
If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.
@brief Get Device pointer from Host Pointer allocated through hipHostMalloc
@brief Return flags associated with host pointer
@brief Allocate device accessible page locked host memory
@brief Register host memory so it can be accessed from the current device.
@brief Un-register host pointer
@brief Imports an external memory object.
@brief Imports an external semaphore.
@defgroup API HIP API
@{
@brief Close memory mapped with hipIpcOpenMemHandle
@brief Gets an opaque interprocess handle for an event.
@brief Gets an interprocess memory handle for an existing device memory
allocation
@brief Opens an interprocess event handles.
@brief Opens an interprocess memory handle exported from another process
and returns a device pointer usable in the local process.
@brief Launch a kernel.
@brief launches kernel f with launch parameters and shared memory on stream with arguments passed
to kernelparams or extra, where thread blocks can cooperate and synchronize as they execute
@brief Launches kernels on multiple devices where thread blocks can cooperate and
synchronize as they execute.
@brief Enqueues a host function call in a stream.
@brief C compliant kernel launch API
@brief Allocate memory on the default accelerator
@brief Allocate an array on the device.
@brief Allocate an array on the device.
@brief Allocates memory with stream ordered semantics
@brief Allocates memory from a specified pool with stream ordered semantics.
@brief Allocate pinned host memory [Deprecated]
@brief Allocate a mipmapped array on the device
Allocates at least width (in bytes) * height bytes of linear memory
Padding may occur to ensure alighnment requirements are met for the given row
The change in width size due to padding will be returned in *pitch.
Currently the alignment is set to 128 bytes
@brief Frees an address range reservation made via hipMemAddressReserve
@brief Reserves an address range
@brief Advise about the usage of a given memory range to HIP.
@brief Allocate pinned host memory [Deprecated]
Allocates at least width (in bytes) * height bytes of linear memory
Padding may occur to ensure alighnment requirements are met for the given row
The change in width size due to padding will be returned in *pitch.
Currently the alignment is set to 128 bytes
@brief Creates a memory allocation described by the properties and size
@brief Exports an allocation to a requested shareable handle type.
@brief Get the access flags set for the given location and ptr.
@brief Get information on memory allocations.
@brief Calculates either the minimal or recommended granularity.
@brief Retrieve the property structure of the given handle.
@brief Query memory info.
Return snapshot of free memory, and total allocatable memory on the device.
@brief Imports an allocation from a requested shareable handle type.
@brief Maps an allocation handle to a reserved virtual address range.
@brief Maps or unmaps subregions of sparse HIP arrays and sparse HIP mipmapped arrays.
@brief Creates a memory pool
@brief Destroys the specified memory pool
@brief Export data to share a memory pool allocation between processes.
@brief Exports a memory pool to the requested handle type.
@brief Returns the accessibility of a pool from a device
@brief Gets attributes of a memory pool
@brief Imports a memory pool from a shared handle.
@brief Import a memory pool allocation from another process.
@brief Controls visibility of the specified pool between devices
@brief Sets attributes of a memory pool
@brief Releases freed memory back to the OS
@brief Prefetches memory to the specified destination device using HIP.
@brief Query an attribute of a given memory range in HIP.
@brief Query attributes of a given memory range in HIP.
@brief Release a memory handle representing a memory allocation which was previously allocated through hipMemCreate.
@brief Returns the allocation handle of the backing memory allocation given the address.
@brief Set the access flags for each location specified in desc for the given virtual address range.
@brief Unmap memory allocation of a given address range.
@brief Copy data from src to dst.
@brief Copies data between host and device.
@brief Copies data between host and device.
@brief Copies data between host and device.
@brief Copies data between host and device asynchronously.
@brief Copies data between host and device.
@brief Copies data between host and device.
@brief Copies data between host and device.
@brief Copies data between host and device asynchronously.
@brief Copy data from src to dst asynchronously.
@brief Copies data between host and device.
@brief Copy data from Device to Device
@brief Copy data from Device to Device asynchronously
@brief Copy data from Device to Host
@brief Copy data from Device to Host asynchronously
@brief Copies data between host and device.
@brief Copies data from the given symbol on the device.
@brief Copies data from the given symbol on the device asynchronously.
@brief Copies data between host and device.
@brief Copy data from Host to Device
@brief Copy data from Host to Device asynchronously
@brief Copies memory for 2D arrays.
@param[in] pCopy Parameters for the memory copy
@return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,
#hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection
@brief Copies memory for 2D arrays.
@param[in] pCopy Parameters for the memory copy
@param[in] stream Stream to use
@return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,
#hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection
@brief Copies memory from one device to memory on another device.
@brief Copies memory from one device to memory on another device.
@brief Copies data between host and device.
@brief Copies data to the given symbol on the device.
Symbol HIP APIs allow a kernel to define a device-side data symbol which can be accessed on
the host side. The symbol can be in __constant or device space.
Note that the symbol name needs to be encased in the HIP_SYMBOL macro.
This also applies to hipMemcpyFromSymbol, hipGetSymbolAddress, and hipGetSymbolSize.
For detail usage, see the example at
https://github.com/ROCm-Developer-Tools/HIP/blob/rocm-5.0.x/docs/markdown/hip_porting_guide.md
@brief Copies data to the given symbol on the device asynchronously.
@brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant
byte value value.
@brief Fills the memory area pointed to by dst with the constant value.
@brief Fills asynchronously the memory area pointed to by dst with the constant value.
@brief Fills synchronously the memory area pointed to by pitchedDevPtr with the constant value.
@brief Fills asynchronously the memory area pointed to by pitchedDevPtr with the constant value.
@brief Fills the first sizeBytes bytes of the memory area pointed to by dev with the constant
byte value value.
@brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant
byte value value.
@brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant
byte value value.
@brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant
short value value.
@brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant
short value value.
@brief Fills the memory area pointed to by dest with the constant integer
value for specified number of times.
@brief Fills the memory area pointed to by dev with the constant integer
value for specified number of times.
@addtogroup TextureU Texture Management [Not supported]
@{
@ingroup Texture
This section describes the texture management functions currently unsupported in HIP runtime.
@brief Function with kname will be extracted if present in module
@brief Returns a global pointer from a module.
Returns in *dptr and *bytes the pointer and size of the global of name name located in module hmod.
If no variable of that name exists, it returns hipErrorNotFound. Both parameters dptr and bytes are optional.
If one of them is NULL, it is ignored and hipSuccess is returned.
@brief returns the handle of the texture reference with the name from the module.
@brief launches kernel f with launch parameters and shared memory on stream with arguments passed
to kernelparams or extra
@}
/
/**
@brief builds module from code object which resides in host memory. Image is pointer to that
location.
@brief builds module from code object which resides in host memory. Image is pointer to that
location. Options are not used. hipModuleLoadData is called.
@brief Returns occupancy for a device function.
@brief Returns occupancy for a device function.
@}
/
/**
@brief determine the grid and block sizes to achieves maximum occupancy for a kernel
@brief Frees the module
@brief Returns occupancy for a device function.
@brief Returns occupancy for a device function.
@brief determine the grid and block sizes to achieves maximum occupancy for a kernel
@brief Return last error returned by any HIP runtime API call.
@brief Returns information about the specified pointer.[BETA]
@}
/
/**
@brief Start recording of profiling information
When using this API, start the profiler with profiling disabled. (–startdisabled)
@warning : hipProfilerStart API is under development.
@brief Stop recording of profiling information.
When using this API, start the profiler with profiling disabled. (–startdisabled)
@warning : hipProfilerStop API is under development.
@brief Returns the approximate HIP Runtime version.
@brief Set default device to be used for subsequent hip API calls from this thread.
@brief The current device behavior is changed according the flags passed.
@brief Set a kernel argument.
@brief Signals a set of external semaphore objects.
@brief Adds a callback to be called on the host after all currently enqueued
items in the stream have completed. For each
hipStreamAddCallback call, a callback will be executed exactly once.
The callback will block later work in the stream until it is finished.
@param[in] stream - Stream to add callback to
@param[in] callback - The function to call once preceding stream operations are complete
@param[in] userData - User specified data to be passed to the callback function
@param[in] flags - Reserved for future use, must be 0
@return #hipSuccess, #hipErrorInvalidHandle, #hipErrorNotSupported
@brief Attach memory to a stream asynchronously in HIP.
@brief Begins graph capture on a stream.
@brief Create an asynchronous stream.
@brief Create an asynchronous stream.
@brief Create an asynchronous stream with the specified priority.
@brief Destroys the specified stream.
@brief Ends capture on a stream, returning the captured graph.
@brief Get capture status of a stream.
@brief Get stream’s capture state
@brief Return flags associated with this stream.
@brief Query the priority of a stream.
@brief Get stream’s capture state
@brief Return #hipSuccess if all of the operations in the specified @p stream have completed, or
#hipErrorNotReady if not.
@brief Wait for all commands in stream to complete.
@brief Update the set of dependencies in a capturing stream
@brief Make the specified compute stream wait for an event
@}
/
/**
@brief Enqueues a wait command to the stream.[BETA]
@brief Enqueues a write command to the stream.[BETA]
@brief Enqueues a write command to the stream.[BETA]
@brief Creates a texture object.
@brief Destroys a texture object.
@brief Gets resource descriptor of a texture object.
@brief Gets resource view descriptor of a texture object.
@brief Gets texture descriptor of a texture object.
@brief Swaps the stream capture mode of a thread.
@brief Create an instance of userObject to manage lifetime of a resource.
@brief Release number of references to resource.
@brief Retain number of references to resource.
@brief Waits on a set of external semaphore objects