rocm.bindings.hip

Contents

rocm.bindings.hip#

2026-09-24

402 min read time

Applies to Linux and Windows

Advanced Micro Devices, Inc.

Attributes#

HIP_VERSION_MAJOR

HIP_VERSION_MINOR

HIP_VERSION_PATCH

HIP_VERSION_GITHASH

HIP_VERSION_BUILD_ID

HIP_VERSION_BUILD_NAME

HIP_VERSION

HIP_TRSA_OVERRIDE_FORMAT

HIP_TRSF_READ_AS_INTEGER

HIP_TRSF_NORMALIZED_COORDINATES

HIP_TRSF_SRGB

hipTextureType1D

hipTextureType2D

hipTextureType3D

hipTextureTypeCubemap

hipTextureType1DLayered

hipTextureType2DLayered

hipTextureTypeCubemapLayered

HIP_IMAGE_OBJECT_SIZE_DWORD

HIP_SAMPLER_OBJECT_SIZE_DWORD

HIP_SAMPLER_OBJECT_OFFSET_DWORD

HIP_TEXTURE_OBJECT_SIZE_DWORD

HIP_LAUNCH_PARAM_BUFFER_POINTER

HIP_LAUNCH_PARAM_BUFFER_SIZE

HIP_LAUNCH_PARAM_END

hipIpcMemLazyEnablePeerAccess

HIP_IPC_HANDLE_SIZE

hipStreamDefault

hipStreamNonBlocking

hipEventDefault

hipEventBlockingSync

hipEventDisableTiming

hipEventInterprocess

hipEventReleaseToDevice

hipEventReleaseToSystem

hipHostMallocDefault

hipHostMallocPortable

hipHostMallocMapped

hipHostMallocWriteCombined

hipHostMallocNumaUser

hipHostMallocCoherent

hipHostMallocNonCoherent

hipMemAttachGlobal

hipMemAttachHost

hipMemAttachSingle

hipDeviceMallocDefault

hipDeviceMallocFinegrained

hipMallocSignalMemory

hipHostRegisterDefault

hipHostRegisterPortable

hipHostRegisterMapped

hipHostRegisterIoMemory

hipExtHostRegisterCoarseGrained

hipDeviceScheduleAuto

hipDeviceScheduleSpin

hipDeviceScheduleYield

hipDeviceScheduleBlockingSync

hipDeviceScheduleMask

hipDeviceMapHost

hipDeviceLmemResizeToMax

hipArrayDefault

hipArrayLayered

hipArraySurfaceLoadStore

hipArrayCubemap

hipArrayTextureGather

hipOccupancyDefault

hipCooperativeLaunchMultiDeviceNoPreSync

hipCooperativeLaunchMultiDeviceNoPostSync

hipCpuDeviceId

hipInvalidDeviceId

hipExtAnyOrderLaunch

hipStreamWaitValueGte

hipStreamWaitValueEq

hipStreamWaitValueAnd

hipStreamWaitValueNor

hipLibraryOption

HIP_SUCCESS

HIP_ERROR_INVALID_VALUE

HIP_ERROR_NOT_INITIALIZED

HIP_ERROR_LAUNCH_OUT_OF_RESOURCES

hipUUID

hipArray_t

hipArray_const_t

hipMipmappedArray_t

hipmipmappedArray

hipMipmappedArray_const_t

HIPresourcetype

hipResourcetype

HIPaddress_mode

HIPfilter_mode

HIP_TEXTURE_DESC

HIPresourceViewFormat

HIP_RESOURCE_DESC

HIP_RESOURCE_VIEW_DESC

hipTextureObject_t

hipSurfaceObject_t

hipCtx_t

hipExecutionCtx_t

hipDevResourceDesc_t

hipDevResource

hipDevSmResourceGroupParams

hipStream_t

hipIpcMemHandle_t

hipIpcEventHandle_t

hipMemFabricHandle_t

hipModule_t

hipFunction_t

hipLinkState_t

hipLibrary_t

hipKernel_t

hipMemPool_t

hipEvent_t

hipStreamBatchMemOpParams

hipLaunchParams

hipFunctionLaunchParams

hipExternalMemoryHandleType

hipExternalMemoryHandleDesc

hipExternalMemoryBufferDesc

hipExternalMemoryMipmappedArrayDesc

hipExternalSemaphoreHandleType

hipExternalSemaphoreHandleDesc

hipExternalSemaphoreSignalParams

hipExternalSemaphoreWaitParams

hipGraphicsResource

hipGraphicsResource_t

hipGraph_t

hipGraphNode_t

hipGraphExec_t

hipUserObject_t

hipMemGenericAllocationHandle_t

hipLaunchAttribute

hipLaunchConfig_t

HIP_LAUNCH_CONFIG

Classes#

hipJitOption

hipJitOption

hipJitInputType

hipJitInputType

hipJitCacheMode

hipJitCacheMode

hipJitFallback

hipJitFallback

hipLibraryOption_e

(No short description)

hipDeviceArch_t

hipUUID_t

(No short description)

hipDeviceProp_t

hipDeviceProp

hipMemoryType

hipMemoryType (for pointer attributes)

hipPointerAttribute_t

Pointer attributes

hipError_t

HIP error type

hipDeviceAttribute_t

hipDeviceAttribute_t hipDeviceAttributeUnused number: 5

hipDriverProcAddressQueryResult

(No short description)

hipComputeMode

(No short description)

hipFlushGPUDirectRDMAWritesOptions

(No short description)

hipGPUDirectRDMAWritesOrdering

(No short description)

hipChannelFormatKind

HIP channel format kinds

hipChannelFormatDesc

HIP channel format descriptor

hipArray

(No short description)

hipArray_Format

HIP array format

HIP_ARRAY_DESCRIPTOR

HIP array descriptor

HIP_ARRAY3D_DESCRIPTOR

HIP 3D array descriptor

hip_Memcpy2D

HIP 2D memory copy parameters

hipMipmappedArray

HIP mipmapped array

hipResourceType

HIP resource types

HIPresourcetype_enum

(No short description)

HIPaddress_mode_enum

HIP texture address modes

HIPfilter_mode_enum

HIP filter modes

HIP_TEXTURE_DESC_st

HIP texture descriptor

hipResourceViewFormat

HIP texture resource view formats

HIPresourceViewFormat_enum

HIP texture resource view formats

hipResourceDesc_union_0_struct_0

(No short description)

hipResourceDesc_union_0_struct_1

(No short description)

hipResourceDesc_union_0_struct_2

(No short description)

hipResourceDesc_union_0_struct_3

(No short description)

hipResourceDesc_union_0

(No short description)

hipResourceDesc

HIP resource descriptor

HIP_RESOURCE_DESC_st_union_0_struct_0

(No short description)

HIP_RESOURCE_DESC_st_union_0_struct_1

(No short description)

HIP_RESOURCE_DESC_st_union_0_struct_2

(No short description)

HIP_RESOURCE_DESC_st_union_0_struct_3

(No short description)

HIP_RESOURCE_DESC_st_union_0_struct_4

(No short description)

HIP_RESOURCE_DESC_st_union_0

(No short description)

HIP_RESOURCE_DESC_st

HIP resource view descriptor struct

hipResourceViewDesc

HIP resource view descriptor

HIP_RESOURCE_VIEW_DESC_st

Resource view descriptor

hipMemcpyKind

(No short description)

hipPitchedPtr

HIP pithed pointer

hipExtent

HIP extent

hipPos

HIP position

hipMemcpy3DParms

HIP 3D memory copy parameters

HIP_MEMCPY3D

HIP 3D memory copy

hipMemLocationType

Specifies the type of location

hipMemLocation

Specifies a memory location.

hipMemcpyFlags

Flags to specify for copies within a batch. Used with hipMemcpyBatchAsync

hipMemcpySrcAccessOrder

Flags to specify order in which source pointer is accessed by Batch memcpy

hipMemcpyAttributes

Attributes for copies within a batch.

hipMemcpy3DOperandType

Operand types for individual copies within a batch

hipOffset3D

Struct representing offset into a hipArray_t in elements.

hipMemcpy3DOperand_union_0_struct_0

(No short description)

hipMemcpy3DOperand_union_0_struct_1

(No short description)

hipMemcpy3DOperand_union_0

(No short description)

hipMemcpy3DOperand

Struct representing an operand for copy with hipMemcpy3DBatchAsync.

hipMemcpy3DBatchOp

HIP 3D Batch Op

hipMemcpy3DPeerParms

(No short description)

hipFunction_attribute

(No short description)

hipPointer_attribute

(No short description)

uchar1

(No short description)

uchar2

(No short description)

uchar3

(No short description)

uchar4

(No short description)

char1

(No short description)

char2

(No short description)

char3

(No short description)

char4

(No short description)

ushort1

(No short description)

ushort2

(No short description)

ushort3

(No short description)

ushort4

(No short description)

short1

(No short description)

short2

(No short description)

short3

(No short description)

short4

(No short description)

uint1

(No short description)

uint2

(No short description)

uint3

(No short description)

uint4

(No short description)

int1

(No short description)

int2

(No short description)

int3

(No short description)

int4

(No short description)

ulong1

(No short description)

ulong2

(No short description)

ulong3

(No short description)

ulong4

(No short description)

long1

(No short description)

long2

(No short description)

long3

(No short description)

long4

(No short description)

ulonglong1

(No short description)

ulonglong2

(No short description)

ulonglong3

(No short description)

ulonglong4

(No short description)

longlong1

(No short description)

longlong2

(No short description)

longlong3

(No short description)

longlong4

(No short description)

float1

(No short description)

float2

(No short description)

float3

(No short description)

float4

(No short description)

double1

(No short description)

double2

(No short description)

double3

(No short description)

double4

(No short description)

hipTextureAddressMode

hip texture address modes

hipTextureFilterMode

hip texture filter modes

hipTextureReadMode

hip texture read modes

textureReference

hip texture reference

hipTextureDesc

hip texture descriptor

surfaceReference

hip surface reference

hipSurfaceBoundaryMode

hip surface boundary modes

ihipCtx_t

(No short description)

ihipExecutionCtx_t

(No short description)

ihipDevResourceDesc_t

(No short description)

hipDevResourceType

(No short description)

hipDevSmResourceGroup_flags

(No short description)

hipDevSmResourceSplitByCount_flags

(No short description)

hipDevWorkqueueConfigScope

(No short description)

hipDevSmResource

(No short description)

hipDevWorkqueueConfigResource

(No short description)

hipDevWorkqueueResource

(No short description)

hipDevResource_st_union_0

(No short description)

hipDevResource_st

(No short description)

hipDevSmResourceGroupParams_st

(No short description)

hipDeviceP2PAttr

(No short description)

hipDriverEntryPointQueryResult

(No short description)

ihipStream_t

(No short description)

hipIpcMemHandle_st

(No short description)

hipIpcEventHandle_st

(No short description)

hipMemFabricHandle_st

(No short description)

ihipModule_t

(No short description)

ihipModuleSymbol_t

(No short description)

ihipLinkState_t

(No short description)

ihipLibrary_t

(No short description)

ihipKernel_t

(No short description)

ihipMemPoolHandle_t

(No short description)

hipFuncAttributes

(No short description)

ihipEvent_t

(No short description)

hipLimit_t

hipLimit

hipStreamBatchMemOpType

Operations for hipStreamBatchMemOp

hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t_union_0

(No short description)

hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t

(No short description)

hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t_union_0

(No short description)

hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t

(No short description)

hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t

(No short description)

hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t

(No short description)

hipStreamBatchMemOpParams_union

Union representing batch memory operation parameters for HIP streams.

hipBatchMemOpNodeParams

Structure representing node parameters for batch memory operations in HIP graphs.

hipMemoryAdvise

HIP Memory Advise values

hipMemRangeCoherencyMode

HIP Coherency Mode

hipMemRangeAttribute

HIP range attributes

hipMemPoolAttr

HIP memory pool attributes

hipMemAccessFlags

Specifies the memory protection flags for mapping

hipMemAccessDesc

Memory access descriptor structure is used to specify memory access

hipMemAllocationType

Defines the allocation types

hipMemAllocationHandleType

Flags for specifying handle types for memory pool allocations

hipMemPoolProps

Specifies the properties of allocations made from the pool.

hipMemPoolPtrExportData

Opaque data structure for exporting a pool allocation

hipFuncAttribute

On AMD devices and some Nvidia devices, these hints and controls are ignored.

hipFuncCache_t

On AMD devices and some Nvidia devices, these hints and controls are ignored.

hipSharedMemConfig

On AMD devices and some Nvidia devices, these hints and controls are ignored.

dim3

Struct for data in 3D

hipLaunchParams_t

struct hipLaunchParams_t

hipFunctionLaunchParams_t

struct hipFunctionLaunchParams_t

hipExternalMemoryHandleType_enum

(No short description)

hipExternalMemoryHandleDesc_st_union_0_struct_0

(No short description)

hipExternalMemoryHandleDesc_st_union_0

(No short description)

hipExternalMemoryHandleDesc_st

(No short description)

hipExternalMemoryBufferDesc_st

(No short description)

hipExternalMemoryMipmappedArrayDesc_st

(No short description)

hipExternalSemaphoreHandleType_enum

(No short description)

hipExternalSemaphoreHandleDesc_st_union_0_struct_0

(No short description)

hipExternalSemaphoreHandleDesc_st_union_0

(No short description)

hipExternalSemaphoreHandleDesc_st

(No short description)

hipExternalSemaphoreSignalParams_st_struct_0_struct_0

(No short description)

hipExternalSemaphoreSignalParams_st_struct_0_union_0

(No short description)

hipExternalSemaphoreSignalParams_st_struct_0_struct_1

(No short description)

hipExternalSemaphoreSignalParams_st_struct_0

(No short description)

hipExternalSemaphoreSignalParams_st

(No short description)

hipExternalSemaphoreWaitParams_st_struct_0_struct_0

(No short description)

hipExternalSemaphoreWaitParams_st_struct_0_union_0

(No short description)

hipExternalSemaphoreWaitParams_st_struct_0_struct_1

(No short description)

hipExternalSemaphoreWaitParams_st_struct_0

(No short description)

hipExternalSemaphoreWaitParams_st

External semaphore wait parameters, compatible with driver type

hipGraphicsRegisterFlags

HIP Access falgs for Interop resources.

ihipGraph

(No short description)

hipGraphNode

(No short description)

hipGraphExec

(No short description)

hipUserObject

(No short description)

hipGraphNodeType

hipGraphNodeType

hipHostFn_t

(No short description)

hipHostNodeParams

(No short description)

hipKernelNodeParams

(No short description)

hipMemsetParams

(No short description)

hipMemAllocNodeParams

(No short description)

hipAccessProperty

Specifies performance hint with hipAccessPolicyWindow

hipAccessPolicyWindow

Specifies access policy for a window, a contiguous extent of memory

hipLaunchMemSyncDomainMap

Memory Synchronization Domain map

hipLaunchMemSyncDomain

Memory Synchronization Domain

hipSynchronizationPolicy

Stream Synchronization Policy.

hipClusterSchedulingPolicy

(No short description)

hipExtDynDataPrefetchTemporal

Temporal locality hint for dynamic data prefetch.

hipExtDynDataPrefetchRegion

Describes one 2D memory region to prefetch into L2 cache.

hipExtDynDataPrefetchConfig

Configuration for dynamic data prefetch.

hipLaunchAttributeID

Launch Attribute ID

hipLaunchAttributeValue_struct_0

Specifies the desired cluster dimensions for a kernel launch.

hipLaunchAttributeValue

Launch Attribute Value

hipGraphExecUpdateResult

Graph execution update result

hipStreamCaptureMode

(No short description)

hipStreamCaptureStatus

(No short description)

hipStreamUpdateCaptureDependenciesFlags

(No short description)

hipGraphMemAttributeType

(No short description)

hipUserObjectFlags

(No short description)

hipUserObjectRetainFlags

(No short description)

hipGraphInstantiateFlags

(No short description)

hipGraphDebugDotFlags

(No short description)

hipGraphInstantiateResult

hipGraphInstantiateWithParams results

hipGraphInstantiateParams

Graph Instantiation parameters

hipMemAllocationProp_union_0

(No short description)

hipMemAllocationProp_struct_0

(No short description)

hipMemAllocationProp

Memory allocation properties

hipExternalSemaphoreSignalNodeParams

External semaphore signal node parameters

hipExternalSemaphoreWaitNodeParams

External semaphore wait node parameters

ihipMemGenericAllocationHandle

(No short description)

hipMemAllocationGranularity_flags

Flags for granularity

hipMemHandleType

Memory handle type

hipMemOperationType

Memory operation types

hipArraySparseSubresourceType

Subresource types for sparse arrays

hipArrayMapInfo_union_0

(No short description)

hipArrayMapInfo_union_1_struct_0

(No short description)

hipArrayMapInfo_union_1_struct_1

(No short description)

hipArrayMapInfo_union_1

(No short description)

hipArrayMapInfo_union_2

(No short description)

hipArrayMapInfo

Map info for arrays

hipMemcpyNodeParams

Memcpy node params

hipChildGraphNodeParams

Child graph node params

hipEventWaitNodeParams

Event record node params

hipEventRecordNodeParams

Event record node params

hipMemFreeNodeParams

Memory free node params

hipGraphNodeParams_union_0

(No short description)

hipGraphNodeParams

Params for different graph nodes

hipGraphDependencyType

(No short description)

hipGraphEdgeData

(No short description)

hipLaunchAttribute_st_union_0

(No short description)

hipLaunchAttribute_st

Used to specify custom attributes for launching kernels

hipLaunchConfig_st

HIP extensible launch configuration

HIP_LAUNCH_CONFIG_st

HIP driver extensible launch configuration

hipArrayMemoryRequirements

Struct representing array memory requirements.

hipMemRangeHandleType

Requested handle type for address range.

hipMemRangeFlags

Mem Range Flags used in hipMemGetHandleForAddressRange.

hipStreamCallback_t

Stream CallBack struct

hipDataType

(No short description)

hipLibraryPropertyType

(No short description)

Functions#

has_symbol(→ bool)

hipCreateChannelDesc(x, y, z, w, f)

!__LP64__

hipInit(flags)

Explicitly initializes the HIP runtime.

hipDriverGetVersion()

Returns the approximate HIP driver version.

hipRuntimeGetVersion()

Returns the approximate HIP Runtime version.

hipDeviceGet(ordinal)

Returns a handle to a compute device

hipDeviceComputeCapability(device)

Returns the compute capability of the device

hipDeviceGetName(len, device)

Returns an identifer string for the device.

hipDeviceGetUuid(device)

Returns an UUID for the device.[BETA]

hipDeviceGetP2PAttribute(attr, srcDevice, dstDevice)

Returns a value for attribute of link between two devices

hipDeviceGetPCIBusId(len, device)

Returns a PCI Bus Id string for the device, overloaded to take int device ID.

hipDeviceGetByPCIBusId(pciBusId)

Returns a handle to a compute device.

hipDeviceTotalMem(device)

Returns the total amount of memory on the device.

hipDeviceSynchronize()

Waits on all active streams on current device

hipDeviceReset()

The state of current device is discarded and updated to a fresh state.

hipSetDevice(deviceId)

Set default device to be used for subsequent hip API calls from this thread.

hipSetValidDevices(len)

Set a list of devices that can be used.

hipGetDevice()

Return the default device id for the calling host thread.

hipGetDeviceCount()

Return number of compute-capable devices.

hipDeviceGetAttribute(attr, deviceId)

Query for a specific device attribute.

hipDeviceGetDefaultMemPool(device)

Returns the default memory pool of the specified device

hipDeviceSetMemPool(device, mem_pool)

Sets the current memory pool of a device

hipDeviceGetMemPool(device)

Gets the current memory pool for the specified device

hipGetDeviceProperties(deviceId)

Returns device properties.

hipDeviceGetTexture1DLinearMaxWidth(desc, device)

Gets the maximum width for 1D linear textures on the specified device

hipDeviceSetCacheConfig(cacheConfig)

Set L1/Shared cache partition.

hipDeviceGetCacheConfig()

Get Cache configuration for a specific Device

hipDeviceGetLimit(limit)

Gets resource limits of current device

hipDeviceSetLimit(limit, value)

Sets resource limits of current device.

hipDeviceGetSharedMemConfig()

Returns bank width of shared memory for current device

hipGetDeviceFlags()

Gets the flags set for current device

hipDeviceSetSharedMemConfig(config)

The bank width of shared memory on current device is set

hipSetDeviceFlags(flags)

The current device behavior is changed according to the flags passed.

hipChooseDevice(prop)

Device which matches hipDeviceProp_t is returned

hipExtGetLinkTypeAndHopCount(device1, device2)

Returns the link type and hop count between two devices

hipIpcGetMemHandle(devPtr)

Gets an interprocess memory handle for an existing device memory

hipIpcOpenMemHandle(handle, flags)

Opens an interprocess memory handle exported from another process

hipIpcCloseMemHandle(devPtr)

Close memory mapped with hipIpcOpenMemHandle

hipIpcGetEventHandle(event)

Gets an opaque interprocess handle for an event.

hipIpcOpenEventHandle(handle)

Opens an interprocess event handles.

hipFuncSetAttribute(func, attr, value)

Set attribute for a specific function

hipKernelSetAttribute(attrib, value, kernel, dev)

Set attribute for a specific kernel

hipKernelGetFunction(kernel)

Function will be extracted for specific kernel

hipFuncSetCacheConfig(func, config)

Set Cache configuration for a specific function

hipFuncSetSharedMemConfig(func, config)

Set shared memory configuation for a specific function

hipGetLastError()

Return last error returned by any HIP runtime API call and resets the stored error code to

hipExtGetLastError()

Return last error returned by any HIP runtime API call and resets the stored error code to

hipPeekAtLastError()

Return last error returned by any HIP runtime API call.

hipGetErrorName(hip_error)

Return hip error as text string form.

hipGetErrorString(hipError)

Return handy text string message to explain the error which occurred

hipDrvGetErrorName(hipError)

Return hip error as text string form.

hipDrvGetErrorString(hipError)

Return handy text string message to explain the error which occurred

hipStreamCreate()

Creates an asynchronous stream.

hipStreamCreateWithFlags(flags)

Creates an asynchronous stream with flag.

hipStreamCreateWithPriority(flags, priority)

Creates an asynchronous stream with the specified priority.

hipDeviceGetStreamPriorityRange()

Returns numerical values that correspond to the least and greatest stream priority.

hipStreamDestroy(stream)

Destroys the specified stream.

hipStreamQuery(stream)

Returns hipSuccess if all of the operations in the specified stream have completed, or

hipStreamSynchronize(stream)

Waits for all commands in the stream to complete.

hipStreamWaitEvent(stream, event, flags)

Makes the specified compute stream wait for the specified event

hipStreamGetFlags(stream)

Returns flags associated with this stream.

hipStreamGetId(stream)

Queries the Id of a stream.

hipStreamGetPriority(stream)

Queries the priority of a stream.

hipStreamGetDevice(stream)

Gets the device associated with the stream.

hipExtStreamCreateWithCUMask(cuMaskSize, cuMask)

Creates an asynchronous stream with the specified CU mask.

hipExtStreamGetCUMask(stream, cuMaskSize, cuMask)

Gets CU mask associated with an asynchronous stream

hipStreamAddCallback(stream, callback, userData, flags)

Adds a callback to be called on the host after all currently enqueued items in the stream

hipStreamSetAttribute(stream, attr, value)

Sets stream attribute. Updated attribute is applied to work submitted to the stream.

hipStreamGetAttribute(stream, attr, value_out)

queries stream attribute.

hipStreamCopyAttributes(dst, src)

Copies attributes from source stream to destination stream.

hipStreamWaitValue32(stream, ptr, value, flags, mask)

Enqueues a wait command to the stream.[BETA]

hipStreamWaitValue64(stream, ptr, value, flags, mask)

Enqueues a wait command to the stream.[BETA]

hipStreamWriteValue32(stream, ptr, value, flags)

Enqueues a write command to the stream.[BETA]

hipStreamWriteValue64(stream, ptr, value, flags)

Enqueues a write command to the stream.[BETA]

hipStreamBatchMemOp(stream, count, paramArray, flags)

Enqueues an array of stream memory operations in the stream.[BETA]

hipGraphAddBatchMemOpNode(hGraph, dependencies, ...)

Creates a batch memory operation node and adds it to a graph.[BETA]

hipGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)

Returns a batch mem op node's parameters.[BETA]

hipGraphBatchMemOpNodeSetParams(hNode, nodeParams)

Sets the batch mem op node's parameters.[BETA]

hipGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, ...)

Sets the parameters for a batch mem op node in the given graphExec.[BETA]

hipEventCreateWithFlags(flags)

Create an event with the specified flags

hipEventCreate()

Create an event

hipEventRecordWithFlags(event, stream, flags)

Record an event in the specified stream.

hipEventRecord(event, stream)

Record an event in the specified stream.

hipEventDestroy(event)

Destroy the specified event.

hipEventSynchronize(event)

Wait for an event to complete.

hipEventElapsedTime(start, stop)

Return the elapsed time between two events.

hipEventQuery(event)

Query event status

hipPointerSetAttribute(value, attribute, ptr)

Sets information on the specified pointer.[BETA]

hipPointerGetAttributes(ptr)

Returns attributes for the specified pointer

hipPointerGetAttribute(data, attribute, ptr)

Returns information about the specified pointer.[BETA]

hipDrvPointerGetAttributes(numAttributes, ptr)

Returns information about the specified pointer.[BETA]

hipImportExternalSemaphore(semHandleDesc)

Imports an external semaphore.

hipSignalExternalSemaphoresAsync(extSemArray, ...)

Signals a set of external semaphore objects.

hipWaitExternalSemaphoresAsync(extSemArray, ...)

Waits on a set of external semaphore objects

hipDestroyExternalSemaphore(extSem)

Destroys an external semaphore object and releases any references to the underlying

hipImportExternalMemory(memHandleDesc)

Imports an external memory object.

hipExternalMemoryGetMappedBuffer(extMem, bufferDesc)

Maps a buffer onto an imported memory object.

hipDestroyExternalMemory(extMem)

Destroys an external memory object.

hipExternalMemoryGetMappedMipmappedArray(extMem, ...)

Maps a mipmapped array onto an external memory object.

hipMalloc(size)

Allocate memory on the default accelerator

hipExtMallocWithFlags(sizeBytes, flags)

Allocate memory on the default accelerator

hipMallocHost(size)

Allocate pinned host memory [Deprecated]

hipMemAllocHost(size)

Allocate pinned host memory [Deprecated]

hipHostMalloc(size, flags)

Allocates device accessible page locked (pinned) host memory

hipMallocManaged(size, flags)

Allocates memory that will be automatically managed by HIP.

hipMemPrefetchAsync(dev_ptr, count, device, stream)

Prefetches memory to the specified destination device using HIP.

hipMemPrefetchAsync_v2(dev_ptr, count, location, ...)

Prefetches memory to the specified destination device using HIP.

hipMemPrefetchBatchAsync(dev_ptrs, count, ...)

Prefetches a batch of memory ranges to the specified locations using HIP.

hipMemDiscardBatchAsync(dev_ptrs, count, flags, stream)

Discards a batch of memory ranges asynchronously.

hipDrvMemDiscardBatchAsync(dptrs, count, flags, stream)

Discards a batch of memory ranges asynchronously (driver API variant).

hipMemDiscardAndPrefetchBatchAsync(dptrs, count, ...)

Discards and prefetches a batch of memory ranges asynchronously.

hipDrvMemDiscardAndPrefetchBatchAsync(dptrs, count, ...)

Discards and prefetches a batch of memory ranges asynchronously (driver API variant).

hipMemAdvise(dev_ptr, count, advice, device)

Advise about the usage of a given memory range to HIP.

hipMemAdvise_v2(dev_ptr, count, advice, location)

Advise about the usage of a given memory range to HIP.

hipMemRangeGetAttribute(data, data_size, attribute, ...)

Query an attribute of a given memory range in HIP.

hipMemRangeGetAttributes(num_attributes, dev_ptr, count)

Query attributes of a given memory range in HIP.

hipStreamAttachMemAsync(stream, dev_ptr, length, flags)

Attach memory to a stream asynchronously in HIP.

hipMallocAsync(size, stream)

Allocates memory with stream ordered semantics

hipFreeAsync(dev_ptr, stream)

Frees memory with stream ordered semantics

hipMemPoolTrimTo(mem_pool, min_bytes_to_hold)

Releases freed memory back to the OS

hipMemPoolSetAttribute(mem_pool, attr, value)

Sets attributes of a memory pool

hipMemPoolGetAttribute(mem_pool, attr, value)

Gets attributes of a memory pool

hipMemPoolSetAccess(mem_pool, desc_list, count)

Controls visibility of the specified pool between devices

hipMemPoolGetAccess(mem_pool, location)

Returns the accessibility of a pool from a device

hipMemPoolCreate(pool_props)

Creates a memory pool

hipMemPoolDestroy(mem_pool)

Destroys the specified memory pool

hipMallocFromPoolAsync(size, mem_pool, stream)

Allocates memory from a specified pool with stream ordered semantics.

hipMemPoolExportToShareableHandle(shared_handle, ...)

Exports a memory pool to the requested handle type.

hipMemPoolImportFromShareableHandle(shared_handle, ...)

Imports a memory pool from a shared handle.

hipMemPoolExportPointer(dev_ptr)

Export data to share a memory pool allocation between processes.

hipMemPoolImportPointer(mem_pool, export_data)

Import a memory pool allocation from another process.

hipMemSetMemPool(location, type, pool)

Sets memory pool for memory location and allocation type.

hipMemGetMemPool(location, type)

Retrieves memory pool for memory location and allocation type.

hipMemGetDefaultMemPool(location, type)

Returns the default memory pool for a given location and allocation type

hipHostAlloc(size, flags)

Allocate device accessible page locked host memory

hipHostGetDevicePointer(hstPtr, flags)

Get Device pointer from Host Pointer allocated through hipHostMalloc

hipHostGetFlags(hostPtr)

Return flags associated with host pointer

hipHostRegister(hostPtr, sizeBytes, flags)

Register host memory so it can be accessed from the current device.

hipHostUnregister(hostPtr)

Un-register host pointer

hipMallocPitch(width, height)

Allocates at least width (in bytes) * height bytes of linear memory

hipMemAllocPitch(widthInBytes, height, elementSizeBytes)

Allocates at least width (in bytes) * height bytes of linear memory

hipFree(ptr)

Free memory allocated by the HIP-Clang hip memory allocation API.

hipFreeHost(ptr)

Frees page-locked memory

hipHostFree(ptr)

Free memory allocated by the HIP-Clang hip host memory allocation API

hipMemcpy(dst, src, sizeBytes, kind)

Copy data from src to dst.

hipMemcpyWithStream(dst, src, sizeBytes, kind, stream)

Memory copy on the stream.

hipMemcpyHtoD(dst, src, sizeBytes)

Copy data from Host to Device

hipMemcpyDtoH(dst, src, sizeBytes)

Copy data from Device to Host

hipMemcpyDtoD(dst, src, sizeBytes)

Copy data from Device to Device

hipMemcpyAtoD(dstDevice, srcArray, srcOffset, ByteCount)

Copies from one 1D array to device memory.

hipMemcpyDtoA(dstArray, dstOffset, srcDevice, ByteCount)

Copies from device memory to a 1D array.

hipMemcpyAtoA(dstArray, dstOffset, srcArray, ...)

Copies from one 1D array to another.

hipMemcpyHtoDAsync(dst, src, sizeBytes, stream)

Copy data from Host to Device asynchronously

hipMemcpyDtoHAsync(dst, src, sizeBytes, stream)

Copy data from Device to Host asynchronously

hipMemcpyDtoDAsync(dst, src, sizeBytes, stream)

Copy data from Device to Device asynchronously

hipMemcpyAtoHAsync(dstHost, srcArray, srcOffset, ...)

Copies from one 1D array to host memory.

hipMemcpyHtoAAsync(dstArray, dstOffset, srcHost, ...)

Copies from host memory to a 1D array.

hipModuleGetGlobal(hmod, name)

Returns a global pointer from a module.

hipGetSymbolAddress(symbol)

Gets device pointer associated with symbol on the device.

hipGetSymbolSize(symbol)

Gets the size of the given symbol on the device.

hipGetProcAddress(symbol, hipVersion, flags)

Gets the pointer of requested HIP driver function.

hipMemcpyToSymbol(symbol, src, sizeBytes, offset, kind)

Copies data to the given symbol on the device.

hipMemcpyToSymbolAsync(symbol, src, sizeBytes, offset, ...)

Copies data to the given symbol on the device asynchronously.

hipMemcpyFromSymbol(dst, symbol, sizeBytes, offset, kind)

Copies data from the given symbol on the device.

hipMemcpyFromSymbolAsync(dst, symbol, sizeBytes, ...)

Copies data from the given symbol on the device asynchronously.

hipMemcpyAsync(dst, src, sizeBytes, kind, stream)

Copies data from src to dst asynchronously.

hipMemset(dst, value, sizeBytes)

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant

hipMemsetD8(dest, value, count)

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant

hipMemsetD8Async(dest, value, count, stream)

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant

hipMemsetD16(dest, value, count)

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant

hipMemsetD16Async(dest, value, count, stream)

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant

hipMemsetD32(dest, value, count)

Fills the memory area pointed to by dest with the constant integer

hipMemsetAsync(dst, value, sizeBytes, stream)

Fills the first sizeBytes bytes of the memory area pointed to by dev with the constant

hipMemsetD32Async(dst, value, count, stream)

Fills the memory area pointed to by dev with the constant integer

hipMemset2D(dst, pitch, value, width, height)

Fills the memory area pointed to by dst with the constant value.

hipMemset2DAsync(dst, pitch, value, width, height, stream)

Fills asynchronously the memory area pointed to by dst with the constant value.

hipMemset3D(pitchedDevPtr, value, extent)

Fills synchronously the memory area pointed to by pitchedDevPtr with the constant value.

hipMemset3DAsync(pitchedDevPtr, value, extent, stream)

Fills asynchronously the memory area pointed to by pitchedDevPtr with the constant value.

hipMemsetD2D8(dst, dstPitch, value, width, height)

Fills 2D memory range of 'width' 8-bit values synchronously to the specified char value.

hipMemsetD2D8Async(dst, dstPitch, value, width, ...)

Fills 2D memory range of 'width' 8-bit values asynchronously to the specified char value.

hipMemsetD2D16(dst, dstPitch, value, width, height)

Fills 2D memory range of 'width' 16-bit values synchronously to the specified short

hipMemsetD2D16Async(dst, dstPitch, value, width, ...)

Fills 2D memory range of 'width' 16-bit values asynchronously to the specified short

hipMemsetD2D32(dst, dstPitch, value, width, height)

Fills 2D memory range of 'width' 32-bit values synchronously to the specified int value.

hipMemsetD2D32Async(dst, dstPitch, value, width, ...)

Fills 2D memory range of 'width' 32-bit values asynchronously to the specified int

hipMemGetInfo()

Query memory info.

hipMemPtrGetInfo(ptr)

Get allocated memory size via memory pointer.

hipMallocArray(desc, width, height, flags)

Allocate an array on the device.

hipArrayCreate(pAllocateArray)

Create an array memory pointer on the device.

hipArrayDestroy(array)

Destroy an array memory pointer on the device.

hipArray3DCreate(pAllocateArray)

Create a 3D array memory pointer on the device.

hipMalloc3D(extent)

Create a 3D memory pointer on the device.

hipFreeArray(array)

Frees an array on the device.

hipMalloc3DArray(desc, extent, flags)

Allocate an array on the device.

hipArrayGetInfo(array)

Gets info about the specified array

hipArrayGetDescriptor(array)

Gets a 1D or 2D array descriptor

hipArray3DGetDescriptor(array)

Gets a 3D array descriptor

hipMemcpy2D(dst, dpitch, src, spitch, width, height, kind)

Copies data between host and device.

hipMemcpyParam2D(pCopy)

Copies memory for 2D arrays.

hipMemcpyParam2DAsync(pCopy, stream)

Copies memory for 2D arrays.

hipMemcpy2DAsync(dst, dpitch, src, spitch, width, ...)

Copies data between host and device asynchronously.

hipMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, ...)

Copies data between host and device.

hipMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, ...)

Copies data between host and device.

hipMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, ...)

Copies data between host and device.

hipMemcpyToArray(dst, wOffset, hOffset, src, count, kind)

Copies data between host and device [Deprecated]

hipMemcpyFromArray(dst, srcArray, wOffset, hOffset, ...)

Copies data between host and device [Deprecated]

hipMemcpy2DFromArray(dst, dpitch, src, wOffset, ...)

Copies data between host and device.

hipMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, ...)

Copies data between host and device asynchronously.

hipMemcpyAtoH(dst, srcArray, srcOffset, count)

Copies data between host and device.

hipMemcpyHtoA(dstArray, dstOffset, srcHost, count)

Copies data between host and device.

hipMemcpy3D(p)

Copies data between host and device.

hipMemcpy3DAsync(p, stream)

Copies data between host and device asynchronously.

hipDrvMemcpy3D(pCopy)

Copies data between host and device.

hipDrvMemcpy3DAsync(pCopy, stream)

Copies data between host and device asynchronously.

hipMemGetAddressRange(dptr)

Get information on memory allocations.

hipMemcpyBatchAsync(srcs, count, attrs, numAttrs, stream)

Perform Batch of 1D copies

hipMemcpy3DBatchAsync(numOps, opList, flags, stream)

Perform Batch of 3D copies

hipMemcpy3DPeer(p)

Performs 3D memory copies between devices

hipMemcpy3DPeerAsync(p, stream)

Performs 3D memory copies between devices asynchronously

hipMipmappedArrayGetMemoryRequirements(mipmap, device)

Returns the memory requirements of a HIP mipmapped array.

hipDeviceCanAccessPeer(deviceId, peerDeviceId)

Determines if a device can access a peer device's memory.

hipDeviceEnablePeerAccess(peerDeviceId, flags)

Enables direct access to memory allocations on a peer device.

hipDeviceDisablePeerAccess(peerDeviceId)

Disables direct access to memory allocations on a peer device.

hipMemcpyPeer(dst, dstDeviceId, src, srcDeviceId, ...)

Copies memory between two peer accessible devices.

hipMemcpyPeerAsync(dst, dstDeviceId, src, srcDevice, ...)

Copies memory between two peer accessible devices asynchronously.

hipDeviceGetDevResource(device, type)

Gets device resource of a given type for a device.

hipDevSmResourceSplitByCount(input, remainder, flags, ...)

Splits SM resources into groups containing the specified number of SMs.

hipDevSmResourceSplit(nbGroups, input, remainder, ...)

Splits SM resources into structured groups.

hipDevResourceGenerateDesc(resources, nbResources)

Generates a resource descriptor from one or more device resources.

hipGreenCtxCreate(desc, device, flags)

Creates a green context from a resource descriptor.

hipExecutionCtxDestroy(ctx)

Destroys an execution context.

hipDeviceGetExecutionCtx(device)

Returns the default execution context for a device.

hipExecutionCtxStreamCreate(greenctx, flags, priority)

Creates a stream on an execution context with specified flags and priority

hipExecutionCtxGetDevResource(ctx, type)

Returns the device resource of a given type for an execution context

hipExecutionCtxGetDevice(ctx)

Returns the device associated with an execution context

hipExecutionCtxGetId(ctx)

Returns a unique identifier for an execution context

hipStreamGetDevResource(hStream, type)

Returns the device resource of a given type for a stream

hipExecutionCtxRecordEvent(ctx)

Records an event on an execution context

hipExecutionCtxSynchronize(ctx)

Blocks until all work on an execution context has completed

hipExecutionCtxWaitEvent(ctx, event)

Makes an execution context wait on an event

hipCtxCreate(flags, device)

Create a context and set it as current/default context

hipCtxDestroy(ctx)

Destroy a HIP context [Deprecated]

hipCtxPopCurrent()

Pop the current/default context and return the popped context [Deprecated]

hipCtxPushCurrent(ctx)

Push the context to be set as current/ default context [Deprecated]

hipCtxSetCurrent(ctx)

Set the passed context as current/default [Deprecated]

hipCtxGetCurrent()

Get the handle of the current/ default context [Deprecated]

hipCtxGetDevice()

Get the handle of the device associated with current/default context [Deprecated]

hipCtxGetApiVersion(ctx)

Returns the approximate HIP api version.

hipCtxGetCacheConfig()

Get Cache configuration for a specific function [Deprecated]

hipCtxSetCacheConfig(cacheConfig)

Set L1/Shared cache partition [Deprecated]

hipCtxSetSharedMemConfig(config)

Set Shared memory bank configuration [Deprecated]

hipCtxGetSharedMemConfig()

Get Shared memory bank configuration [Deprecated]

hipCtxSynchronize()

Blocks until the default context has completed all preceding requested tasks [Deprecated]

hipCtxGetFlags()

Return flags used for creating default context [Deprecated]

hipCtxEnablePeerAccess(peerCtx, flags)

Enables direct access to memory allocations in a peer context [Deprecated]

hipCtxDisablePeerAccess(peerCtx)

Disable direct access from current context's virtual address space to memory allocations

hipDevicePrimaryCtxGetState(dev)

Get the state of the primary context [Deprecated]

hipDevicePrimaryCtxRelease(dev)

Release the primary context on the GPU.

hipDevicePrimaryCtxRetain(dev)

Retain the primary context on the GPU [Deprecated]

hipDevicePrimaryCtxReset(dev)

Resets the primary context on the GPU [Deprecated]

hipDevicePrimaryCtxSetFlags(dev, flags)

Set flags for the primary context [Deprecated]

hipModuleLoadFatBinary(fatbin)

Loads fatbin object

hipModuleLoad(fname)

Loads code object from file into a module the currrent context.

hipModuleUnload(module)

Frees the module

hipModuleGetFunction(module, kname)

Function with kname will be extracted if present in module

hipModuleGetFunctionCount(mod)

Returns the number of functions within a module.

hipKernelGetAttribute(attrib, kernel, dev)

Returns information about a kernel.

hipLibraryLoadData(code, jitOptionsValues, ...)

Load hip Library from inmemory object

hipLibraryLoadFromFile(fileName, jitOptionsValues, ...)

Load hip Library from file

hipLibraryUnload(library)

Unload HIP Library

hipLibraryGetKernel(library, name)

Get Kernel object from library

hipLibraryGetKernelCount(library)

Get Kernel count in library

hipLibraryGetGlobal(library, name)

Get device pointer to a __device__ global variable defined in a library.

hipLibraryGetManaged(library, name)

Get host pointer to a __managed__ variable defined in a library.

hipLibraryEnumerateKernels(numKernels, library)

Retrieve kernel handles within a library

hipKernelGetLibrary(kernel)

Returns a Library Handle

hipKernelGetName(kernel)

Returns a Kernel Name

hipKernelGetParamInfo(kernel, paramIndex)

Returns the offset and size of a kernel parameter

hipFuncGetAttributes(func)

Find out attributes for a given function.

hipFuncGetAttribute(attrib, hfunc)

Find out a specific attribute for a given function.

hipGetFuncBySymbol(symbolPtr)

Gets pointer to device entry function that matches entry function symbolPtr.

hipGetDriverEntryPoint(symbol, flags)

Gets function pointer of a requested HIP API

hipModuleGetTexRef(hmod, name)

returns the handle of the texture reference with the name from the module.

hipModuleLoadData(image)

builds module from code object data which resides in host memory.

hipModuleLoadDataEx(image, numOptions, optionValues)

builds module from code object which resides in host memory. Image is pointer to that

hipLinkAddData(state, type, data, size, name, ...)

Adds bitcode data to be linked with options.

hipLinkAddFile(state, type, path, numOptions, optionValues)

Adds a file with bitcode to be linked with options.

hipLinkComplete(state)

Completes the linking of the given program.

hipLinkCreate(numOptions, optionValues)

Creates a linker instance with options.

hipLinkDestroy(state)

Deletes the linker instance.

hipModuleLaunchKernel(f, gridDimX, gridDimY, gridDimZ, ...)

launches kernel f with launch parameters and shared memory on stream with arguments passed

hipModuleLaunchCooperativeKernel(f, gridDimX, ...)

launches kernel f with launch parameters and shared memory on stream with arguments passed

hipModuleLaunchCooperativeKernelMultiDevice(...)

Launches kernels on multiple devices where thread blocks can cooperate and

hipLaunchCooperativeKernel(f, gridDim, blockDimX, ...)

Launches kernel f with launch parameters and shared memory on stream with arguments passed

hipLaunchCooperativeKernelMultiDevice(...)

Launches kernels on multiple devices where thread blocks can cooperate and

hipExtLaunchMultiKernelMultiDevice(launchParamsList, ...)

Launches kernels on multiple devices and guarantees all specified kernels are dispatched

hipLaunchKernelExC(config, fPtr, args)

Launches a HIP kernel using a generic function pointer and the specified configuration.

hipDrvLaunchKernelEx(config, f, params, extra)

Launches a HIP kernel using the driver API with the specified configuration.

hipMemGetHandleForAddressRange(handle, dptr, size, ...)

Returns a handle for the address range requested.

hipModuleOccupancyMaxPotentialBlockSize(f, ...)

determine the grid and block sizes to achieves maximum occupancy for a kernel

hipModuleOccupancyMaxPotentialBlockSizeWithFlags(f, ...)

determine the grid and block sizes to achieves maximum occupancy for a kernel

hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(f, ...)

Returns occupancy for a device function.

hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(f, ...)

Returns occupancy for a device function.

hipOccupancyMaxActiveBlocksPerMultiprocessor(f, ...)

Returns occupancy for a device function.

hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(f, ...)

Returns occupancy for a device function.

hipOccupancyMaxPotentialBlockSize(f, ...)

determine the grid and block sizes to achieves maximum occupancy for a kernel

hipOccupancyAvailableDynamicSMemPerBlock(f, numBlocks, ...)

Returns dynamic shared memory available per block when launching numBlocks blocks on SM.

hipOccupancyMaxActiveClusters(f, config)

determines the amount of active kernel clusters can co-exist at the same time in a device

hipOccupancyMaxPotentialClusterSize(f, config)

returns the maximum cluster size (in number of blocks) that can run on the device

hipProfilerStart()

Start recording of profiling information [Deprecated]

hipProfilerStop()

Stop recording of profiling information [Deprecated]

hipConfigureCall(gridDim, blockDim, sharedMem, stream)

Configure a kernel launch.

hipSetupArgument(arg, size, offset)

Set a kernel argument.

hipLaunchByPtr(func)

Launch a kernel.

hipLaunchKernel(function_address, numBlocks, ...)

C compliant kernel launch API

hipLaunchHostFunc(stream, fn, userData)

Enqueues a host function call in a stream.

hipDrvMemcpy2DUnaligned(pCopy)

Copies memory for 2D arrays.

hipExtLaunchKernel(function_address, numBlocks, ...)

Launches kernel from the pointer address, with arguments and shared memory on stream.

hipCreateTextureObject(pResDesc, pTexDesc, pResViewDesc)

Creates a texture object.

hipDestroyTextureObject(textureObject)

Destroys a texture object.

hipGetChannelDesc(desc)

Gets the channel descriptor in an array.

hipGetTextureObjectResourceDesc(textureObject)

Gets resource descriptor for the texture object.

hipGetTextureObjectResourceViewDesc(textureObject)

Gets resource view descriptor for the texture object.

hipGetTextureObjectTextureDesc(textureObject)

Gets texture descriptor for the texture object.

hipTexObjectCreate(pResDesc, pTexDesc, pResViewDesc)

Creates a texture object.

hipTexObjectDestroy(texObject)

Destroys a texture object.

hipTexObjectGetResourceDesc(texObject)

Gets resource descriptor of a texture object.

hipTexObjectGetResourceViewDesc(texObject)

Gets resource view descriptor of a texture object.

hipTexObjectGetTextureDesc(texObject)

Gets texture descriptor of a texture object.

hipMallocMipmappedArray(desc, extent, numLevels, flags)

Allocate a mipmapped array on the device.

hipFreeMipmappedArray(mipmappedArray)

Frees a mipmapped array on the device.

hipGetMipmappedArrayLevel(mipmappedArray, level)

Gets a mipmap level of a HIP mipmapped array.

hipMipmappedArrayCreate(pMipmappedArrayDesc, ...)

Create a mipmapped array.

hipMipmappedArrayDestroy()

Destroy a mipmapped array.

hipMipmappedArrayGetLevel(pLevelArray, level)

Get a mipmapped array on a mipmapped level.

hipBindTextureToMipmappedArray(tex, mipmappedArray, desc)

Binds a mipmapped array to a texture [Deprecated]

hipGetTextureReference(symbol)

Gets the texture reference related with the symbol [Deprecated]

hipTexRefGetBorderColor(texRef)

Gets the border color used by a texture reference [Deprecated]

hipTexRefGetArray(pArray, texRef)

Gets the array bound to a texture reference [Deprecated]

hipTexRefSetAddressMode(texRef, dim, am)

Sets address mode for a texture reference [Deprecated]

hipTexRefSetArray(tex, array, flags)

Binds an array as a texture reference [Deprecated]

hipTexRefSetFilterMode(texRef, fm)

Set filter mode for a texture reference [Deprecated]

hipTexRefSetFlags(texRef, Flags)

Set flags for a texture reference [Deprecated]

hipTexRefSetFormat(texRef, fmt, NumPackedComponents)

Set format for a texture reference [Deprecated]

hipBindTexture(tex, devPtr, desc, size)

Binds a memory area to a texture [Deprecated]

hipBindTexture2D(tex, devPtr, desc, width, height, pitch)

Binds a 2D memory area to a texture [Deprecated]

hipBindTextureToArray(tex, array, desc)

Binds a memory area to a texture [Deprecated]

hipGetTextureAlignmentOffset(texref)

Get the offset of the alignment in a texture [Deprecated]

hipUnbindTexture(tex)

Unbinds a texture [Deprecated]

hipTexRefGetAddress(texRef)

Gets the address for a texture reference [Deprecated]

hipTexRefGetAddressMode(texRef, dim)

Gets the address mode for a texture reference [Deprecated]

hipTexRefGetFilterMode(texRef)

Gets filter mode for a texture reference [Deprecated]

hipTexRefGetFlags(texRef)

Gets flags for a texture reference [Deprecated]

hipTexRefGetFormat(texRef)

Gets texture format for a texture reference [Deprecated]

hipTexRefGetMaxAnisotropy(texRef)

Gets the maximum anisotropy for a texture reference [Deprecated]

hipTexRefGetMipmapFilterMode(texRef)

Gets the mipmap filter mode for a texture reference [Deprecated]

hipTexRefGetMipmapLevelBias(texRef)

Gets the mipmap level bias for a texture reference [Deprecated]

hipTexRefGetMipmapLevelClamp(texRef)

Gets the minimum and maximum mipmap level clamps for a texture reference [Deprecated]

hipTexRefGetMipMappedArray(texRef)

Gets the mipmapped array bound to a texture reference [Deprecated]

hipTexRefSetAddress(texRef, dptr, bytes)

Sets an bound address for a texture reference [Deprecated]

hipTexRefSetAddress2D(texRef, desc, dptr, Pitch)

Set a bind an address as a 2D texture reference [Deprecated]

hipTexRefSetMaxAnisotropy(texRef, maxAniso)

Sets the maximum anisotropy for a texture reference [Deprecated]

hipTexRefSetBorderColor(texRef)

Sets border color for a texture reference [Deprecated]

hipTexRefSetMipmapFilterMode(texRef, fm)

Sets mipmap filter mode for a texture reference [Deprecated]

hipTexRefSetMipmapLevelBias(texRef, bias)

Sets mipmap level bias for a texture reference [Deprecated]

hipTexRefSetMipmapLevelClamp(texRef, ...)

Sets mipmap level clamp for a texture reference [Deprecated]

hipTexRefSetMipmappedArray(texRef, mipmappedArray, Flags)

Binds mipmapped array to a texture reference [Deprecated]

hipApiName(id)

Returns HIP API name by ID.

hipKernelNameRef(f)

Returns kernel name reference by function name.

hipKernelNameRefByPtr(hostFunction, stream)

Retrives kernel for a given host pointer, unless stated otherwise.

hipGetStreamDeviceId(stream)

Returns device ID on the stream.

hipStreamBeginCapture(stream, mode)

Begins graph capture on a stream.

hipStreamBeginCaptureToGraph(stream, graph, ...)

Begins graph capture on a stream to an existing graph.

hipStreamEndCapture(stream)

Ends capture on a stream, returning the captured graph.

hipStreamGetCaptureInfo(stream)

Get capture status of a stream.

hipStreamGetCaptureInfo_v2(stream, dependencies_out)

Get stream's capture state

hipStreamIsCapturing(stream)

Get stream's capture state

hipStreamUpdateCaptureDependencies(stream, ...)

Update the set of dependencies in a capturing stream

hipThreadExchangeStreamCaptureMode()

Swaps the stream capture mode of a thread.

hipGraphCreate(flags)

Creates a graph

hipGraphDestroy(graph)

Destroys a graph

hipGraphAddDependencies(graph, from_, to, numDependencies)

Adds dependency edges to a graph.

hipGraphRemoveDependencies(graph, from_, to, ...)

Removes dependency edges from a graph.

hipGraphGetEdges(graph)

Returns a graph's dependency edges.

hipGraphGetNodes(graph)

Returns a graph's nodes.

hipGraphGetRootNodes(graph)

Returns a graph's root nodes.

hipGraphNodeGetDependencies(node)

Returns a node's dependencies.

hipGraphNodeGetDependentNodes(node)

Returns a node's dependent nodes.

hipGraphNodeGetType(node)

Returns a node's type.

hipGraphDestroyNode(node)

Remove a node from the graph.

hipGraphClone(originalGraph)

Clones a graph.

hipGraphNodeFindInClone(originalNode, clonedGraph)

Finds a cloned version of a node.

hipGraphInstantiate(graph, bufferSize)

Creates an executable graph from a graph

hipGraphInstantiateWithFlags(graph, flags)

Creates an executable graph from a graph.

hipGraphInstantiateWithParams(graph, instantiateParams)

Creates an executable graph from a graph.

hipGraphLaunch(graphExec, stream)

Launches an executable graph in the specified stream.

hipGraphUpload(graphExec, stream)

Uploads an executable graph to a stream

hipGraphAddNode(graph, pDependencies, numDependencies, ...)

Creates a kernel execution node and adds it to a graph.

hipGraphExecGetFlags(graphExec)

Return the flags of an executable graph.

hipGraphNodeSetParams(node, nodeParams)

Updates parameters of a graph's node.

hipGraphExecNodeSetParams(graphExec, node, nodeParams)

Updates parameters of an executable graph's node.

hipGraphExecDestroy(graphExec)

Destroys an executable graph

hipGraphExecUpdate(hGraphExec, hGraph, hErrorNode_out)

Check whether an executable graph can be updated with a graph and perform the update if *

hipGraphAddKernelNode(graph, pDependencies, ...)

Creates a kernel execution node and adds it to a graph.

hipGraphKernelNodeGetParams(node)

Gets kernel node's parameters.

hipGraphKernelNodeSetParams(node, pNodeParams)

Sets a kernel node's parameters.

hipGraphExecKernelNodeSetParams(hGraphExec, node, ...)

Sets the parameters for a kernel node in the given graphExec.

hipDrvGraphAddMemcpyNode(hGraph, dependencies, ...)

Creates a memcpy node and adds it to a graph.

hipGraphAddMemcpyNode(graph, pDependencies, ...)

Creates a memcpy node and adds it to a graph.

hipGraphMemcpyNodeGetParams(node)

Gets a memcpy node's parameters.

hipGraphMemcpyNodeSetParams(node, pNodeParams)

Sets a memcpy node's parameters.

hipGraphKernelNodeSetAttribute(hNode, attr, value)

Sets a node's attribute.

hipGraphKernelNodeGetAttribute(hNode, attr, value)

Gets a node's attribute.

hipGraphExecMemcpyNodeSetParams(hGraphExec, node, ...)

Sets the parameters of a memcpy node in the given graphExec.

hipGraphAddMemcpyNode1D(graph, pDependencies, ...)

Creates a 1D memcpy node and adds it to a graph.

hipGraphMemcpyNodeSetParams1D(node, dst, src, count, kind)

Sets a memcpy node's parameters to perform a 1-dimensional copy.

hipGraphExecMemcpyNodeSetParams1D(hGraphExec, node, ...)

Sets the parameters for a memcpy node in the given graphExec to perform a 1-dimensional

hipGraphAddMemcpyNodeFromSymbol(graph, pDependencies, ...)

Creates a memcpy node to copy from a symbol on the device and adds it to a graph.

hipGraphMemcpyNodeSetParamsFromSymbol(node, dst, ...)

Sets a memcpy node's parameters to copy from a symbol on the device.

hipGraphExecMemcpyNodeSetParamsFromSymbol(hGraphExec, ...)

Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the

hipGraphAddMemcpyNodeToSymbol(graph, pDependencies, ...)

Creates a memcpy node to copy to a symbol on the device and adds it to a graph.

hipGraphMemcpyNodeSetParamsToSymbol(node, symbol, src, ...)

Sets a memcpy node's parameters to copy to a symbol on the device.

hipGraphExecMemcpyNodeSetParamsToSymbol(hGraphExec, ...)

Sets the parameters for a memcpy node in the given graphExec to copy to a symbol on the

hipGraphAddMemsetNode(graph, pDependencies, ...)

Creates a memset node and adds it to a graph.

hipGraphMemsetNodeGetParams(node)

Gets a memset node's parameters.

hipGraphMemsetNodeSetParams(node, pNodeParams)

Sets a memset node's parameters.

hipGraphExecMemsetNodeSetParams(hGraphExec, node, ...)

Sets the parameters for a memset node in the given graphExec.

hipGraphAddHostNode(graph, pDependencies, ...)

Creates a host execution node and adds it to a graph.

hipGraphHostNodeGetParams(node)

Returns a host node's parameters.

hipGraphHostNodeSetParams(node, pNodeParams)

Sets a host node's parameters.

hipGraphExecHostNodeSetParams(hGraphExec, node, ...)

Sets the parameters for a host node in the given graphExec.

hipGraphAddChildGraphNode(graph, pDependencies, ...)

Creates a child graph node and adds it to a graph.

hipGraphChildGraphNodeGetGraph(node)

Gets a handle to the embedded graph of a child graph node.

hipGraphExecChildGraphNodeSetParams(hGraphExec, node, ...)

Updates node parameters in the child graph node in the given graphExec.

hipGraphAddEmptyNode(graph, pDependencies, numDependencies)

Creates an empty node and adds it to a graph.

hipGraphAddEventRecordNode(graph, pDependencies, ...)

Creates an event record node and adds it to a graph.

hipGraphEventRecordNodeGetEvent(node)

Returns the event associated with an event record node.

hipGraphEventRecordNodeSetEvent(node, event)

Sets an event record node's event.

hipGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, ...)

Sets the event for an event record node in the given graphExec.

hipGraphAddEventWaitNode(graph, pDependencies, ...)

Creates an event wait node and adds it to a graph.

hipGraphEventWaitNodeGetEvent(node)

Returns the event associated with an event wait node.

hipGraphEventWaitNodeSetEvent(node, event)

Sets an event wait node's event.

hipGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)

Sets the event for an event record node in the given graphExec.

hipGraphAddMemAllocNode(graph, pDependencies, ...)

Creates a memory allocation node and adds it to a graph

hipGraphMemAllocNodeGetParams(node)

Returns parameters for memory allocation node

hipGraphAddMemFreeNode(graph, pDependencies, ...)

Creates a memory free node and adds it to a graph

hipGraphMemFreeNodeGetParams(node, dev_ptr)

Returns parameters for memory free node

hipDeviceGetGraphMemAttribute(device, attr, value)

Get the mem attribute for graphs.

hipDeviceSetGraphMemAttribute(device, attr, value)

Set the mem attribute for graphs.

hipDeviceGraphMemTrim(device)

Free unused memory reserved for graphs on a specific device and return it back to the OS.

hipUserObjectCreate(ptr, destroy, initialRefcount, flags)

Create an instance of userObject to manage lifetime of a resource.

hipUserObjectRelease(object, count)

Release number of references to resource.

hipUserObjectRetain(object, count)

Retain number of references to resource.

hipGraphRetainUserObject(graph, object, count, flags)

Retain user object for graphs.

hipGraphReleaseUserObject(graph, object, count)

Release user object from graphs.

hipGraphDebugDotPrint(graph, path, flags)

Write a DOT file describing graph structure.

hipGraphKernelNodeCopyAttributes(hSrc)

Copies attributes from source node to destination node.

hipGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)

Enables or disables the specified node in the given graphExec

hipGraphNodeGetEnabled(hGraphExec, hNode)

Query whether a node in the given graphExec is enabled

hipGraphAddExternalSemaphoresWaitNode(graph, ...)

Creates a external semaphor wait node and adds it to a graph.

hipGraphAddExternalSemaphoresSignalNode(graph, ...)

Creates a external semaphor signal node and adds it to a graph.

hipGraphExternalSemaphoresSignalNodeSetParams(hNode, ...)

Updates node parameters in the external semaphore signal node.

hipGraphExternalSemaphoresWaitNodeSetParams(hNode, ...)

Updates node parameters in the external semaphore wait node.

hipGraphExternalSemaphoresSignalNodeGetParams(hNode)

Returns external semaphore signal node params.

hipGraphExternalSemaphoresWaitNodeGetParams(hNode)

Returns external semaphore wait node params.

hipGraphExecExternalSemaphoresSignalNodeSetParams(...)

Updates node parameters in the external semaphore signal node in the given graphExec.

hipGraphExecExternalSemaphoresWaitNodeSetParams(...)

Updates node parameters in the external semaphore wait node in the given graphExec.

hipDrvGraphMemcpyNodeGetParams(hNode)

Gets a memcpy node's parameters.

hipDrvGraphMemcpyNodeSetParams(hNode)

Sets a memcpy node's parameters.

hipDrvGraphAddMemsetNode(hGraph, dependencies, ...)

Creates a memset node and adds it to a graph.

hipDrvGraphAddMemFreeNode(hGraph, dependencies, ...)

Creates a memory free node and adds it to a graph

hipDrvGraphExecMemcpyNodeSetParams(hGraphExec, hNode, ...)

Sets the parameters for a memcpy node in the given graphExec.

hipDrvGraphExecMemsetNodeSetParams(hGraphExec, hNode, ...)

Sets the parameters for a memset node in the given graphExec.

hipMemAddressFree(devPtr, size)

Frees an address range reservation made via hipMemAddressReserve

hipMemAddressReserve(size, alignment, addr, flags)

Reserves an address range

hipMemCreate(size, prop, flags)

Creates a memory handle for the allocation described by the properties and given size

hipMemExportToShareableHandle(shareableHandle, handle, ...)

Exports an allocation to a requested shareable handle type.

hipMemGetAccess(location, ptr)

Get the access flags set for the given location and ptr.

hipMemGetAllocationGranularity(prop, option)

Calculates either the minimal or recommended granularity.

hipMemGetAllocationPropertiesFromHandle(handle)

Retrieve the property structure of the given handle.

hipMemImportFromShareableHandle(osHandle, shHandleType)

Imports an allocation from a requested shareable handle type.

hipMemMap(ptr, size, offset, handle, flags)

Maps an allocation handle to a reserved virtual address range.

hipMemMapArrayAsync(mapInfoList, count, stream)

Maps or unmaps subregions of sparse HIP arrays and sparse HIP mipmapped arrays.

hipMemRelease(handle)

Release a memory handle representing a memory allocation which was previously allocated

hipMemRetainAllocationHandle(addr)

Returns the allocation handle of the backing memory allocation given the address.

hipMemSetAccess(ptr, size, desc, count)

Set the access flags for each location specified in desc for the given virtual address

hipMemUnmap(ptr, size)

Unmap memory allocation of a given address range.

hipGraphicsMapResources(count, resources, stream)

Maps a graphics resource for access.

hipGraphicsSubResourceGetMappedArray(resource, ...)

Get an array through which to access a subresource of a mapped graphics resource.

hipGraphicsResourceGetMappedPointer(resource)

Gets device accessible address of a graphics resource.

hipGraphicsUnmapResources(count, resources, stream)

Unmaps graphics resources.

hipGraphicsUnregisterResource(resource)

Unregisters a graphics resource.

hipCreateSurfaceObject(pResDesc)

Create a surface object.

hipDestroySurfaceObject(surfaceObject)

Destroy a surface object.

hipExtEnableLogging()

Enable HIP runtime logging.

hipExtDisableLogging()

Disable HIP runtime logging.

hipExtSetLoggingParams(log_level, log_size, log_mask)

Set HIP runtime logging parameters.

hipMemcpy_spt(dst, src, sizeBytes, kind)

(No short description, might be part of a group.)

hipMemcpyToSymbol_spt(symbol, src, sizeBytes, offset, kind)

(No short description, might be part of a group.)

hipMemcpyFromSymbol_spt(dst, symbol, sizeBytes, ...)

(No short description, might be part of a group.)

hipMemcpy2D_spt(dst, dpitch, src, spitch, width, ...)

(No short description, might be part of a group.)

hipMemcpy2DFromArray_spt(dst, dpitch, src, wOffset, ...)

(No short description, might be part of a group.)

hipMemcpy3D_spt(p)

(No short description, might be part of a group.)

hipMemset_spt(dst, value, sizeBytes)

(No short description, might be part of a group.)

hipMemsetAsync_spt(dst, value, sizeBytes, stream)

(No short description, might be part of a group.)

hipMemset2D_spt(dst, pitch, value, width, height)

(No short description, might be part of a group.)

hipMemset2DAsync_spt(dst, pitch, value, width, height, ...)

(No short description, might be part of a group.)

hipMemset3DAsync_spt(pitchedDevPtr, value, extent, stream)

(No short description, might be part of a group.)

hipMemset3D_spt(pitchedDevPtr, value, extent)

(No short description, might be part of a group.)

hipMemcpyAsync_spt(dst, src, sizeBytes, kind, stream)

(No short description, might be part of a group.)

hipMemcpy3DAsync_spt(p, stream)

(No short description, might be part of a group.)

hipMemcpy2DAsync_spt(dst, dpitch, src, spitch, width, ...)

(No short description, might be part of a group.)

hipMemcpyFromSymbolAsync_spt(dst, symbol, sizeBytes, ...)

(No short description, might be part of a group.)

hipMemcpyToSymbolAsync_spt(symbol, src, sizeBytes, ...)

(No short description, might be part of a group.)

hipMemcpyFromArray_spt(dst, src, wOffsetSrc, hOffset, ...)

(No short description, might be part of a group.)

hipMemcpy2DToArray_spt(dst, wOffset, hOffset, src, ...)

(No short description, might be part of a group.)

hipMemcpy2DFromArrayAsync_spt(dst, dpitch, src, ...)

(No short description, might be part of a group.)

hipMemcpy2DToArrayAsync_spt(dst, wOffset, hOffset, ...)

(No short description, might be part of a group.)

hipStreamQuery_spt(stream)

(No short description, might be part of a group.)

hipStreamSynchronize_spt(stream)

(No short description, might be part of a group.)

hipStreamGetPriority_spt(stream)

(No short description, might be part of a group.)

hipStreamWaitEvent_spt(stream, event, flags)

(No short description, might be part of a group.)

hipStreamGetFlags_spt(stream)

(No short description, might be part of a group.)

hipStreamAddCallback_spt(stream, callback, userData, flags)

(No short description, might be part of a group.)

hipEventRecord_spt(event, stream)

(No short description, might be part of a group.)

hipLaunchCooperativeKernel_spt(f, gridDim, blockDim, ...)

(No short description, might be part of a group.)

hipLaunchKernel_spt(function_address, numBlocks, ...)

(No short description, might be part of a group.)

hipGraphLaunch_spt(graphExec, stream)

(No short description, might be part of a group.)

hipStreamBeginCapture_spt(stream, mode)

(No short description, might be part of a group.)

hipStreamEndCapture_spt(stream)

(No short description, might be part of a group.)

hipStreamIsCapturing_spt(stream)

(No short description, might be part of a group.)

hipStreamGetCaptureInfo_spt(stream)

(No short description, might be part of a group.)

hipStreamGetCaptureInfo_v2_spt(stream, dependencies_out)

(No short description, might be part of a group.)

hipLaunchHostFunc_spt(stream, fn, userData)

(No short description, might be part of a group.)

hipGetDriverEntryPoint_spt(symbol, flags)

(No short description, might be part of a group.)

hipGetProcAddress_spt(symbol, hipVersion, flags)

(No short description, might be part of a group.)

Module Contents#

rocm.bindings.hip.has_symbol(name: str | bytes | bytearray) → bool#
rocm.bindings.hip.HIP_VERSION_MAJOR: Any#
rocm.bindings.hip.HIP_VERSION_MINOR: Any#
rocm.bindings.hip.HIP_VERSION_PATCH: Any#
rocm.bindings.hip.HIP_VERSION_GITHASH: Any#
rocm.bindings.hip.HIP_VERSION_BUILD_ID: Any#
rocm.bindings.hip.HIP_VERSION_BUILD_NAME: Any#
rocm.bindings.hip.HIP_VERSION: Any#
rocm.bindings.hip.HIP_TRSA_OVERRIDE_FORMAT: Any#
rocm.bindings.hip.HIP_TRSF_READ_AS_INTEGER: Any#
rocm.bindings.hip.HIP_TRSF_NORMALIZED_COORDINATES: Any#
rocm.bindings.hip.HIP_TRSF_SRGB: Any#
rocm.bindings.hip.hipTextureType1D: Any#
rocm.bindings.hip.hipTextureType2D: Any#
rocm.bindings.hip.hipTextureType3D: Any#
rocm.bindings.hip.hipTextureTypeCubemap: Any#
rocm.bindings.hip.hipTextureType1DLayered: Any#
rocm.bindings.hip.hipTextureType2DLayered: Any#
rocm.bindings.hip.hipTextureTypeCubemapLayered: Any#
rocm.bindings.hip.HIP_IMAGE_OBJECT_SIZE_DWORD: Any#
rocm.bindings.hip.HIP_SAMPLER_OBJECT_SIZE_DWORD: Any#
rocm.bindings.hip.HIP_SAMPLER_OBJECT_OFFSET_DWORD: Any#
rocm.bindings.hip.HIP_TEXTURE_OBJECT_SIZE_DWORD: Any#
rocm.bindings.hip.HIP_LAUNCH_PARAM_BUFFER_POINTER: Any#
rocm.bindings.hip.HIP_LAUNCH_PARAM_BUFFER_SIZE: Any#
rocm.bindings.hip.HIP_LAUNCH_PARAM_END: Any#
rocm.bindings.hip.hipIpcMemLazyEnablePeerAccess: Any#
rocm.bindings.hip.HIP_IPC_HANDLE_SIZE: Any#
rocm.bindings.hip.hipStreamDefault: Any#
rocm.bindings.hip.hipStreamNonBlocking: Any#
rocm.bindings.hip.hipEventDefault: Any#
rocm.bindings.hip.hipEventBlockingSync: Any#
rocm.bindings.hip.hipEventDisableTiming: Any#
rocm.bindings.hip.hipEventInterprocess: Any#
rocm.bindings.hip.hipEventReleaseToDevice: Any#
rocm.bindings.hip.hipEventReleaseToSystem: Any#
rocm.bindings.hip.hipHostMallocDefault: Any#
rocm.bindings.hip.hipHostMallocPortable: Any#
rocm.bindings.hip.hipHostMallocMapped: Any#
rocm.bindings.hip.hipHostMallocWriteCombined: Any#
rocm.bindings.hip.hipHostMallocNumaUser: Any#
rocm.bindings.hip.hipHostMallocCoherent: Any#
rocm.bindings.hip.hipHostMallocNonCoherent: Any#
rocm.bindings.hip.hipMemAttachGlobal: Any#
rocm.bindings.hip.hipMemAttachHost: Any#
rocm.bindings.hip.hipMemAttachSingle: Any#
rocm.bindings.hip.hipDeviceMallocDefault: Any#
rocm.bindings.hip.hipDeviceMallocFinegrained: Any#
rocm.bindings.hip.hipMallocSignalMemory: Any#
rocm.bindings.hip.hipHostRegisterDefault: Any#
rocm.bindings.hip.hipHostRegisterPortable: Any#
rocm.bindings.hip.hipHostRegisterMapped: Any#
rocm.bindings.hip.hipHostRegisterIoMemory: Any#
rocm.bindings.hip.hipExtHostRegisterCoarseGrained: Any#
rocm.bindings.hip.hipDeviceScheduleAuto: Any#
rocm.bindings.hip.hipDeviceScheduleSpin: Any#
rocm.bindings.hip.hipDeviceScheduleYield: Any#
rocm.bindings.hip.hipDeviceScheduleBlockingSync: Any#
rocm.bindings.hip.hipDeviceScheduleMask: Any#
rocm.bindings.hip.hipDeviceMapHost: Any#
rocm.bindings.hip.hipDeviceLmemResizeToMax: Any#
rocm.bindings.hip.hipArrayDefault: Any#
rocm.bindings.hip.hipArrayLayered: Any#
rocm.bindings.hip.hipArraySurfaceLoadStore: Any#
rocm.bindings.hip.hipArrayCubemap: Any#
rocm.bindings.hip.hipArrayTextureGather: Any#
rocm.bindings.hip.hipOccupancyDefault: Any#
rocm.bindings.hip.hipCooperativeLaunchMultiDeviceNoPreSync: Any#
rocm.bindings.hip.hipCooperativeLaunchMultiDeviceNoPostSync: Any#
rocm.bindings.hip.hipCpuDeviceId: Any#
rocm.bindings.hip.hipInvalidDeviceId: Any#
rocm.bindings.hip.hipExtAnyOrderLaunch: Any#
rocm.bindings.hip.hipStreamWaitValueGte: Any#
rocm.bindings.hip.hipStreamWaitValueEq: Any#
rocm.bindings.hip.hipStreamWaitValueAnd: Any#
rocm.bindings.hip.hipStreamWaitValueNor: Any#
class rocm.bindings.hip.hipJitOption#

Bases: enum.IntEnum

hipJitOption

hipJitOptionMaxRegisters: int#
hipJitOptionThreadsPerBlock: int#
hipJitOptionWallTime: int#
hipJitOptionInfoLogBuffer: int#
hipJitOptionInfoLogBufferSizeBytes: int#
hipJitOptionErrorLogBuffer: int#
hipJitOptionErrorLogBufferSizeBytes: int#
hipJitOptionOptimizationLevel: int#
hipJitOptionTargetFromContext: int#
hipJitOptionTarget: int#
hipJitOptionFallbackStrategy: int#
hipJitOptionGenerateDebugInfo: int#
hipJitOptionLogVerbose: int#
hipJitOptionGenerateLineInfo: int#
hipJitOptionCacheMode: int#
hipJitOptionSm3xOpt: int#
hipJitOptionFastCompile: int#
hipJitOptionGlobalSymbolNames: int#
hipJitOptionGlobalSymbolAddresses: int#
hipJitOptionGlobalSymbolCount: int#
hipJitOptionLto: int#
hipJitOptionFtz: int#
hipJitOptionPrecDiv: int#
hipJitOptionPrecSqrt: int#
hipJitOptionFma: int#
hipJitOptionPositionIndependentCode: int#
hipJitOptionMinCTAPerSM: int#
hipJitOptionMaxThreadsPerBlock: int#
hipJitOptionOverrideDirectiveValues: int#
hipJitOptionNumOptions: int#
hipJitOptionIRtoISAOptExt: int#
hipJitOptionIRtoISAOptCountExt: int#
class rocm.bindings.hip.hipJitInputType#

Bases: enum.IntEnum

hipJitInputType

hipJitInputCubin: int#
hipJitInputPtx: int#
hipJitInputFatBinary: int#
hipJitInputObject: int#
hipJitInputLibrary: int#
hipJitInputNvvm: int#
hipJitNumLegacyInputTypes: int#
hipJitInputLLVMBitcode: int#
hipJitInputLLVMBundledBitcode: int#
hipJitInputLLVMArchivesOfBundledBitcode: int#
hipJitInputSpirv: int#
hipJitNumInputTypes: int#
class rocm.bindings.hip.hipJitCacheMode#

Bases: enum.IntEnum

hipJitCacheMode

hipJitCacheOptionNone: int#
hipJitCacheOptionCG: int#
hipJitCacheOptionCA: int#
class rocm.bindings.hip.hipJitFallback#

Bases: enum.IntEnum

hipJitFallback

hipJitPreferPTX: int#
hipJitPreferBinary: int#
class rocm.bindings.hip.hipLibraryOption_e#

Bases: enum.IntEnum

(No short description)

hipLibraryHostUniversalFunctionAndDataTable: int#
hipLibraryBinaryIsPreserved: int#
rocm.bindings.hip.hipLibraryOption#
rocm.bindings.hip.HIP_SUCCESS: int#
rocm.bindings.hip.HIP_ERROR_INVALID_VALUE: int#
rocm.bindings.hip.HIP_ERROR_NOT_INITIALIZED: int#
rocm.bindings.hip.HIP_ERROR_LAUNCH_OUT_OF_RESOURCES: int#
class rocm.bindings.hip.hipDeviceArch_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

hipDeviceArch_t

hasGlobalInt32Atomics: Any#
hasGlobalFloatAtomicExch: Any#
hasSharedInt32Atomics: Any#
hasSharedFloatAtomicExch: Any#
hasFloatAtomicAdd: Any#
hasGlobalInt64Atomics: Any#
hasSharedInt64Atomics: Any#
hasDoubles: Any#
hasWarpVote: Any#
hasWarpBallot: Any#
hasWarpShuffle: Any#
hasFunnelShift: Any#
hasThreadFenceSystem: Any#
hasSyncThreadsExt: Any#
hasSurfaceFuncs: Any#
has3dGrid: Any#
hasDynamicParallelism: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipUUID_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

bytes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipUUID#
class rocm.bindings.hip.hipDeviceProp_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

hipDeviceProp

name: Any#
uuid: Any#
luid: Any#
luidDeviceNodeMask: Any#
totalGlobalMem: Any#
sharedMemPerBlock: Any#
regsPerBlock: Any#
warpSize: Any#
memPitch: Any#
maxThreadsPerBlock: Any#
maxThreadsDim: Any#
maxGridSize: Any#
clockRate: Any#
totalConstMem: Any#
major: Any#
minor: Any#
textureAlignment: Any#
texturePitchAlignment: Any#
deviceOverlap: Any#
multiProcessorCount: Any#
kernelExecTimeoutEnabled: Any#
integrated: Any#
canMapHostMemory: Any#
computeMode: Any#
maxTexture1D: Any#
maxTexture1DMipmap: Any#
maxTexture1DLinear: Any#
maxTexture2D: Any#
maxTexture2DMipmap: Any#
maxTexture2DLinear: Any#
maxTexture2DGather: Any#
maxTexture3D: Any#
maxTexture3DAlt: Any#
maxTextureCubemap: Any#
maxTexture1DLayered: Any#
maxTexture2DLayered: Any#
maxTextureCubemapLayered: Any#
maxSurface1D: Any#
maxSurface2D: Any#
maxSurface3D: Any#
maxSurface1DLayered: Any#
maxSurface2DLayered: Any#
maxSurfaceCubemap: Any#
maxSurfaceCubemapLayered: Any#
surfaceAlignment: Any#
concurrentKernels: Any#
ECCEnabled: Any#
pciBusID: Any#
pciDeviceID: Any#
pciDomainID: Any#
tccDriver: Any#
asyncEngineCount: Any#
unifiedAddressing: Any#
memoryClockRate: Any#
memoryBusWidth: Any#
l2CacheSize: Any#
persistingL2CacheMaxSize: Any#
maxThreadsPerMultiProcessor: Any#
streamPrioritiesSupported: Any#
globalL1CacheSupported: Any#
localL1CacheSupported: Any#
sharedMemPerMultiprocessor: Any#
regsPerMultiprocessor: Any#
managedMemory: Any#
isMultiGpuBoard: Any#
multiGpuBoardGroupID: Any#
hostNativeAtomicSupported: Any#
singleToDoublePrecisionPerfRatio: Any#
pageableMemoryAccess: Any#
concurrentManagedAccess: Any#
computePreemptionSupported: Any#
canUseHostPointerForRegisteredMem: Any#
cooperativeLaunch: Any#
cooperativeMultiDeviceLaunch: Any#
sharedMemPerBlockOptin: Any#
pageableMemoryAccessUsesHostPageTables: Any#
directManagedMemAccessFromHost: Any#
maxBlocksPerMultiProcessor: Any#
accessPolicyMaxWindowSize: Any#
reservedSharedMemPerBlock: Any#
hostRegisterSupported: Any#
sparseHipArraySupported: Any#
hostRegisterReadOnlySupported: Any#
timelineSemaphoreInteropSupported: Any#
memoryPoolsSupported: Any#
gpuDirectRDMASupported: Any#
gpuDirectRDMAFlushWritesOptions: Any#
gpuDirectRDMAWritesOrdering: Any#
memoryPoolSupportedHandleTypes: Any#
deferredMappingHipArraySupported: Any#
ipcEventSupported: Any#
clusterLaunch: Any#
unifiedFunctionPointers: Any#
reserved: Any#
hipReserved: Any#
gcnArchName: Any#
maxSharedMemoryPerMultiProcessor: Any#
clockInstructionRate: Any#
arch: Any#
hdpMemFlushCntl: Any#
hdpRegFlushCntl: Any#
cooperativeMultiDeviceUnmatchedFunc: Any#
cooperativeMultiDeviceUnmatchedGridDim: Any#
cooperativeMultiDeviceUnmatchedBlockDim: Any#
cooperativeMultiDeviceUnmatchedSharedMem: Any#
isLargeBar: Any#
asicRevision: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemoryType#

Bases: enum.IntEnum

hipMemoryType (for pointer attributes)

Note:

hipMemoryType enum values are combination of cudaMemoryType and cuMemoryType and AMD specific enum values.

hipMemoryTypeUnregistered: int#
hipMemoryTypeHost: int#
hipMemoryTypeDevice: int#
hipMemoryTypeManaged: int#
hipMemoryTypeArray: int#
hipMemoryTypeUnified: int#
class rocm.bindings.hip.hipPointerAttribute_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Pointer attributes

type: Any#
device: Any#
devicePointer: Any#
hostPointer: Any#
isManaged: Any#
allocationFlags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipError_t#

Bases: enum.IntEnum

HIP error type

hipSuccess: int#
hipErrorInvalidValue: int#
hipErrorOutOfMemory: int#
hipErrorMemoryAllocation: int#
hipErrorNotInitialized: int#
hipErrorInitializationError: int#
hipErrorDeinitialized: int#
hipErrorProfilerDisabled: int#
hipErrorProfilerNotInitialized: int#
hipErrorProfilerAlreadyStarted: int#
hipErrorProfilerAlreadyStopped: int#
hipErrorInvalidConfiguration: int#
hipErrorInvalidPitchValue: int#
hipErrorInvalidSymbol: int#
hipErrorInvalidDevicePointer: int#
hipErrorInvalidMemcpyDirection: int#
hipErrorInsufficientDriver: int#
hipErrorMissingConfiguration: int#
hipErrorPriorLaunchFailure: int#
hipErrorInvalidDeviceFunction: int#
hipErrorNoDevice: int#
hipErrorInvalidDevice: int#
hipErrorInvalidImage: int#
hipErrorInvalidContext: int#
hipErrorContextAlreadyCurrent: int#
hipErrorMapFailed: int#
hipErrorMapBufferObjectFailed: int#
hipErrorUnmapFailed: int#
hipErrorArrayIsMapped: int#
hipErrorAlreadyMapped: int#
hipErrorNoBinaryForGpu: int#
hipErrorAlreadyAcquired: int#
hipErrorNotMapped: int#
hipErrorNotMappedAsArray: int#
hipErrorNotMappedAsPointer: int#
hipErrorECCNotCorrectable: int#
hipErrorUnsupportedLimit: int#
hipErrorContextAlreadyInUse: int#
hipErrorPeerAccessUnsupported: int#
hipErrorInvalidKernelFile: int#
hipErrorInvalidGraphicsContext: int#
hipErrorInvalidSource: int#
hipErrorFileNotFound: int#
hipErrorSharedObjectSymbolNotFound: int#
hipErrorSharedObjectInitFailed: int#
hipErrorOperatingSystem: int#
hipErrorInvalidHandle: int#
hipErrorInvalidResourceHandle: int#
hipErrorIllegalState: int#
hipErrorNotFound: int#
hipErrorNotReady: int#
hipErrorIllegalAddress: int#
hipErrorLaunchOutOfResources: int#
hipErrorLaunchTimeOut: int#
hipErrorPeerAccessAlreadyEnabled: int#
hipErrorPeerAccessNotEnabled: int#
hipErrorSetOnActiveProcess: int#
hipErrorContextIsDestroyed: int#
hipErrorAssert: int#
hipErrorHostMemoryAlreadyRegistered: int#
hipErrorHostMemoryNotRegistered: int#
hipErrorLaunchFailure: int#
hipErrorCooperativeLaunchTooLarge: int#
hipErrorNotSupported: int#
hipErrorStreamCaptureUnsupported: int#
hipErrorStreamCaptureInvalidated: int#
hipErrorStreamCaptureMerge: int#
hipErrorStreamCaptureUnmatched: int#
hipErrorStreamCaptureUnjoined: int#
hipErrorStreamCaptureIsolation: int#
hipErrorStreamCaptureImplicit: int#
hipErrorCapturedEvent: int#
hipErrorStreamCaptureWrongThread: int#
hipErrorGraphExecUpdateFailure: int#
hipErrorInvalidChannelDescriptor: int#
hipErrorInvalidTexture: int#
hipErrorInvalidResourceType: int#
hipErrorInvalidResourceConfiguration: int#
hipErrorStreamDetached: int#
hipErrorUnknown: int#
hipErrorRuntimeMemory: int#
hipErrorRuntimeOther: int#
hipErrorInvalidClusterSize: int#
hipErrorTbd: int#
class rocm.bindings.hip.hipDeviceAttribute_t#

Bases: enum.IntEnum

hipDeviceAttribute_t hipDeviceAttributeUnused number: 5

hipDeviceAttribute_t hipDeviceAttributeUnused number: 5

hipDeviceAttributeCudaCompatibleBegin: int#
hipDeviceAttributeEccEnabled: int#
hipDeviceAttributeAccessPolicyMaxWindowSize: int#
hipDeviceAttributeAsyncEngineCount: int#
hipDeviceAttributeCanMapHostMemory: int#
hipDeviceAttributeCanUseHostPointerForRegisteredMem: int#
hipDeviceAttributeClockRate: int#
hipDeviceAttributeComputeMode: int#
hipDeviceAttributeComputePreemptionSupported: int#
hipDeviceAttributeConcurrentKernels: int#
hipDeviceAttributeConcurrentManagedAccess: int#
hipDeviceAttributeCooperativeLaunch: int#
hipDeviceAttributeCooperativeMultiDeviceLaunch: int#
hipDeviceAttributeDeviceOverlap: int#
hipDeviceAttributeDirectManagedMemAccessFromHost: int#
hipDeviceAttributeGlobalL1CacheSupported: int#
hipDeviceAttributeHostNativeAtomicSupported: int#
hipDeviceAttributeIntegrated: int#
hipDeviceAttributeIsMultiGpuBoard: int#
hipDeviceAttributeKernelExecTimeout: int#
hipDeviceAttributeL2CacheSize: int#
hipDeviceAttributeLocalL1CacheSupported: int#
hipDeviceAttributeLuid: int#
hipDeviceAttributeLuidDeviceNodeMask: int#
hipDeviceAttributeComputeCapabilityMajor: int#
hipDeviceAttributeManagedMemory: int#
hipDeviceAttributeMaxBlocksPerMultiProcessor: int#
hipDeviceAttributeMaxBlockDimX: int#
hipDeviceAttributeMaxBlockDimY: int#
hipDeviceAttributeMaxBlockDimZ: int#
hipDeviceAttributeMaxGridDimX: int#
hipDeviceAttributeMaxGridDimY: int#
hipDeviceAttributeMaxGridDimZ: int#
hipDeviceAttributeMaxSurface1D: int#
hipDeviceAttributeMaxSurface1DLayered: int#
hipDeviceAttributeMaxSurface2D: int#
hipDeviceAttributeMaxSurface2DLayered: int#
hipDeviceAttributeMaxSurface3D: int#
hipDeviceAttributeMaxSurfaceCubemap: int#
hipDeviceAttributeMaxSurfaceCubemapLayered: int#
hipDeviceAttributeMaxTexture1DWidth: int#
hipDeviceAttributeMaxTexture1DLayered: int#
hipDeviceAttributeMaxTexture1DLinear: int#
hipDeviceAttributeMaxTexture1DMipmap: int#
hipDeviceAttributeMaxTexture2DWidth: int#
hipDeviceAttributeMaxTexture2DHeight: int#
hipDeviceAttributeMaxTexture2DGather: int#
hipDeviceAttributeMaxTexture2DLayered: int#
hipDeviceAttributeMaxTexture2DLinear: int#
hipDeviceAttributeMaxTexture2DMipmap: int#
hipDeviceAttributeMaxTexture3DWidth: int#
hipDeviceAttributeMaxTexture3DHeight: int#
hipDeviceAttributeMaxTexture3DDepth: int#
hipDeviceAttributeMaxTexture3DAlt: int#
hipDeviceAttributeMaxTextureCubemap: int#
hipDeviceAttributeMaxTextureCubemapLayered: int#
hipDeviceAttributeMaxThreadsDim: int#
hipDeviceAttributeMaxThreadsPerBlock: int#
hipDeviceAttributeMaxThreadsPerMultiProcessor: int#
hipDeviceAttributeMaxPitch: int#
hipDeviceAttributeMemoryBusWidth: int#
hipDeviceAttributeMemoryClockRate: int#
hipDeviceAttributeComputeCapabilityMinor: int#
hipDeviceAttributeMultiGpuBoardGroupID: int#
hipDeviceAttributeMultiprocessorCount: int#
hipDeviceAttributeUnused1: int#
hipDeviceAttributePageableMemoryAccess: int#
hipDeviceAttributePageableMemoryAccessUsesHostPageTables: int#
hipDeviceAttributePciBusId: int#
hipDeviceAttributePciDeviceId: int#
hipDeviceAttributePciDomainId: int#
hipDeviceAttributePciDomainID: int#
hipDeviceAttributePersistingL2CacheMaxSize: int#
hipDeviceAttributeMaxRegistersPerBlock: int#
hipDeviceAttributeMaxRegistersPerMultiprocessor: int#
hipDeviceAttributeReservedSharedMemPerBlock: int#
hipDeviceAttributeMaxSharedMemoryPerBlock: int#
hipDeviceAttributeSharedMemPerBlockOptin: int#
hipDeviceAttributeSharedMemPerMultiprocessor: int#
hipDeviceAttributeSingleToDoublePrecisionPerfRatio: int#
hipDeviceAttributeStreamPrioritiesSupported: int#
hipDeviceAttributeSurfaceAlignment: int#
hipDeviceAttributeTccDriver: int#
hipDeviceAttributeTextureAlignment: int#
hipDeviceAttributeTexturePitchAlignment: int#
hipDeviceAttributeTotalConstantMemory: int#
hipDeviceAttributeTotalGlobalMem: int#
hipDeviceAttributeUnifiedAddressing: int#
hipDeviceAttributeUnused2: int#
hipDeviceAttributeWarpSize: int#
hipDeviceAttributeMemoryPoolsSupported: int#
hipDeviceAttributeVirtualMemoryManagementSupported: int#
hipDeviceAttributeHostRegisterSupported: int#
hipDeviceAttributeMemoryPoolSupportedHandleTypes: int#
hipDeviceAttributeHostNumaId: int#
hipDeviceAttributeDmaBufSupported: int#
hipDeviceAttributeGPUDirectRDMAWithHipVMMSupported: int#
hipDeviceAttributeHandleTypeFabricSupported: int#
hipDeviceAttributeCudaCompatibleEnd: int#
hipDeviceAttributeAmdSpecificBegin: int#
hipDeviceAttributeClockInstructionRate: int#
hipDeviceAttributeUnused3: int#
hipDeviceAttributeMaxSharedMemoryPerMultiprocessor: int#
hipDeviceAttributeUnused4: int#
hipDeviceAttributeUnused5: int#
hipDeviceAttributeHdpMemFlushCntl: int#
hipDeviceAttributeHdpRegFlushCntl: int#
hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc: int#
hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim: int#
hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim: int#
hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem: int#
hipDeviceAttributeIsLargeBar: int#
hipDeviceAttributeAsicRevision: int#
hipDeviceAttributeCanUseStreamWaitValue: int#
hipDeviceAttributeImageSupport: int#
hipDeviceAttributePhysicalMultiProcessorCount: int#
hipDeviceAttributeFineGrainSupport: int#
hipDeviceAttributeWallClockRate: int#
hipDeviceAttributeNumberOfXccs: int#
hipDeviceAttributeMaxAvailableVgprsPerThread: int#
hipDeviceAttributePciChipId: int#
hipDeviceAttributeExpertSchedMode: int#
hipDeviceAttributeMaxDynDataPrefetchRegions: int#
hipDeviceAttributeAmdSpecificEnd: int#
hipDeviceAttributeVendorSpecificBegin: int#
class rocm.bindings.hip.hipDriverProcAddressQueryResult#

Bases: enum.IntEnum

(No short description)

HIP_GET_PROC_ADDRESS_SUCCESS: int#
HIP_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND: int#
HIP_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT: int#
class rocm.bindings.hip.hipComputeMode#

Bases: enum.IntEnum

(No short description)

hipComputeModeDefault: int#
hipComputeModeExclusive: int#
hipComputeModeProhibited: int#
hipComputeModeExclusiveProcess: int#
class rocm.bindings.hip.hipFlushGPUDirectRDMAWritesOptions#

Bases: enum.IntEnum

(No short description)

hipFlushGPUDirectRDMAWritesOptionHost: int#
hipFlushGPUDirectRDMAWritesOptionMemOps: int#
class rocm.bindings.hip.hipGPUDirectRDMAWritesOrdering#

Bases: enum.IntEnum

(No short description)

hipGPUDirectRDMAWritesOrderingNone: int#
hipGPUDirectRDMAWritesOrderingOwner: int#
hipGPUDirectRDMAWritesOrderingAllDevices: int#
class rocm.bindings.hip.hipChannelFormatKind#

Bases: enum.IntEnum

HIP channel format kinds

hipChannelFormatKindSigned: int#
hipChannelFormatKindUnsigned: int#
hipChannelFormatKindFloat: int#
hipChannelFormatKindNone: int#
class rocm.bindings.hip.hipChannelFormatDesc(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP channel format descriptor

x: Any#
y: Any#
z: Any#
w: Any#
f: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipArray(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipArray_t#
rocm.bindings.hip.hipArray_const_t#
class rocm.bindings.hip.hipArray_Format#

Bases: enum.IntEnum

HIP array format

HIP_AD_FORMAT_UNSIGNED_INT8: int#
HIP_AD_FORMAT_UNSIGNED_INT16: int#
HIP_AD_FORMAT_UNSIGNED_INT32: int#
HIP_AD_FORMAT_SIGNED_INT8: int#
HIP_AD_FORMAT_SIGNED_INT16: int#
HIP_AD_FORMAT_SIGNED_INT32: int#
HIP_AD_FORMAT_HALF: int#
HIP_AD_FORMAT_FLOAT: int#
class rocm.bindings.hip.HIP_ARRAY_DESCRIPTOR(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP array descriptor

Width: Any#
Height: Any#
Format: Any#
NumChannels: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_ARRAY3D_DESCRIPTOR(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP 3D array descriptor

Width: Any#
Height: Any#
Depth: Any#
Format: Any#
NumChannels: Any#
Flags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hip_Memcpy2D(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP 2D memory copy parameters

srcXInBytes: Any#
srcY: Any#
srcMemoryType: Any#
srcHost: Any#
srcDevice: Any#
srcArray: Any#
srcPitch: Any#
dstXInBytes: Any#
dstY: Any#
dstMemoryType: Any#
dstHost: Any#
dstDevice: Any#
dstArray: Any#
dstPitch: Any#
WidthInBytes: Any#
Height: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMipmappedArray(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP mipmapped array

data: Any#
desc: Any#
type: Any#
width: Any#
height: Any#
depth: Any#
min_mipmap_level: Any#
max_mipmap_level: Any#
flags: Any#
format: Any#
num_channels: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipMipmappedArray_t#
rocm.bindings.hip.hipmipmappedArray#
rocm.bindings.hip.hipMipmappedArray_const_t#
class rocm.bindings.hip.hipResourceType#

Bases: enum.IntEnum

HIP resource types

hipResourceTypeArray: int#
hipResourceTypeMipmappedArray: int#
hipResourceTypeLinear: int#
hipResourceTypePitch2D: int#
class rocm.bindings.hip.HIPresourcetype_enum#

Bases: enum.IntEnum

(No short description)

HIP_RESOURCE_TYPE_ARRAY: int#
HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY: int#
HIP_RESOURCE_TYPE_LINEAR: int#
HIP_RESOURCE_TYPE_PITCH2D: int#
rocm.bindings.hip.HIPresourcetype#
rocm.bindings.hip.hipResourcetype#
class rocm.bindings.hip.HIPaddress_mode_enum#

Bases: enum.IntEnum

HIP texture address modes

HIP_TR_ADDRESS_MODE_WRAP: int#
HIP_TR_ADDRESS_MODE_CLAMP: int#
HIP_TR_ADDRESS_MODE_MIRROR: int#
HIP_TR_ADDRESS_MODE_BORDER: int#
rocm.bindings.hip.HIPaddress_mode#
class rocm.bindings.hip.HIPfilter_mode_enum#

Bases: enum.IntEnum

HIP filter modes

HIP_TR_FILTER_MODE_POINT: int#
HIP_TR_FILTER_MODE_LINEAR: int#
rocm.bindings.hip.HIPfilter_mode#
class rocm.bindings.hip.HIP_TEXTURE_DESC_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP texture descriptor

filterMode: Any#
flags: Any#
maxAnisotropy: Any#
mipmapFilterMode: Any#
mipmapLevelBias: Any#
minMipmapLevelClamp: Any#
maxMipmapLevelClamp: Any#
borderColor: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.HIP_TEXTURE_DESC#
class rocm.bindings.hip.hipResourceViewFormat#

Bases: enum.IntEnum

HIP texture resource view formats

hipResViewFormatNone: int#
hipResViewFormatUnsignedChar1: int#
hipResViewFormatUnsignedChar2: int#
hipResViewFormatUnsignedChar4: int#
hipResViewFormatSignedChar1: int#
hipResViewFormatSignedChar2: int#
hipResViewFormatSignedChar4: int#
hipResViewFormatUnsignedShort1: int#
hipResViewFormatUnsignedShort2: int#
hipResViewFormatUnsignedShort4: int#
hipResViewFormatSignedShort1: int#
hipResViewFormatSignedShort2: int#
hipResViewFormatSignedShort4: int#
hipResViewFormatUnsignedInt1: int#
hipResViewFormatUnsignedInt2: int#
hipResViewFormatUnsignedInt4: int#
hipResViewFormatSignedInt1: int#
hipResViewFormatSignedInt2: int#
hipResViewFormatSignedInt4: int#
hipResViewFormatHalf1: int#
hipResViewFormatHalf2: int#
hipResViewFormatHalf4: int#
hipResViewFormatFloat1: int#
hipResViewFormatFloat2: int#
hipResViewFormatFloat4: int#
hipResViewFormatUnsignedBlockCompressed1: int#
hipResViewFormatUnsignedBlockCompressed2: int#
hipResViewFormatUnsignedBlockCompressed3: int#
hipResViewFormatUnsignedBlockCompressed4: int#
hipResViewFormatSignedBlockCompressed4: int#
hipResViewFormatUnsignedBlockCompressed5: int#
hipResViewFormatSignedBlockCompressed5: int#
hipResViewFormatUnsignedBlockCompressed6H: int#
hipResViewFormatSignedBlockCompressed6H: int#
hipResViewFormatUnsignedBlockCompressed7: int#
class rocm.bindings.hip.HIPresourceViewFormat_enum#

Bases: enum.IntEnum

HIP texture resource view formats

HIP_RES_VIEW_FORMAT_NONE: int#
HIP_RES_VIEW_FORMAT_UINT_1X8: int#
HIP_RES_VIEW_FORMAT_UINT_2X8: int#
HIP_RES_VIEW_FORMAT_UINT_4X8: int#
HIP_RES_VIEW_FORMAT_SINT_1X8: int#
HIP_RES_VIEW_FORMAT_SINT_2X8: int#
HIP_RES_VIEW_FORMAT_SINT_4X8: int#
HIP_RES_VIEW_FORMAT_UINT_1X16: int#
HIP_RES_VIEW_FORMAT_UINT_2X16: int#
HIP_RES_VIEW_FORMAT_UINT_4X16: int#
HIP_RES_VIEW_FORMAT_SINT_1X16: int#
HIP_RES_VIEW_FORMAT_SINT_2X16: int#
HIP_RES_VIEW_FORMAT_SINT_4X16: int#
HIP_RES_VIEW_FORMAT_UINT_1X32: int#
HIP_RES_VIEW_FORMAT_UINT_2X32: int#
HIP_RES_VIEW_FORMAT_UINT_4X32: int#
HIP_RES_VIEW_FORMAT_SINT_1X32: int#
HIP_RES_VIEW_FORMAT_SINT_2X32: int#
HIP_RES_VIEW_FORMAT_SINT_4X32: int#
HIP_RES_VIEW_FORMAT_FLOAT_1X16: int#
HIP_RES_VIEW_FORMAT_FLOAT_2X16: int#
HIP_RES_VIEW_FORMAT_FLOAT_4X16: int#
HIP_RES_VIEW_FORMAT_FLOAT_1X32: int#
HIP_RES_VIEW_FORMAT_FLOAT_2X32: int#
HIP_RES_VIEW_FORMAT_FLOAT_4X32: int#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC1: int#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC2: int#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC3: int#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC4: int#
HIP_RES_VIEW_FORMAT_SIGNED_BC4: int#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC5: int#
HIP_RES_VIEW_FORMAT_SIGNED_BC5: int#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H: int#
HIP_RES_VIEW_FORMAT_SIGNED_BC6H: int#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC7: int#
rocm.bindings.hip.HIPresourceViewFormat#
class rocm.bindings.hip.hipResourceDesc_union_0_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

array: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipResourceDesc_union_0_struct_1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

mipmap: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipResourceDesc_union_0_struct_2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

devPtr: Any#
desc: Any#
sizeInBytes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipResourceDesc_union_0_struct_3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

devPtr: Any#
desc: Any#
width: Any#
height: Any#
pitchInBytes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipResourceDesc_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

array: Any#
mipmap: Any#
linear: Any#
pitch2D: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipResourceDesc(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP resource descriptor

resType: Any#
res: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_RESOURCE_DESC_st_union_0_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

hArray: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_RESOURCE_DESC_st_union_0_struct_1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

hMipmappedArray: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_RESOURCE_DESC_st_union_0_struct_2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

devPtr: Any#
format: Any#
numChannels: Any#
sizeInBytes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_RESOURCE_DESC_st_union_0_struct_3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

devPtr: Any#
format: Any#
numChannels: Any#
width: Any#
height: Any#
pitchInBytes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_RESOURCE_DESC_st_union_0_struct_4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_RESOURCE_DESC_st_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

array: Any#
mipmap: Any#
linear: Any#
pitch2D: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_RESOURCE_DESC_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP resource view descriptor struct

resType: Any#
res: Any#
flags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.HIP_RESOURCE_DESC#
class rocm.bindings.hip.hipResourceViewDesc(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP resource view descriptor

format: Any#
width: Any#
height: Any#
depth: Any#
firstMipmapLevel: Any#
lastMipmapLevel: Any#
firstLayer: Any#
lastLayer: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_RESOURCE_VIEW_DESC_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Resource view descriptor

format: Any#
width: Any#
height: Any#
depth: Any#
firstMipmapLevel: Any#
lastMipmapLevel: Any#
firstLayer: Any#
lastLayer: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.HIP_RESOURCE_VIEW_DESC#
class rocm.bindings.hip.hipMemcpyKind#

Bases: enum.IntEnum

(No short description)

hipMemcpyHostToHost: int#
hipMemcpyHostToDevice: int#
hipMemcpyDeviceToHost: int#
hipMemcpyDeviceToDevice: int#
hipMemcpyDefault: int#
hipMemcpyDeviceToDeviceNoCU: int#
class rocm.bindings.hip.hipPitchedPtr(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP pithed pointer

ptr: Any#
pitch: Any#
xsize: Any#
ysize: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExtent(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP extent

width: Any#
height: Any#
depth: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipPos(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP position

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpy3DParms(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP 3D memory copy parameters

srcArray: Any#
srcPos: Any#
srcPtr: Any#
dstArray: Any#
dstPos: Any#
dstPtr: Any#
extent: Any#
kind: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.HIP_MEMCPY3D(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP 3D memory copy

srcXInBytes: Any#
srcY: Any#
srcZ: Any#
srcLOD: Any#
srcMemoryType: Any#
srcHost: Any#
srcDevice: Any#
srcArray: Any#
srcPitch: Any#
srcHeight: Any#
dstXInBytes: Any#
dstY: Any#
dstZ: Any#
dstLOD: Any#
dstMemoryType: Any#
dstHost: Any#
dstDevice: Any#
dstArray: Any#
dstPitch: Any#
dstHeight: Any#
WidthInBytes: Any#
Height: Any#
Depth: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemLocationType#

Bases: enum.IntEnum

Specifies the type of location

hipMemLocationTypeInvalid: int#
hipMemLocationTypeNone: int#
hipMemLocationTypeDevice: int#
hipMemLocationTypeHost: int#
hipMemLocationTypeHostNuma: int#
hipMemLocationTypeHostNumaCurrent: int#
class rocm.bindings.hip.hipMemLocation(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Specifies a memory location.

To specify a gpu, set type = hipMemLocationTypeDevice and set id = the gpu’s device ID

type: Any#
id: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpyFlags#

Bases: enum.IntEnum

Flags to specify for copies within a batch. Used with hipMemcpyBatchAsync

hipMemcpyFlagDefault: int#
hipMemcpyFlagPreferOverlapWithCompute: int#
hipMemcpyFlagExtPreferCE: int#
hipMemcpyFlagExtOpSwap: int#
hipMemcpyFlagExtOpIndirectSrc: int#
hipMemcpyFlagExtOpIndirectDst: int#
class rocm.bindings.hip.hipMemcpySrcAccessOrder#

Bases: enum.IntEnum

Flags to specify order in which source pointer is accessed by Batch memcpy

hipMemcpySrcAccessOrderInvalid: int#
hipMemcpySrcAccessOrderStream: int#
hipMemcpySrcAccessOrderDuringApiCall: int#
hipMemcpySrcAccessOrderAny: int#
hipMemcpySrcAccessOrderMax: int#
class rocm.bindings.hip.hipMemcpyAttributes(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Attributes for copies within a batch.

srcAccessOrder: Any#
srcLocHint: Any#
dstLocHint: Any#
flags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpy3DOperandType#

Bases: enum.IntEnum

Operand types for individual copies within a batch

hipMemcpyOperandTypePointer: int#
hipMemcpyOperandTypeArray: int#
hipMemcpyOperandTypeMax: int#
class rocm.bindings.hip.hipOffset3D(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Struct representing offset into a hipArray_t in elements.

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpy3DOperand_union_0_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

ptr: Any#
rowLength: Any#
layerHeight: Any#
locHint: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpy3DOperand_union_0_struct_1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

array: Any#
offset: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpy3DOperand_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

ptr: Any#
array: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpy3DOperand(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Struct representing an operand for copy with hipMemcpy3DBatchAsync.

type: Any#
op: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpy3DBatchOp(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP 3D Batch Op

src: Any#
dst: Any#
extent: Any#
srcAccessOrder: Any#
flags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpy3DPeerParms(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

srcArray: Any#
srcPos: Any#
srcPtr: Any#
srcDevice: Any#
dstArray: Any#
dstPos: Any#
dstPtr: Any#
dstDevice: Any#
extent: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipFunction_attribute#

Bases: enum.IntEnum

(No short description)

HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: int#
HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: int#
HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: int#
HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: int#
HIP_FUNC_ATTRIBUTE_NUM_REGS: int#
HIP_FUNC_ATTRIBUTE_PTX_VERSION: int#
HIP_FUNC_ATTRIBUTE_BINARY_VERSION: int#
HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA: int#
HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: int#
HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: int#
HIP_FUNC_ATTRIBUTE_CLUSTER_DIM_MUST_BE_SET: int#
HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: int#
HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: int#
HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: int#
HIP_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED: int#
HIP_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: int#
HIP_FUNC_ATTRIBUTE_MAX: int#
class rocm.bindings.hip.hipPointer_attribute#

Bases: enum.IntEnum

(No short description)

HIP_POINTER_ATTRIBUTE_CONTEXT: int#
HIP_POINTER_ATTRIBUTE_MEMORY_TYPE: int#
HIP_POINTER_ATTRIBUTE_DEVICE_POINTER: int#
HIP_POINTER_ATTRIBUTE_HOST_POINTER: int#
HIP_POINTER_ATTRIBUTE_P2P_TOKENS: int#
HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS: int#
HIP_POINTER_ATTRIBUTE_BUFFER_ID: int#
HIP_POINTER_ATTRIBUTE_IS_MANAGED: int#
HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL: int#
HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE: int#
HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR: int#
HIP_POINTER_ATTRIBUTE_RANGE_SIZE: int#
HIP_POINTER_ATTRIBUTE_MAPPED: int#
HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES: int#
HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE: int#
HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS: int#
HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE: int#
class rocm.bindings.hip.uchar1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.uchar2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.uchar3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.uchar4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.char1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.char2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.char3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.char4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ushort1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ushort2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ushort3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ushort4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.short1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.short2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.short3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.short4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.uint1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.uint2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.uint3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.uint4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.int1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.int2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.int3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.int4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ulong1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ulong2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ulong3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ulong4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.long1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.long2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.long3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.long4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ulonglong1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ulonglong2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ulonglong3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ulonglong4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.longlong1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.longlong2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.longlong3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.longlong4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.float1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.float2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.float3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.float4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.double1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.double2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.double3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.double4(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

x: Any#
y: Any#
z: Any#
w: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipCreateChannelDesc(x, y, z, w, f)#

!__LP64__

Args:
x (int):

(undocumented)

y (int):

(undocumented)

z (int):

(undocumented)

w (int):

(undocumented)

f (hipChannelFormatKind):

(undocumented)

Returns:

A tuple of size 2 that contains (in that order):

C signature

struct hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w, enum hipChannelFormatKind f)
rocm.bindings.hip.hipTextureObject_t#
class rocm.bindings.hip.hipTextureAddressMode#

Bases: enum.IntEnum

hip texture address modes

hipAddressModeWrap: int#
hipAddressModeClamp: int#
hipAddressModeMirror: int#
hipAddressModeBorder: int#
class rocm.bindings.hip.hipTextureFilterMode#

Bases: enum.IntEnum

hip texture filter modes

hipFilterModePoint: int#
hipFilterModeLinear: int#
class rocm.bindings.hip.hipTextureReadMode#

Bases: enum.IntEnum

hip texture read modes

hipReadModeElementType: int#
hipReadModeNormalizedFloat: int#
class rocm.bindings.hip.textureReference(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

hip texture reference

normalized: Any#
readMode: Any#
filterMode: Any#
channelDesc: Any#
sRGB: Any#
maxAnisotropy: Any#
mipmapFilterMode: Any#
mipmapLevelBias: Any#
minMipmapLevelClamp: Any#
maxMipmapLevelClamp: Any#
textureObject: Any#
numChannels: Any#
format: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipTextureDesc(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

hip texture descriptor

filterMode: Any#
readMode: Any#
sRGB: Any#
borderColor: Any#
normalizedCoords: Any#
maxAnisotropy: Any#
mipmapFilterMode: Any#
mipmapLevelBias: Any#
minMipmapLevelClamp: Any#
maxMipmapLevelClamp: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipSurfaceObject_t#
class rocm.bindings.hip.surfaceReference(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

hip surface reference

surfaceObject: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipSurfaceBoundaryMode#

Bases: enum.IntEnum

hip surface boundary modes

hipBoundaryModeZero: int#
hipBoundaryModeTrap: int#
hipBoundaryModeClamp: int#
class rocm.bindings.hip.ihipCtx_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipCtx_t#
class rocm.bindings.hip.ihipExecutionCtx_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipExecutionCtx_t#
class rocm.bindings.hip.ihipDevResourceDesc_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipDevResourceDesc_t#
class rocm.bindings.hip.hipDevResourceType#

Bases: enum.IntEnum

(No short description)

hipDevResourceTypeInvalid: int#
hipDevResourceTypeSm: int#
hipDevResourceTypeWorkqueueConfig: int#
hipDevResourceTypeWorkqueue: int#
class rocm.bindings.hip.hipDevSmResourceGroup_flags#

Bases: enum.IntEnum

(No short description)

hipDevSmResourceGroupDefault: int#
hipDevSmResourceGroupBackfill: int#
class rocm.bindings.hip.hipDevSmResourceSplitByCount_flags#

Bases: enum.IntEnum

(No short description)

hipDevSmResourceSplitIgnoreSmCoscheduling: int#
hipDevSmResourceSplitMaxPotentialClusterSize: int#
class rocm.bindings.hip.hipDevWorkqueueConfigScope#

Bases: enum.IntEnum

(No short description)

hipDevWorkqueueConfigScopeDeviceCtx: int#
hipDevWorkqueueConfigScopeGreenCtxBalanced: int#
class rocm.bindings.hip.hipDevSmResource(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

smCount: Any#
minSmPartitionSize: Any#
smCoscheduledAlignment: Any#
flags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipDevWorkqueueConfigResource(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

device: Any#
wqConcurrencyLimit: Any#
sharingScope: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipDevWorkqueueResource(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipDevResource_st_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

sm: Any#
wqConfig: Any#
wq: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipDevResource_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

type: Any#
nextResource: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipDevResource#
class rocm.bindings.hip.hipDevSmResourceGroupParams_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

smCount: Any#
coscheduledSmCount: Any#
preferredCoscheduledSmCount: Any#
flags: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipDevSmResourceGroupParams#
class rocm.bindings.hip.hipDeviceP2PAttr#

Bases: enum.IntEnum

(No short description)

hipDevP2PAttrPerformanceRank: int#
hipDevP2PAttrAccessSupported: int#
hipDevP2PAttrNativeAtomicSupported: int#
hipDevP2PAttrHipArrayAccessSupported: int#
class rocm.bindings.hip.hipDriverEntryPointQueryResult#

Bases: enum.IntEnum

(No short description)

hipDriverEntryPointSuccess: int#
hipDriverEntryPointSymbolNotFound: int#
hipDriverEntryPointVersionNotSufficent: int#
class rocm.bindings.hip.ihipStream_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipStream_t#
class rocm.bindings.hip.hipIpcMemHandle_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipIpcMemHandle_t#
class rocm.bindings.hip.hipIpcEventHandle_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipIpcEventHandle_t#
class rocm.bindings.hip.hipMemFabricHandle_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

data: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipMemFabricHandle_t#
class rocm.bindings.hip.ihipModule_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipModule_t#
class rocm.bindings.hip.ihipModuleSymbol_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipFunction_t#
class rocm.bindings.hip.ihipLinkState_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipLinkState_t#
class rocm.bindings.hip.ihipLibrary_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipLibrary_t#
class rocm.bindings.hip.ihipKernel_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipKernel_t#
class rocm.bindings.hip.ihipMemPoolHandle_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipMemPool_t#
class rocm.bindings.hip.hipFuncAttributes(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

binaryVersion: Any#
cacheModeCA: Any#
constSizeBytes: Any#
localSizeBytes: Any#
maxDynamicSharedSizeBytes: Any#
maxThreadsPerBlock: Any#
numRegs: Any#
preferredShmemCarveout: Any#
ptxVersion: Any#
sharedSizeBytes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ihipEvent_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipEvent_t#
class rocm.bindings.hip.hipLimit_t#

Bases: enum.IntEnum

hipLimit

Note:

In HIP device limit-related APIs, any input limit value other than those defined in the enum is treated as “UnsupportedLimit” by default.

hipLimitStackSize: int#
hipLimitPrintfFifoSize: int#
hipLimitMallocHeapSize: int#
hipExtLimitScratchMin: int#
hipExtLimitScratchMax: int#
hipExtLimitScratchCurrent: int#
hipLimitRange: int#
class rocm.bindings.hip.hipStreamBatchMemOpType#

Bases: enum.IntEnum

Operations for hipStreamBatchMemOp

hipStreamMemOpWaitValue32: int#
hipStreamMemOpWriteValue32: int#
hipStreamMemOpWaitValue64: int#
hipStreamMemOpWriteValue64: int#
hipStreamMemOpBarrier: int#
hipStreamMemOpFlushRemoteWrites: int#
class rocm.bindings.hip.hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

value: Any#
value64: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

operation: Any#
address: Any#
flags: Any#
alias: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

value: Any#
value64: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

operation: Any#
address: Any#
flags: Any#
alias: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

operation: Any#
flags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

operation: Any#
flags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipStreamBatchMemOpParams_union(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Union representing batch memory operation parameters for HIP streams.

hipStreamBatchMemOpParams is used to specify the parameters for batch memory operations in a HIP stream. This union supports various operations including waiting for a specific value, writing a value, and different flags for wait conditions.

The union includes fields for different types of operations defined in the enum hipStreamBatchMemOpType: - hipStreamMemOpWaitValue32: Wait for a 32-bit value. - hipStreamMemOpWriteValue32: Write a 32-bit value. - hipStreamMemOpWaitValue64: Wait for a 64-bit value. - hipStreamMemOpWriteValue64: Write a 64-bit value.

Each operation type includes an address, the value to wait for or write, flags, and an optional alias that is not relevant on AMD GPUs. Flags can be used to specify different wait conditions such as equality, bitwise AND, greater than or equal, and bitwise NOR.

Example usage:

hipStreamBatchMemOpParams myArray[2];
myArray[0].operation = hipStreamMemOpWaitValue32;
myArray[0].waitValue.address = waitAddr1;
myArray[0].waitValue.value = 0x1;
myArray[0].waitValue.flags = CU_STREAM_WAIT_VALUE_EQ;

myArray[1].operation = hipStreamMemOpWriteValue32;
myArray[1].writeValue.address = writeAddr1;
myArray[1].writeValue.value = 0x1;
myArray[1].writeValue.flags = 0x0;

result = hipStreamBatchMemOp(stream, 2, myArray, 0);
operation: Any#
waitValue: Any#
writeValue: Any#
flushRemoteWrites: Any#
memoryBarrier: Any#
pad: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipStreamBatchMemOpParams#
class rocm.bindings.hip.hipBatchMemOpNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Structure representing node parameters for batch memory operations in HIP graphs.

hipBatchMemOpNodeParams is used to specify the parameters for batch memory operations in HIP graphs. This struct includes the context to use for the operations, the number of operations, and an array of hipStreamBatchMemOpParams that describe the operations.

The structure includes the following fields: - ctx: The HIP context to use for the operations. - count: The number of operations in the paramArray. - paramArray: A pointer to an array of hipStreamBatchMemOpParams. - flags: Flags to control the node.

Example usage:

hipBatchMemOpNodeParams nodeParams;
nodeParams.ctx = context;
nodeParams.count = ARRAY_SIZE;
nodeParams.paramArray = myArray;
nodeParams.flags = 0;

Pass nodeParams to a HIP graph APIs hipGraphAddBatchMemOpNode, hipGraphBatchMemOpNodeGetParams,
hipGraphBatchMemOpNodeSetParams, hipGraphExecBatchMemOpNodeSetParams
ctx: Any#
count: Any#
paramArray: Any#
flags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemoryAdvise#

Bases: enum.IntEnum

HIP Memory Advise values

Note:

This memory advise enumeration is used on Linux, not Windows.

hipMemAdviseSetReadMostly: int#
hipMemAdviseUnsetReadMostly: int#
hipMemAdviseSetPreferredLocation: int#
hipMemAdviseUnsetPreferredLocation: int#
hipMemAdviseSetAccessedBy: int#
hipMemAdviseUnsetAccessedBy: int#
hipMemAdviseSetCoarseGrain: int#
hipMemAdviseUnsetCoarseGrain: int#
class rocm.bindings.hip.hipMemRangeCoherencyMode#

Bases: enum.IntEnum

HIP Coherency Mode

hipMemRangeCoherencyModeFineGrain: int#
hipMemRangeCoherencyModeCoarseGrain: int#
hipMemRangeCoherencyModeIndeterminate: int#
class rocm.bindings.hip.hipMemRangeAttribute#

Bases: enum.IntEnum

HIP range attributes

hipMemRangeAttributeReadMostly: int#
hipMemRangeAttributePreferredLocation: int#
hipMemRangeAttributeAccessedBy: int#
hipMemRangeAttributeLastPrefetchLocation: int#
hipMemRangeAttributeCoherencyMode: int#
class rocm.bindings.hip.hipMemPoolAttr#

Bases: enum.IntEnum

HIP memory pool attributes

hipMemPoolReuseFollowEventDependencies: int#
hipMemPoolReuseAllowOpportunistic: int#
hipMemPoolReuseAllowInternalDependencies: int#
hipMemPoolAttrReleaseThreshold: int#
hipMemPoolAttrReservedMemCurrent: int#
hipMemPoolAttrReservedMemHigh: int#
hipMemPoolAttrUsedMemCurrent: int#
hipMemPoolAttrUsedMemHigh: int#
class rocm.bindings.hip.hipMemAccessFlags#

Bases: enum.IntEnum

Specifies the memory protection flags for mapping

hipMemAccessFlagsProtNone: int#
hipMemAccessFlagsProtRead: int#
hipMemAccessFlagsProtReadWrite: int#
class rocm.bindings.hip.hipMemAccessDesc(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Memory access descriptor structure is used to specify memory access permissions for a virtual memory region in Virtual Memory Management API.

This structure changes read, and write permissions for specific memory regions.

location: Any#
flags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemAllocationType#

Bases: enum.IntEnum

Defines the allocation types

hipMemAllocationTypeInvalid: int#
hipMemAllocationTypePinned: int#
hipMemAllocationTypeManaged: int#
hipMemAllocationTypeUncached: int#
hipMemAllocationTypeMax: int#
class rocm.bindings.hip.hipMemAllocationHandleType#

Bases: enum.IntEnum

Flags for specifying handle types for memory pool allocations

hipMemHandleTypeNone: int#
hipMemHandleTypePosixFileDescriptor: int#
hipMemHandleTypeWin32: int#
hipMemHandleTypeWin32Kmt: int#
hipMemHandleTypeFabric: int#
class rocm.bindings.hip.hipMemPoolProps(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Specifies the properties of allocations made from the pool.

allocType: Any#
handleTypes: Any#
location: Any#
win32SecurityAttributes: Any#
maxSize: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemPoolPtrExportData(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Opaque data structure for exporting a pool allocation

reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipFuncAttribute#

Bases: enum.IntEnum

On AMD devices and some Nvidia devices, these hints and controls are ignored.

Warning:

hipFuncAttributeMaxDynamicSharedMemorySize: int#
hipFuncAttributePreferredSharedMemoryCarveout: int#
hipFuncAttributeClusterDimMustBeSet: int#
hipFuncAttributeRequiredClusterWidth: int#
hipFuncAttributeRequiredClusterHeight: int#
hipFuncAttributeRequiredClusterDepth: int#
hipFuncAttributeNonPortableClusterSizeAllowed: int#
hipFuncAttributeClusterSchedulingPolicyPreference: int#
hipFuncAttributeMax: int#
class rocm.bindings.hip.hipFuncCache_t#

Bases: enum.IntEnum

On AMD devices and some Nvidia devices, these hints and controls are ignored.

Warning:

hipFuncCachePreferNone: int#
hipFuncCachePreferShared: int#
hipFuncCachePreferL1: int#
hipFuncCachePreferEqual: int#
class rocm.bindings.hip.hipSharedMemConfig#

Bases: enum.IntEnum

On AMD devices and some Nvidia devices, these hints and controls are ignored.

Warning:

hipSharedMemBankSizeDefault: int#
hipSharedMemBankSizeFourByte: int#
hipSharedMemBankSizeEightByte: int#
class rocm.bindings.hip.dim3(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Struct for data in 3D

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipLaunchParams_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

struct hipLaunchParams_t

func: Any#
gridDim: Any#
blockDim: Any#
args: Any#
sharedMem: Any#
stream: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipLaunchParams#
class rocm.bindings.hip.hipFunctionLaunchParams_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

struct hipFunctionLaunchParams_t

function: Any#
gridDimX: Any#
gridDimY: Any#
gridDimZ: Any#
blockDimX: Any#
blockDimY: Any#
blockDimZ: Any#
sharedMemBytes: Any#
hStream: Any#
kernelParams: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipFunctionLaunchParams#
class rocm.bindings.hip.hipExternalMemoryHandleType_enum#

Bases: enum.IntEnum

(No short description)

hipExternalMemoryHandleTypeOpaqueFd: int#
hipExternalMemoryHandleTypeOpaqueWin32: int#
hipExternalMemoryHandleTypeOpaqueWin32Kmt: int#
hipExternalMemoryHandleTypeD3D12Heap: int#
hipExternalMemoryHandleTypeD3D12Resource: int#
hipExternalMemoryHandleTypeD3D11Resource: int#
hipExternalMemoryHandleTypeD3D11ResourceKmt: int#
hipExternalMemoryHandleTypeNvSciBuf: int#
rocm.bindings.hip.hipExternalMemoryHandleType#
class rocm.bindings.hip.hipExternalMemoryHandleDesc_st_union_0_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

handle: Any#
name: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalMemoryHandleDesc_st_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

fd: Any#
win32: Any#
nvSciBufObject: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalMemoryHandleDesc_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

type: Any#
handle: Any#
size: Any#
flags: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipExternalMemoryHandleDesc#
class rocm.bindings.hip.hipExternalMemoryBufferDesc_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

offset: Any#
size: Any#
flags: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipExternalMemoryBufferDesc#
class rocm.bindings.hip.hipExternalMemoryMipmappedArrayDesc_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

offset: Any#
formatDesc: Any#
extent: Any#
flags: Any#
numLevels: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipExternalMemoryMipmappedArrayDesc#
class rocm.bindings.hip.hipExternalSemaphoreHandleType_enum#

Bases: enum.IntEnum

(No short description)

hipExternalSemaphoreHandleTypeOpaqueFd: int#
hipExternalSemaphoreHandleTypeOpaqueWin32: int#
hipExternalSemaphoreHandleTypeOpaqueWin32Kmt: int#
hipExternalSemaphoreHandleTypeD3D12Fence: int#
hipExternalSemaphoreHandleTypeD3D11Fence: int#
hipExternalSemaphoreHandleTypeNvSciSync: int#
hipExternalSemaphoreHandleTypeKeyedMutex: int#
hipExternalSemaphoreHandleTypeKeyedMutexKmt: int#
hipExternalSemaphoreHandleTypeTimelineSemaphoreFd: int#
hipExternalSemaphoreHandleTypeTimelineSemaphoreWin32: int#
rocm.bindings.hip.hipExternalSemaphoreHandleType#
class rocm.bindings.hip.hipExternalSemaphoreHandleDesc_st_union_0_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

handle: Any#
name: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreHandleDesc_st_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

fd: Any#
win32: Any#
NvSciSyncObj: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreHandleDesc_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

type: Any#
handle: Any#
flags: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipExternalSemaphoreHandleDesc#
class rocm.bindings.hip.hipExternalSemaphoreSignalParams_st_struct_0_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

value: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreSignalParams_st_struct_0_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

fence: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreSignalParams_st_struct_0_struct_1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

key: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreSignalParams_st_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

fence: Any#
nvSciSync: Any#
keyedMutex: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreSignalParams_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

params: Any#
flags: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipExternalSemaphoreSignalParams#
class rocm.bindings.hip.hipExternalSemaphoreWaitParams_st_struct_0_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

value: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreWaitParams_st_struct_0_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

fence: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreWaitParams_st_struct_0_struct_1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

key: Any#
timeoutMs: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreWaitParams_st_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

fence: Any#
nvSciSync: Any#
keyedMutex: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreWaitParams_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

External semaphore wait parameters, compatible with driver type

params: Any#
flags: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipExternalSemaphoreWaitParams#
class rocm.bindings.hip.hipGraphicsRegisterFlags#

Bases: enum.IntEnum

HIP Access falgs for Interop resources.

hipGraphicsRegisterFlagsNone: int#
hipGraphicsRegisterFlagsReadOnly: int#
hipGraphicsRegisterFlagsWriteDiscard: int#
hipGraphicsRegisterFlagsSurfaceLoadStore: int#
hipGraphicsRegisterFlagsTextureGather: int#
rocm.bindings.hip.hipGraphicsResource#
rocm.bindings.hip.hipGraphicsResource_t#
class rocm.bindings.hip.ihipGraph(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipGraph_t#
class rocm.bindings.hip.hipGraphNode(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipGraphNode_t#
class rocm.bindings.hip.hipGraphExec(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipGraphExec_t#
class rocm.bindings.hip.hipUserObject(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipUserObject_t#
class rocm.bindings.hip.hipGraphNodeType#

Bases: enum.IntEnum

hipGraphNodeType

hipGraphNodeTypeKernel: int#
hipGraphNodeTypeMemcpy: int#
hipGraphNodeTypeMemset: int#
hipGraphNodeTypeHost: int#
hipGraphNodeTypeGraph: int#
hipGraphNodeTypeEmpty: int#
hipGraphNodeTypeWaitEvent: int#
hipGraphNodeTypeEventRecord: int#
hipGraphNodeTypeExtSemaphoreSignal: int#
hipGraphNodeTypeExtSemaphoreWait: int#
hipGraphNodeTypeMemAlloc: int#
hipGraphNodeTypeMemFree: int#
hipGraphNodeTypeMemcpyFromSymbol: int#
hipGraphNodeTypeMemcpyToSymbol: int#
hipGraphNodeTypeBatchMemOp: int#
hipGraphNodeTypeCount: int#
class rocm.bindings.hip.hipHostFn_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

class rocm.bindings.hip.hipHostNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

fn: Any#
userData: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipKernelNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

blockDim: Any#
extra: Any#
func: Any#
gridDim: Any#
kernelParams: Any#
sharedMemBytes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemsetParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

dst: Any#
elementSize: Any#
height: Any#
pitch: Any#
value: Any#
width: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemAllocNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

poolProps: Any#
accessDescs: Any#
accessDescCount: Any#
bytesize: Any#
dptr: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipAccessProperty#

Bases: enum.IntEnum

Specifies performance hint with hipAccessPolicyWindow

hipAccessPropertyNormal: int#
hipAccessPropertyStreaming: int#
hipAccessPropertyPersisting: int#
class rocm.bindings.hip.hipAccessPolicyWindow(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Specifies access policy for a window, a contiguous extent of memory beginning at base_ptr and ending at base_ptr + num_bytes.

base_ptr: Any#
hitProp: Any#
hitRatio: Any#
missProp: Any#
num_bytes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipLaunchMemSyncDomainMap(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Memory Synchronization Domain map

default_: Any#
remote: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipLaunchMemSyncDomain#

Bases: enum.IntEnum

Memory Synchronization Domain

hipLaunchMemSyncDomainDefault: int#
hipLaunchMemSyncDomainRemote: int#
class rocm.bindings.hip.hipSynchronizationPolicy#

Bases: enum.IntEnum

Stream Synchronization Policy.

Can be set with hipStreamSetAttribute

hipSyncPolicyAuto: int#
hipSyncPolicySpin: int#
hipSyncPolicyYield: int#
hipSyncPolicyBlockingSync: int#
class rocm.bindings.hip.hipClusterSchedulingPolicy#

Bases: enum.IntEnum

(No short description)

hipClusterSchedulingPolicyDefault: int#
hipClusterSchedulingPolicySpread: int#
hipClusterSchedulingPolicyLoadBalancing: int#
class rocm.bindings.hip.hipExtDynDataPrefetchTemporal#

Bases: enum.IntEnum

Temporal locality hint for dynamic data prefetch.

hipExtDynDataPrefetchTemporalRegular: int#
hipExtDynDataPrefetchTemporalHigh: int#
class rocm.bindings.hip.hipExtDynDataPrefetchRegion(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Describes one 2D memory region to prefetch into L2 cache.

address must be aligned to the device’s L2 cache line size. width is measured in bytes and must be a multiple of the cache line size. height is the number of rows to prefetch. stride is the byte stride between the start of consecutive rows.

address: Any#
stride: Any#
width: Any#
height: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExtDynDataPrefetchConfig(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Configuration for dynamic data prefetch.

Pointed to by a launch attribute via hipLaunchAttributeExtDynDataPrefetch . numRegions must not exceed the device limit queried via hipDeviceAttributeMaxDynDataPrefetchRegions (use hipDeviceGetAttribute ).

Cooperative prefetch is always enabled internally; the user only controls the temporal policy.

numRegions: Any#
temporal: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipLaunchAttributeID#

Bases: enum.IntEnum

Launch Attribute ID

hipLaunchAttributeIgnore: int#
hipLaunchAttributeAccessPolicyWindow: int#
hipLaunchAttributeCooperative: int#
hipLaunchAttributeSynchronizationPolicy: int#
hipLaunchAttributeClusterDimension: int#
hipLaunchAttributeClusterSchedulingPolicyPreference: int#
hipLaunchAttributePriority: int#
hipLaunchAttributeMemSyncDomainMap: int#
hipLaunchAttributeMemSyncDomain: int#
hipLaunchAttributeExtDynDataPrefetch: int#
hipLaunchAttributeMax: int#
class rocm.bindings.hip.hipLaunchAttributeValue_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Specifies the desired cluster dimensions for a kernel launch.

This opaque type is used as the value for the launch attribute ::hipLaunchAttributeClusterDimension. It defines the dimensions of the compute cluster in terms of blocks, where each field must evenly divide the corresponding grid dimension:

  • x: Number of blocks along the X-axis.

  • y: Number of blocks along the Y-axis.

  • z: Number of blocks along the Z-axis.

x: Any#
y: Any#
z: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipLaunchAttributeValue(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Launch Attribute Value

pad: Any#
accessPolicyWindow: Any#
cooperative: Any#
priority: Any#
syncPolicy: Any#
memSyncDomainMap: Any#
memSyncDomain: Any#
clusterDim: Any#
clusterSchedulingPolicyPreference: Any#
dynDataPrefetch: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipGraphExecUpdateResult#

Bases: enum.IntEnum

Graph execution update result

hipGraphExecUpdateSuccess: int#
hipGraphExecUpdateError: int#
hipGraphExecUpdateErrorTopologyChanged: int#
hipGraphExecUpdateErrorNodeTypeChanged: int#
hipGraphExecUpdateErrorFunctionChanged: int#
hipGraphExecUpdateErrorParametersChanged: int#
hipGraphExecUpdateErrorNotSupported: int#
hipGraphExecUpdateErrorUnsupportedFunctionChange: int#
class rocm.bindings.hip.hipStreamCaptureMode#

Bases: enum.IntEnum

(No short description)

hipStreamCaptureModeGlobal: int#
hipStreamCaptureModeThreadLocal: int#
hipStreamCaptureModeRelaxed: int#
class rocm.bindings.hip.hipStreamCaptureStatus#

Bases: enum.IntEnum

(No short description)

hipStreamCaptureStatusNone: int#
hipStreamCaptureStatusActive: int#
hipStreamCaptureStatusInvalidated: int#
class rocm.bindings.hip.hipStreamUpdateCaptureDependenciesFlags#

Bases: enum.IntEnum

(No short description)

hipStreamAddCaptureDependencies: int#
hipStreamSetCaptureDependencies: int#
class rocm.bindings.hip.hipGraphMemAttributeType#

Bases: enum.IntEnum

(No short description)

hipGraphMemAttrUsedMemCurrent: int#
hipGraphMemAttrUsedMemHigh: int#
hipGraphMemAttrReservedMemCurrent: int#
hipGraphMemAttrReservedMemHigh: int#
class rocm.bindings.hip.hipUserObjectFlags#

Bases: enum.IntEnum

(No short description)

hipUserObjectNoDestructorSync: int#
class rocm.bindings.hip.hipUserObjectRetainFlags#

Bases: enum.IntEnum

(No short description)

hipGraphUserObjectMove: int#
class rocm.bindings.hip.hipGraphInstantiateFlags#

Bases: enum.IntEnum

(No short description)

hipGraphInstantiateFlagAutoFreeOnLaunch: int#
hipGraphInstantiateFlagUpload: int#
hipGraphInstantiateFlagDeviceLaunch: int#
hipGraphInstantiateFlagUseNodePriority: int#
class rocm.bindings.hip.hipGraphDebugDotFlags#

Bases: enum.IntEnum

(No short description)

hipGraphDebugDotFlagsVerbose: int#
hipGraphDebugDotFlagsKernelNodeParams: int#
hipGraphDebugDotFlagsMemcpyNodeParams: int#
hipGraphDebugDotFlagsMemsetNodeParams: int#
hipGraphDebugDotFlagsHostNodeParams: int#
hipGraphDebugDotFlagsEventNodeParams: int#
hipGraphDebugDotFlagsExtSemasSignalNodeParams: int#
hipGraphDebugDotFlagsExtSemasWaitNodeParams: int#
hipGraphDebugDotFlagsKernelNodeAttributes: int#
hipGraphDebugDotFlagsHandles: int#
class rocm.bindings.hip.hipGraphInstantiateResult#

Bases: enum.IntEnum

hipGraphInstantiateWithParams results

hipGraphInstantiateSuccess: int#
hipGraphInstantiateError: int#
hipGraphInstantiateInvalidStructure: int#
hipGraphInstantiateNodeOperationNotSupported: int#
hipGraphInstantiateMultipleDevicesNotSupported: int#
class rocm.bindings.hip.hipGraphInstantiateParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Graph Instantiation parameters

errNode_out: Any#
flags: Any#
result_out: Any#
uploadStream: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemAllocationProp_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

requestedHandleType: Any#
requestedHandleTypes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemAllocationProp_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

compressionType: Any#
gpuDirectRDMACapable: Any#
usage: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemAllocationProp(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Memory allocation properties

type: Any#
location: Any#
win32HandleMetaData: Any#
allocFlags: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreSignalNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

External semaphore signal node parameters

extSemArray: Any#
paramsArray: Any#
numExtSems: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipExternalSemaphoreWaitNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

External semaphore wait node parameters

extSemArray: Any#
paramsArray: Any#
numExtSems: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.ihipMemGenericAllocationHandle(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

rocm.bindings.hip.hipMemGenericAllocationHandle_t#
class rocm.bindings.hip.hipMemAllocationGranularity_flags#

Bases: enum.IntEnum

Flags for granularity

hipMemAllocationGranularityMinimum: int#
hipMemAllocationGranularityRecommended: int#
class rocm.bindings.hip.hipMemHandleType#

Bases: enum.IntEnum

Memory handle type

hipMemHandleTypeGeneric: int#
class rocm.bindings.hip.hipMemOperationType#

Bases: enum.IntEnum

Memory operation types

hipMemOperationTypeMap: int#
hipMemOperationTypeUnmap: int#
class rocm.bindings.hip.hipArraySparseSubresourceType#

Bases: enum.IntEnum

Subresource types for sparse arrays

hipArraySparseSubresourceTypeSparseLevel: int#
hipArraySparseSubresourceTypeMiptail: int#
class rocm.bindings.hip.hipArrayMapInfo_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

mipmap: Any#
array: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipArrayMapInfo_union_1_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

level: Any#
layer: Any#
offsetX: Any#
offsetY: Any#
offsetZ: Any#
extentWidth: Any#
extentHeight: Any#
extentDepth: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipArrayMapInfo_union_1_struct_1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

layer: Any#
offset: Any#
size: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipArrayMapInfo_union_1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

sparseLevel: Any#
miptail: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipArrayMapInfo_union_2(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

memHandle: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipArrayMapInfo(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Map info for arrays

resourceType: Any#
resource: Any#
subresourceType: Any#
subresource: Any#
memOperationType: Any#
memHandleType: Any#
memHandle: Any#
offset: Any#
deviceBitMask: Any#
flags: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemcpyNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Memcpy node params

flags: Any#
reserved: Any#
copyParams: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipChildGraphNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Child graph node params

graph: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipEventWaitNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Event record node params

event: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipEventRecordNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Event record node params

event: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemFreeNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Memory free node params

dptr: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipGraphNodeParams_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

reserved1: Any#
kernel: Any#
memcpy: Any#
memset: Any#
host: Any#
graph: Any#
eventWait: Any#
eventRecord: Any#
extSemSignal: Any#
extSemWait: Any#
alloc: Any#
free: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipGraphNodeParams(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Params for different graph nodes

type: Any#
reserved0: Any#
reserved2: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipGraphDependencyType#

Bases: enum.IntEnum

(No short description)

hipGraphDependencyTypeDefault: int#
hipGraphDependencyTypeProgrammatic: int#
class rocm.bindings.hip.hipGraphEdgeData(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

from_port: Any#
reserved: Any#
to_port: Any#
type: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipLaunchAttribute_st_union_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

val: Any#
value: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipLaunchAttribute_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Used to specify custom attributes for launching kernels

id: Any#
pad: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipLaunchAttribute#
class rocm.bindings.hip.hipLaunchConfig_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP extensible launch configuration

gridDim: Any#
blockDim: Any#
dynamicSmemBytes: Any#
stream: Any#
attrs: Any#
numAttrs: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.hipLaunchConfig_t#
class rocm.bindings.hip.HIP_LAUNCH_CONFIG_st(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HIP driver extensible launch configuration

gridDimX: Any#
gridDimY: Any#
gridDimZ: Any#
blockDimX: Any#
blockDimY: Any#
blockDimZ: Any#
sharedMemBytes: Any#
hStream: Any#
attrs: Any#
numAttrs: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.hip.HIP_LAUNCH_CONFIG#
class rocm.bindings.hip.hipArrayMemoryRequirements(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Struct representing array memory requirements.

alignment: Any#
size: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.hip.hipMemRangeHandleType#

Bases: enum.IntEnum

Requested handle type for address range.

hipMemRangeHandleTypeDmaBufFd: int#
hipMemRangeHandleTypeMax: int#
class rocm.bindings.hip.hipMemRangeFlags#

Bases: enum.IntEnum

Mem Range Flags used in hipMemGetHandleForAddressRange.

hipMemRangeFlagDmaBufMappingTypePcie: int#
hipMemRangeFlagsMax: int#
rocm.bindings.hip.hipInit(flags)#

Explicitly initializes the HIP runtime.

Defines the HIP API. See the individual sections for more information.

  • This section describes the initializtion and version functions of HIP runtime API.

Most HIP APIs implicitly initialize the HIP runtime. This API provides control over the timing of the initialization.

Note:

Applications that use fork() should not initialize the HIP runtime before the fork when the child process will continue executing HIP code without an immediate exec(). Instead, the parent and child processes should initialize HIP independently after fork(). Inheriting HIP runtime state across fork() may lead to undefined behavior or initialization failures.

Args:
flags (int) – IN:

Initialization flag, should be zero.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipInit(unsigned int flags)
rocm.bindings.hip.hipDriverGetVersion()#

Returns the approximate HIP driver version.

HIP driver version shows up in the format: HIP_VERSION_MAJOR * 10000000 + HIP_VERSION_MINOR * 100000 + HIP_VERSION_PATCH.

Warning:

The HIP driver version does not correspond to an exact CUDA driver revision. On AMD platform, the API returns the HIP driver version, while on NVIDIA platform, it calls the corresponding CUDA runtime API and returns the CUDA driver version. There is no mapping/correlation between HIP driver version and CUDA driver version.

See:

hipRuntimeGetVersion

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDriverGetVersion(int * driverVersion)
rocm.bindings.hip.hipRuntimeGetVersion()#

Returns the approximate HIP Runtime version.

Warning:

The version definition of HIP runtime is different from CUDA. On AMD platform, the function returns HIP runtime version, while on NVIDIA platform, it returns CUDA runtime version. And there is no mapping/correlation between HIP version and CUDA version.

See:

hipDriverGetVersion

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipRuntimeGetVersion(int * runtimeVersion)
rocm.bindings.hip.hipDeviceGet(ordinal)#

Returns a handle to a compute device

Args:
ordinal (int) – IN:

Device ordinal

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGet(hipDevice_t * device, int ordinal)
rocm.bindings.hip.hipDeviceComputeCapability(device)#

Returns the compute capability of the device

Args:
device (int) – IN:

Device ordinal

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipDeviceComputeCapability(int * major, int * minor, hipDevice_t device)
rocm.bindings.hip.hipDeviceGetName(len, device)#

Returns an identifer string for the device.

Args:
len (int) – IN:

Maximum length of string to store in device name

device (int) – IN:

Device ordinal

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetName(char * name, int len, hipDevice_t device)
rocm.bindings.hip.hipDeviceGetUuid(device)#

Returns an UUID for the device.[BETA]

Warning:

This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.

Args:
device (int) – IN:

device ordinal

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetUuid(hipUUID * uuid, hipDevice_t device)
rocm.bindings.hip.hipDeviceGetP2PAttribute(attr, srcDevice, dstDevice)#

Returns a value for attribute of link between two devices

Args:
attr (hipDeviceP2PAttr) – IN:

enum of hipDeviceP2PAttr to query

srcDevice (int) – IN:

The source device of the link

dstDevice (int) – IN:

The destination device of the link

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetP2PAttribute(int * value, hipDeviceP2PAttr attr, int srcDevice, int dstDevice)
rocm.bindings.hip.hipDeviceGetPCIBusId(len, device)#

Returns a PCI Bus Id string for the device, overloaded to take int device ID.

Args:
len (int) – IN:

Maximum length of string

device (int) – IN:

The device ordinal

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetPCIBusId(char * pciBusId, int len, int device)
rocm.bindings.hip.hipDeviceGetByPCIBusId(pciBusId)#

Returns a handle to a compute device.

Args:
pciBusId (CStr/object) – IN:

The string of PCI Bus Id for the device

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetByPCIBusId(int * device, const char * pciBusId)
rocm.bindings.hip.hipDeviceTotalMem(device)#

Returns the total amount of memory on the device.

Args:
device (int) – IN:

The ordinal of the device

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceTotalMem(size_t * bytes, hipDevice_t device)
rocm.bindings.hip.hipDeviceSynchronize()#

Waits on all active streams on current device

  • This section describes the device management functions of HIP runtime API.

When this command is invoked, the host thread gets blocked until all the commands associated with streams associated with the device. HIP does not support multiple blocking modes (yet!).

See:

hipSetDevice, hipDeviceReset

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceSynchronize()
rocm.bindings.hip.hipDeviceReset()#

The state of current device is discarded and updated to a fresh state.

Calling this function deletes all streams created, memory allocated, kernels running, events created. Make sure that no other thread is using the device or streams, memory, kernels, events associated with the current device.

See:

hipDeviceSynchronize

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceReset()
rocm.bindings.hip.hipSetDevice(deviceId)#

Set default device to be used for subsequent hip API calls from this thread.

Sets device as the default device for the calling host thread. Valid device id’s are 0… (hipGetDeviceCount()-1).

Many HIP APIs implicitly use the “default device” :

  • Any device memory subsequently allocated from this host thread (using hipMalloc) will be

allocated on device. - Any streams or events created from this host thread will be associated with device. - Any kernels launched from this host thread (using hipLaunchKernel) will be executed on device (unless a specific stream is specified, in which case the device associated with that stream will be used).

This function may be called from any host thread. Multiple host threads may use the same device. This function does no synchronization with the previous or new device, and has very little runtime overhead. Applications can use hipSetDevice to quickly switch the default device before making a HIP runtime call which uses the default device.

The default device is stored in thread-local-storage for each thread. Thread-pool implementations may inherit the default device of the previous thread. A good practice is to always call hipSetDevice at the start of HIP coding sequency to establish a known standard device.

See:

hipGetDevice, hipGetDeviceCount

Args:
deviceId (int) – IN:

Valid device in range 0…hipGetDeviceCount().

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipSetDevice(int deviceId)
rocm.bindings.hip.hipSetValidDevices(len)#

Set a list of devices that can be used.

See:

hipGetDevice, hipGetDeviceCount. hipSetDevice. hipGetDeviceProperties. hipSetDeviceFlags. hipChooseDevice

Args:
len (int) – IN:

Number of devices in specified list

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipSetValidDevices(int * device_arr, int len)
rocm.bindings.hip.hipGetDevice()#

Return the default device id for the calling host thread.

HIP maintains an default device for each thread using thread-local-storage. This device is used implicitly for HIP runtime APIs called by this thread. hipGetDevice returns in * device the default device for the calling host thread.

See:

hipSetDevice, hipGetDevicesizeBytes

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetDevice(int * deviceId)
rocm.bindings.hip.hipGetDeviceCount()#

Return number of compute-capable devices.

Returns in *count the number of devices that have ability to run compute commands. If there are no such devices, then hipGetDeviceCount will return hipErrorNoDevice. If 1 or more devices can be found, then hipGetDeviceCount returns hipSuccess.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetDeviceCount(int * count)
rocm.bindings.hip.hipDeviceGetAttribute(attr, deviceId)#

Query for a specific device attribute.

Args:
attr (hipDeviceAttribute_t) – IN:

attribute to query

deviceId (int) – IN:

which device to query for information

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetAttribute(int * pi, hipDeviceAttribute_t attr, int deviceId)
rocm.bindings.hip.hipDeviceGetDefaultMemPool(device)#

Returns the default memory pool of the specified device

See:

hipDeviceGetDefaultMemPool, hipMallocAsync, 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.

Args:
device (int) – IN:

Device index for query the default memory pool

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetDefaultMemPool(hipMemPool_t * mem_pool, int device)
rocm.bindings.hip.hipDeviceSetMemPool(device, mem_pool)#

Sets the current memory pool of a device

The memory pool must be local to the specified device. hipMallocAsync allocates from the current mempool of the provided stream’s device. By default, a device’s current memory pool is its default memory pool.

Note:

Use hipMallocFromPoolAsync for asynchronous memory allocations from a device different than the one the stream runs on.

See:

hipDeviceGetDefaultMemPool, hipMallocAsync, 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.

Args:
device (int) – IN:

Device index for the update

mem_pool (ihipMemPoolHandle_t/object) – IN:

Memory pool for update as the current on the specified device

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceSetMemPool(int device, hipMemPool_t mem_pool)
rocm.bindings.hip.hipDeviceGetMemPool(device)#

Gets the current memory pool for the specified device

Returns the last pool provided to hipDeviceSetMemPool for this device or the device’s default memory pool if hipDeviceSetMemPool has never been called. By default the current mempool is the default mempool for a device, otherwise the returned pool must have been set with hipDeviceSetMemPool.

See:

hipDeviceGetDefaultMemPool, hipMallocAsync, 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.

Args:
device (int) – IN:

Device index to query the current memory pool

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetMemPool(hipMemPool_t * mem_pool, int device)
rocm.bindings.hip.hipGetDeviceProperties(deviceId)#

Returns device properties.

Bug:

HIP-Clang always returns 0 for maxThreadsPerMultiProcessor

Bug:

HIP-Clang always returns 0 for regsPerBlock

Bug:

HIP-Clang always returns 0 for l2CacheSize

Populates hipGetDeviceProperties with information for the specified device.

Args:
deviceId (int) – IN:

which device to query for information

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetDevicePropertiesR0600(hipDeviceProp_tR0600 * prop, int deviceId)
rocm.bindings.hip.hipDeviceGetTexture1DLinearMaxWidth(desc, device)#

Gets the maximum width for 1D linear textures on the specified device

This function queries the maximum width, in elements, of 1D linear textures that can be allocated on the specified device. The maximum width depends on the texture element size and the hardware limitations of the device.

See:

hipDeviceGetAttribute, hipMalloc, hipTexRefSetAddressMode

Args:
desc (hipChannelFormatDesc/object) – IN:

Requested channel format

device (int) – IN:

Device index to query for maximum 1D texture width

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetTexture1DLinearMaxWidth(size_t * max_width, const hipChannelFormatDesc * desc, int device)
rocm.bindings.hip.hipDeviceSetCacheConfig(cacheConfig)#

Set L1/Shared cache partition.

Note: AMD devices do not support reconfigurable cache. This API is not implemented on AMD platform. If the function is called, it will return hipErrorNotSupported.

Args:
cacheConfig (hipFuncCache_t) – IN:

Cache configuration

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig)
rocm.bindings.hip.hipDeviceGetCacheConfig()#

Get Cache configuration for a specific Device

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetCacheConfig(hipFuncCache_t * cacheConfig)
rocm.bindings.hip.hipDeviceGetLimit(limit)#

Gets resource limits of current device

The function queries the size of limit value, as required by the input enum value hipLimit_t, which can be either hipLimitStackSize, or hipLimitMallocHeapSize. Any other input as default, the function will return hipErrorUnsupportedLimit.

Args:
limit (hipLimit_t) – IN:

The limit to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetLimit(size_t * pValue, enum hipLimit_t limit)
rocm.bindings.hip.hipDeviceSetLimit(limit, value)#

Sets resource limits of current device.

As the input enum limit, hipLimitStackSize sets the limit value of the stack size on the current GPU device, per thread. The limit size can get via hipDeviceGetLimit. The size is in units of 256 dwords, up to the limit (128K - 16).

hipLimitMallocHeapSize sets the limit value of the heap used by the malloc()/free() calls. For limit size, use the hipDeviceGetLimit API.

Any other input as default, the funtion will return hipErrorUnsupportedLimit.

Args:
limit (hipLimit_t) – IN:

Enum of hipLimit_t to set

value (int) – IN:

The size of limit value in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceSetLimit(enum hipLimit_t limit, size_t value)
rocm.bindings.hip.hipDeviceGetSharedMemConfig()#

Returns bank width of shared memory for current device

Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetSharedMemConfig(hipSharedMemConfig * pConfig)
rocm.bindings.hip.hipGetDeviceFlags()#

Gets the flags set for current device

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetDeviceFlags(unsigned int * flags)
rocm.bindings.hip.hipDeviceSetSharedMemConfig(config)#

The bank width of shared memory on current device is set

Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.

Args:
config (hipSharedMemConfig) – IN:

Configuration for the bank width of shared memory

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config)
rocm.bindings.hip.hipSetDeviceFlags(flags)#

The current device behavior is changed according to the flags passed.

The schedule flags impact how HIP waits for the completion of a command running on a device.

hipDeviceScheduleSpin : HIP runtime will actively spin in the thread which submitted the work until the command completes. This offers the lowest latency, but will consume a CPU core and may increase power.

hipDeviceScheduleYield : The HIP runtime will yield the CPU to system so that other tasks can use it. This may increase latency to detect the completion but will consume less power and is friendlier to other tasks in the system.

hipDeviceScheduleBlockingSync : On ROCm platform, this is a synonym for hipDeviceScheduleYield.

hipDeviceScheduleAuto : This is the default value if the input ‘flags’ is zero. Uses a heuristic to select between Spin and Yield modes. If the number of HIP contexts is greater than the number of logical processors in the system, uses Spin scheduling, otherwise uses Yield scheduling.

hipDeviceMapHost : Allows mapping host memory. On ROCm, this is always allowed and the flag is ignored.

hipDeviceLmemResizeToMax : This flag is silently ignored on ROCm.

Args:
flags (int) – IN:

Flag to set on the current device

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipSetDeviceFlags(unsigned int flags)
rocm.bindings.hip.hipChooseDevice(prop)#

Device which matches hipDeviceProp_t is returned

Args:
prop (hipDeviceProp_t/object) – IN:

Pointer of the properties

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipChooseDeviceR0600(int * device, const hipDeviceProp_tR0600 * prop)
rocm.bindings.hip.hipExtGetLinkTypeAndHopCount(device1, device2)#

Returns the link type and hop count between two devices

Queries and returns the HSA link type and the hop count between the two specified devices.

Args:
device1 (int) – IN:

Ordinal for device1

device2 (int) – IN:

Ordinal for device2

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipExtGetLinkTypeAndHopCount(int device1, int device2, uint32_t * linktype, uint32_t * hopcount)
rocm.bindings.hip.hipIpcGetMemHandle(devPtr)#
Gets an interprocess memory handle for an existing device memory

allocation

Takes a pointer to the base of an existing device memory allocation created with hipMalloc and exports it for use in another process. This is a lightweight operation and may be called multiple times on an allocation without adverse effects.

If a region of memory is freed with hipFree and a subsequent call to hipMalloc returns memory with the same device address, hipIpcGetMemHandle will return a unique handle for the new memory.

Note:

This IPC memory related feature API on Windows may behave differently from Linux.

Args:
devPtr (Pointer/object):
  • Base pointer to previously allocated device memory

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t * handle, void * devPtr)
rocm.bindings.hip.hipIpcOpenMemHandle(handle, flags)#
Opens an interprocess memory handle exported from another process

and returns a device pointer usable in the local process.

Maps memory exported from another process with hipIpcGetMemHandle into the current device address space. For contexts on different devices hipIpcOpenMemHandle can attempt to enable peer access between the devices as if the user called hipDeviceEnablePeerAccess. This behavior is controlled by the hipIpcMemLazyEnablePeerAccess flag. hipDeviceCanAccessPeer can determine if a mapping is possible.

Contexts that may open hipIpcMemHandles are restricted in the following way. hipIpcMemHandles from each device in a given process may only be opened by one context per device per other process.

Memory returned from hipIpcOpenMemHandle must be freed with hipIpcCloseMemHandle.

Calling hipFree on an exported memory region before calling hipIpcCloseMemHandle in the importing context will result in undefined behavior.

Note:

During multiple processes, using the same memory handle opened by the current context, there is no guarantee that the same device poiter will be returned in *devPtr. This is diffrent from CUDA.

Note:

This IPC memory related feature API on Windows may behave differently from Linux.

Args:
handle (hipIpcMemHandle_st):
  • hipIpcMemHandle to open

flags (int):
  • Flags for this operation. Must be specified as hipIpcMemLazyEnablePeerAccess

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipIpcOpenMemHandle(void ** devPtr, hipIpcMemHandle_t handle, unsigned int flags)
rocm.bindings.hip.hipIpcCloseMemHandle(devPtr)#

Close memory mapped with hipIpcOpenMemHandle

Unmaps memory returnd by hipIpcOpenMemHandle. The original allocation in the exporting process as well as imported mappings in other processes will be unaffected.

Any resources used to enable peer access will be freed if this is the last mapping using them.

Note:

This IPC memory related feature API on Windows may behave differently from Linux.

Args:
devPtr (Pointer/object):
  • Device pointer returned by hipIpcOpenMemHandle

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipIpcCloseMemHandle(void * devPtr)
rocm.bindings.hip.hipIpcGetEventHandle(event)#

Gets an opaque interprocess handle for an event.

This opaque handle may be copied into other processes and opened with hipIpcOpenEventHandle. Then hipEventRecord, hipEventSynchronize, hipStreamWaitEvent and hipEventQuery may be used in either process. Operations on the imported event after the exported event has been freed with hipEventDestroy will result in undefined behavior.

Note:

This IPC event related feature API is currently applicable on Linux.

Args:
event (ihipEvent_t/object) – IN:

Event allocated with hipEventInterprocess and hipEventDisableTiming flags

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t * handle, hipEvent_t event)
rocm.bindings.hip.hipIpcOpenEventHandle(handle)#

Opens an interprocess event handles.

Opens an interprocess event handle exported from another process with hipIpcGetEventHandle. The returned hipEvent_t behaves like a locally created event with the hipEventDisableTiming flag specified. This event need be freed with hipEventDestroy. Operations on the imported event after the exported event has been freed with hipEventDestroy will result in undefined behavior. If the function is called within the same process where handle is returned by hipIpcGetEventHandle, it will return hipErrorInvalidContext.

Note:

This IPC event related feature API is currently applicable on Linux.

Args:
handle (hipIpcEventHandle_st) – IN:

The opaque interprocess handle to open

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipIpcOpenEventHandle(hipEvent_t * event, hipIpcEventHandle_t handle)
rocm.bindings.hip.hipFuncSetAttribute(func, attr, value)#

Set attribute for a specific function

  • This section describes the execution control functions of HIP runtime API.

Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.

Args:
func (Pointer/object) – IN:

Pointer of the function

attr (hipFuncAttribute) – IN:

Attribute to set

value (int) – IN:

Value to set

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipFuncSetAttribute(const void * func, hipFuncAttribute attr, int value)
rocm.bindings.hip.hipKernelSetAttribute(attrib, value, kernel, dev)#

Set attribute for a specific kernel

Args:
attrib (hipFunction_attribute) – IN:

Attribute to set

value (int) – IN:

Value to set

kernel (ihipKernel_t/object) – IN:

Kernel to set attribute for

dev (int) – IN:

Device kernel execute on

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipKernelSetAttribute(hipFunction_attribute attrib, int value, hipKernel_t kernel, hipDevice_t dev)
rocm.bindings.hip.hipKernelGetFunction(kernel)#

Function will be extracted for specific kernel

Args:
kernel (ihipKernel_t/object) – IN:

kernel to get handle for

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipKernelGetFunction(hipFunction_t * pFunc, hipKernel_t kernel)
rocm.bindings.hip.hipFuncSetCacheConfig(func, config)#

Set Cache configuration for a specific function

Args:
func (Pointer/object) – IN:

Pointer of the function.

config (hipFuncCache_t) – IN:

Configuration to set.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipFuncSetCacheConfig(const void * func, hipFuncCache_t config)
rocm.bindings.hip.hipFuncSetSharedMemConfig(func, config)#

Set shared memory configuation for a specific function

Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.

Args:
func (Pointer/object) – IN:

Pointer of the function

config (hipSharedMemConfig) – IN:

Configuration

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipFuncSetSharedMemConfig(const void * func, hipSharedMemConfig config)
rocm.bindings.hip.hipGetLastError()#

Return last error returned by any HIP runtime API call and resets the stored error code to hipSuccess

  • This section describes the error handling functions of HIP runtime API.

Returns the last error that has been returned by any of the runtime calls in the same host thread, and then resets the saved error to hipSuccess.

See:

hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t

Returns:

A tuple of size 1 that contains (in that order):

  • hipError_t: return code from last HIP called from the active host thread

C signature

hipError_t hipGetLastError()
rocm.bindings.hip.hipExtGetLastError()#

Return last error returned by any HIP runtime API call and resets the stored error code to hipSuccess

Returns the last error that has been returned by any of the runtime calls in the same host thread, and then resets the saved error to hipSuccess.

See:

hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t

Returns:

A tuple of size 1 that contains (in that order):

  • hipError_t: return code from last HIP called from the active host thread

C signature

hipError_t hipExtGetLastError()
rocm.bindings.hip.hipPeekAtLastError()#

Return last error returned by any HIP runtime API call.

Returns the last error that has been returned by any of the runtime calls in the same host thread. Unlike hipGetLastError, this function does not reset the saved error code.

See:

hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipPeekAtLastError()
rocm.bindings.hip.hipGetErrorName(hip_error)#

Return hip error as text string form.

See:

hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t

Args:
hip_error (hipError_t):

Error code to convert to name.

Returns:

A tuple of size 2 that contains (in that order):

C signature

const char * hipGetErrorName(hipError_t hip_error)
rocm.bindings.hip.hipGetErrorString(hipError)#

Return handy text string message to explain the error which occurred

See:

hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t

Args:
hipError (hipError_t):

Error code to convert to string.

Returns:

A tuple of size 2 that contains (in that order):

C signature

const char * hipGetErrorString(hipError_t hipError)
rocm.bindings.hip.hipDrvGetErrorName(hipError)#

Return hip error as text string form.

See:

hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t

Args:
hipError (hipError_t) – IN:

Error code to convert to string.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDrvGetErrorName(hipError_t hipError, const char ** errorString)
rocm.bindings.hip.hipDrvGetErrorString(hipError)#

Return handy text string message to explain the error which occurred

See:

hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t

Args:
hipError (hipError_t) – IN:

Error code to convert to string.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDrvGetErrorString(hipError_t hipError, const char ** errorString)
rocm.bindings.hip.hipStreamCreate()#

Creates an asynchronous stream.

Creates a new asynchronous stream with its associated current device. The stream returns an opaque handle that can be used to reference the newly created stream in subsequent hipStream* commands. The stream is allocated on the heap and will remain allocated even if the handle goes out-of-scope. To release the memory used by the stream, the application must call hipStreamDestroy.

See:

hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamCreate(hipStream_t * stream)
rocm.bindings.hip.hipStreamCreateWithFlags(flags)#

Creates an asynchronous stream with flag.

Creates a new asynchronous stream with its associated current device. stream returns an opaque handle that can be used to reference the newly created stream in subsequent hipStream* commands. The stream is allocated on the heap and will remain allocated even if the handle goes out-of-scope. To release the memory used by the stream, application must call hipStreamDestroy.

The flags parameter controls behavior of the stream. The valid values are hipStreamDefault and hipStreamNonBlocking.

See:

hipStreamCreate, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy.

Args:
flags (int) – IN:

Parameters to control stream creation

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamCreateWithFlags(hipStream_t * stream, unsigned int flags)
rocm.bindings.hip.hipStreamCreateWithPriority(flags, priority)#

Creates an asynchronous stream with the specified priority.

Creates a new asynchronous stream with the specified priority, with its associated current device. stream returns an opaque handle that can be used to reference the newly created stream in subsequent hipStream* commands. The stream is allocated on the heap and will remain allocated even if the handle goes out-of-scope. To release the memory used by the stream, application must call hipStreamDestroy.

The flags parameter controls behavior of the stream. The valid values are hipStreamDefault and hipStreamNonBlocking.

See:

hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy

Args:
flags (int) – IN:

Parameters to control stream creation

priority (int) – IN:

Priority of the stream. Lower numbers represent higher priorities.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamCreateWithPriority(hipStream_t * stream, unsigned int flags, int priority)
rocm.bindings.hip.hipDeviceGetStreamPriorityRange()#

Returns numerical values that correspond to the least and greatest stream priority.

Returns in *leastPriority and *greatestPriority the numerical values that correspond to the least and greatest stream priority respectively. Stream priorities follow a convention where lower numbers imply greater priorities. The range of meaningful stream priorities is given by [*leastPriority,*greatestPriority]. If the user attempts to create a stream with a priority value that is outside the meaningful range as specified by this API, the priority is automatically clamped to within the valid range.

Warning:

This API is under development on AMD GPUs and simply returns hipSuccess.

Returns:

A tuple of size 3 that contains (in that order):

  • hipError_t: py:obj:hipSuccess

  • int:

    Pointer in which a value corresponding to least priority is returned.

  • int:

    Pointer in which a value corresponding to greatest priority is returned.

C signature

hipError_t hipDeviceGetStreamPriorityRange(int * leastPriority, int * greatestPriority)
rocm.bindings.hip.hipStreamDestroy(stream)#

Destroys the specified stream.

Destroys the specified stream.

If commands are still executing on the specified stream, some may complete execution before the queue is deleted.

The queue may be destroyed while some commands are still inflight, or may wait for all commands queued to the stream before destroying it.

See:

hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamQuery, hipStreamWaitEvent, hipStreamSynchronize

Args:
stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamDestroy(hipStream_t stream)
rocm.bindings.hip.hipStreamQuery(stream)#

Returns hipSuccess if all of the operations in the specified stream have completed, or hipErrorNotReady if not.

This is thread-safe and returns a snapshot of the current state of the queue. However, if other host threads are sending work to the stream, the status may change immediately after the function is called. It is typically used for debug.

See:

hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamWaitEvent, hipStreamSynchronize, hipStreamDestroy

Args:
stream (ihipStream_t/object) – IN:

Stream to query

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamQuery(hipStream_t stream)
rocm.bindings.hip.hipStreamSynchronize(stream)#

Waits for all commands in the stream to complete.

This command is host-synchronous : the host will block until all operations on the specified stream with its associated device are completed. On multiple device systems, the stream is associated with its device, no need to call hipSetDevice before this API.

This command follows standard null-stream semantics. Specifying the null stream will cause the command to wait for other streams on the same device to complete all pending operations.

This command honors the hipDeviceScheduleBlockingSync flag, which controls whether the wait is active or blocking.

See:

hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamWaitEvent, hipStreamDestroy

Args:
stream (ihipStream_t/object) – IN:

Stream identifier.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamSynchronize(hipStream_t stream)
rocm.bindings.hip.hipStreamWaitEvent(stream, event, flags)#

Makes the specified compute stream wait for the specified event

This function inserts a wait operation into the specified stream. All future work submitted to stream will wait until event reports completion before beginning execution.

Flags include:

hipEventWaitDefault: Default event creation flag. hipEventWaitExternal: Wait is captured in the graph as an external event node when

performing stream capture

This function only waits for commands in the current stream to complete. Notably, this function does not implicitly wait for commands in the default stream to complete, even if the specified stream is created with hipStreamNonBlocking = 0.

See:

hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamDestroy

Args:
stream (ihipStream_t/object) – IN:

Stream to make wait

event (ihipEvent_t/object) – IN:

Event to wait on

flags (int) – IN:

Parameters to control the operation

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags)
rocm.bindings.hip.hipStreamGetFlags(stream)#

Returns flags associated with this stream.

See:

hipStreamCreateWithFlags

Args:
stream (ihipStream_t/object) – IN:

Stream to be queried

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int * flags)
rocm.bindings.hip.hipStreamGetId(stream)#

Queries the Id of a stream.

See:

hipStreamCreateWithFlags, hipStreamGetFlags, hipStreamCreateWithPriority, hipStreamGetPriority

Args:
stream (ihipStream_t/object) – IN:

Stream to be queried

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamGetId(hipStream_t stream, unsigned long long * streamId)
rocm.bindings.hip.hipStreamGetPriority(stream)#

Queries the priority of a stream.

See:

hipStreamCreateWithPriority

Args:
stream (ihipStream_t/object) – IN:

Stream to be queried

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamGetPriority(hipStream_t stream, int * priority)
rocm.bindings.hip.hipStreamGetDevice(stream)#

Gets the device associated with the stream.

See:

hipStreamCreate, hipStreamDestroy, hipDeviceGetStreamPriorityRange

Args:
stream (ihipStream_t/object) – IN:

Stream to be queried

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamGetDevice(hipStream_t stream, hipDevice_t * device)
rocm.bindings.hip.hipExtStreamCreateWithCUMask(cuMaskSize, cuMask)#

Creates an asynchronous stream with the specified CU mask.

Creates a new asynchronous stream with the specified CU mask. stream returns an opaque handle that can be used to reference the newly created stream in subsequent hipStream* commands. The stream is allocated on the heap and will remain allocated even if the handle goes out-of-scope. To release the memory used by the stream, application must call hipStreamDestroy.

See:

hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy

Args:
cuMaskSize (int) – IN:

Size of CU mask bit array passed in.

cuMask (ListOfUnsigned/object) – IN:

Bit-vector representing the CU mask. Each active bit represents using one CU. The first 32 bits represent the first 32 CUs, and so on. If its size is greater than physical CU number (i.e., multiProcessorCount member of hipDeviceProp_t), the extra elements are ignored. It is user’s responsibility to make sure the input is meaningful.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipExtStreamCreateWithCUMask(hipStream_t * stream, uint32_t cuMaskSize, const uint32_t * cuMask)
rocm.bindings.hip.hipExtStreamGetCUMask(stream, cuMaskSize, cuMask)#

Gets CU mask associated with an asynchronous stream

See:

hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy

Args:
stream (ihipStream_t/object) – IN:

Stream to be queried

cuMaskSize (int) – IN:

Number of the block of memories (uint32_t *) allocated by user

cuMask (ListOfUnsigned/object) – OUT:

Pointer to a pre-allocated block of memories (uint32_t *) in which the stream’s CU mask is returned. The CU mask is returned in a chunck of 32 bits where each active bit represents one active CU.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipExtStreamGetCUMask(hipStream_t stream, uint32_t cuMaskSize, uint32_t * cuMask)
class rocm.bindings.hip.hipStreamCallback_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Stream CallBack struct

rocm.bindings.hip.hipStreamAddCallback(stream, callback, userData, flags)#

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.

See:

hipStreamCreate, hipStreamCreateWithFlags, hipStreamQuery, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy, hipStreamCreateWithPriority

Args:
stream (ihipStream_t/object) – IN:
  • Stream to add callback to

callback (hipStreamCallback_t/object) – IN:
  • The function to call once preceding stream operations are complete

userData (Pointer/object) – IN:
  • User specified data to be passed to the callback function

flags (int) – IN:
  • Reserved for future use, must be 0

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback, void * userData, unsigned int flags)
rocm.bindings.hip.hipStreamSetAttribute(stream, attr, value)#

Sets stream attribute. Updated attribute is applied to work submitted to the stream.

Args:
stream (ihipStream_t/object) – IN:
  • Stream to set attributes to

attr (hipLaunchAttributeID) – IN:
  • Attribute ID for the attribute to set

value (hipLaunchAttributeValue/object) – IN:
  • Attribute value for the attribute to set

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamSetAttribute(hipStream_t stream, hipLaunchAttributeID attr, const hipLaunchAttributeValue * value)
rocm.bindings.hip.hipStreamGetAttribute(stream, attr, value_out)#

queries stream attribute.

Args:
stream (ihipStream_t/object) – IN:
  • Stream to geet attributes from

attr (hipLaunchAttributeID) – IN:
  • Attribute ID for the attribute to query

value_out (hipLaunchAttributeValue/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamGetAttribute(hipStream_t stream, hipLaunchAttributeID attr, hipLaunchAttributeValue * value_out)
rocm.bindings.hip.hipStreamCopyAttributes(dst, src)#

Copies attributes from source stream to destination stream.

Args:
dst (ihipStream_t/object) – IN:
  • Destination stream

src (ihipStream_t/object) – IN:
  • Source stream

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamCopyAttributes(hipStream_t dst, hipStream_t src)
rocm.bindings.hip.hipStreamWaitValue32(stream, ptr, value, flags, 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

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.

See:

hipExtMallocWithFlags, hipFree, hipStreamWaitValue64, hipStreamWriteValue64, hipStreamWriteValue32, hipDeviceGetAttribute

Args:
stream (ihipStream_t/object) – IN:
  • Stream identifier

ptr (Pointer/object) – IN:
value (int) – IN:
  • Value to be used in compare operation

flags (int) – IN:

hipStreamWaitValueEq, hipStreamWaitValueAnd and hipStreamWaitValueNor

mask (int) – IN:
  • Mask to be applied on value at memory before it is compared with value,

default value is set to enable every bit

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamWaitValue32(hipStream_t stream, void * ptr, uint32_t value, unsigned int flags, uint32_t mask)
rocm.bindings.hip.hipStreamWaitValue64(stream, ptr, value, flags, 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

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.

See:

hipExtMallocWithFlags, hipFree, hipStreamWaitValue32, hipStreamWriteValue64, hipStreamWriteValue32, hipDeviceGetAttribute

Args:
stream (ihipStream_t/object) – IN:
  • Stream identifier

ptr (Pointer/object) – IN:
  • Pointer to memory object allocated using ‘hipMallocSignalMemory’ flag

value (int) – IN:
  • Value to be used in compare operation

flags (int) – IN:

hipStreamWaitValueEq, hipStreamWaitValueAnd and hipStreamWaitValueNor.

mask (int) – IN:
  • Mask to be applied on value at memory before it is compared with value

default value is set to enable every bit

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamWaitValue64(hipStream_t stream, void * ptr, uint64_t value, unsigned int flags, uint64_t mask)
rocm.bindings.hip.hipStreamWriteValue32(stream, ptr, value, 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.

Warning:

This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.

See:

hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64

Args:
stream (ihipStream_t/object) – IN:
  • Stream identifier

ptr (Pointer/object) – IN:
  • Pointer to a GPU accessible memory object

value (int) – IN:
  • Value to be written

flags (int) – IN:
  • reserved, ignored for now, will be used in future releases

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamWriteValue32(hipStream_t stream, void * ptr, uint32_t value, unsigned int flags)
rocm.bindings.hip.hipStreamWriteValue64(stream, ptr, value, 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.

Warning:

This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.

See:

hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64

Args:
stream (ihipStream_t/object) – IN:
  • Stream identifier

ptr (Pointer/object) – IN:
  • Pointer to a GPU accessible memory object

value (int) – IN:
  • Value to be written

flags (int) – IN:
  • reserved, ignored for now, will be used in future releases

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamWriteValue64(hipStream_t stream, void * ptr, uint64_t value, unsigned int flags)
rocm.bindings.hip.hipStreamBatchMemOp(stream, count, paramArray, 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.

See:

hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64. hipStreamWriteValue64

Args:
stream (ihipStream_t/object) – IN:
  • Stream identifier

count (int) – IN:
  • The number of operations in the array. Must be less than 256

paramArray (hipStreamBatchMemOpParams_union/object) – IN:
  • The types and parameters of the individual operations.

flags (int) – IN:
  • Reserved for future expansion; must be 0.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamBatchMemOp(hipStream_t stream, unsigned int count, hipStreamBatchMemOpParams * paramArray, unsigned int flags)
rocm.bindings.hip.hipGraphAddBatchMemOpNode(hGraph, dependencies, numDependencies, nodeParams)#

Creates a batch memory operation node and adds it to a graph.[BETA]

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

See:

hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64. hipStreamWriteValue64, hipStreamBatchMemOp

Args:
hGraph (ihipGraph/object) – IN:
  • Graph to which to add the node

dependencies (Pointer/object) – IN:
  • Dependencies of the node

numDependencies (int) – IN:
  • Number of dependencies

nodeParams (hipBatchMemOpNodeParams/object) – IN:
  • Parameters for the node

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddBatchMemOpNode(hipGraphNode_t * phGraphNode, hipGraph_t hGraph, const hipGraphNode_t * dependencies, size_t numDependencies, const hipBatchMemOpNodeParams * nodeParams)
rocm.bindings.hip.hipGraphBatchMemOpNodeGetParams(hNode, 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.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

See:

hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64. hipStreamWriteValue64. hipGraphBatchMemOpNodeSetParams

Args:
hNode (hipGraphNode/object) – IN:
  • Node to get the parameters for

nodeParams_out (hipBatchMemOpNodeParams/object) – IN:
  • Pointer to return the parameters

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphBatchMemOpNodeGetParams(hipGraphNode_t hNode, hipBatchMemOpNodeParams * nodeParams_out)
rocm.bindings.hip.hipGraphBatchMemOpNodeSetParams(hNode, nodeParams)#

Sets the batch mem op node’s parameters.[BETA]

Sets the parameters of batch mem op node hNode to nodeParams.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

See:

hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64. hipStreamWriteValue64, hipGraphBatchMemOpNodeGetParams

Args:
hNode (hipGraphNode/object) – IN:
  • Node to set the parameters for

nodeParams (hipBatchMemOpNodeParams/object) – IN:
  • Parameters to copy

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphBatchMemOpNodeSetParams(hipGraphNode_t hNode, hipBatchMemOpNodeParams * nodeParams)
rocm.bindings.hip.hipGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, 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.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

See:

hipStreamWriteValue32, hipStreamWaitValue32, hipStreamWaitValue64. hipStreamWriteValue64, hipStreamBatchMemOp

Args:
hGraphExec (hipGraphExec/object) – IN:
  • The executable graph in which to set the specified node

hNode (hipGraphNode/object) – IN:
  • Batch mem op node from the graph from which graphExec was instantiated

nodeParams (hipBatchMemOpNodeParams/object) – IN:
  • Updated Parameters to set

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecBatchMemOpNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const hipBatchMemOpNodeParams * nodeParams)
rocm.bindings.hip.hipEventCreateWithFlags(flags)#

Create an event with the specified flags

See:

hipEventCreate, hipEventSynchronize, hipEventDestroy, hipEventElapsedTime

Args:
flags (int) – IN:

Flags to control event behavior. Valid values are hipEventDefault, hipEventBlockingSync, hipEventDisableTiming, hipEventInterprocess

hipEventDefault : Default flag. The event will use active synchronization and will support

timing. Blocking synchronization provides lowest possible latency at the expense of dedicating a CPU to poll on the event.

hipEventBlockingSync : The event will use blocking synchronization : if hipEventSynchronize is

called on this event, the thread will block until the event completes. This can increase latency for the synchroniation but can result in lower power and more resources for other CPU threads.

hipEventDisableTiming : Disable recording of timing information. Events created with this flag

would not record profiling data and provide best performance if used for synchronization.

hipEventInterprocess : The event can be used as an interprocess event. hipEventDisableTiming

flag also must be set when hipEventInterprocess flag is set.

hipEventDisableSystemFence : Disable acquire and release system scope fence. This may

improve performance but device memory may not be visible to the host and other devices if this flag is set.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipEventCreateWithFlags(hipEvent_t * event, unsigned int flags)
rocm.bindings.hip.hipEventCreate()#

Create an event

See:

hipEventCreateWithFlags, hipEventRecord, hipEventQuery, hipEventSynchronize, hipEventDestroy, hipEventElapsedTime

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipEventCreate(hipEvent_t * event)
rocm.bindings.hip.hipEventRecordWithFlags(event, stream, flags)#

Record an event in the specified stream.

hipEventQuery() or hipEventSynchronize() must be used to determine when the event transitions from “recording” (after hipEventRecord() is called) to “recorded” (when timestamps are set, if requested).

Events which are recorded in a non-NULL stream will transition to from recording to “recorded” state when they reach the head of the specified stream, after all previous commands in that stream have completed executing.

Flags include:

hipEventRecordDefault: Default event creation flag. hipEventRecordExternal: Event is captured in the graph as an external event node when

performing stream capture

If hipEventRecord() has been previously called on this event, then this call will overwrite any existing state in event.

If this function is called on an event that is currently being recorded, results are undefined - either outstanding recording may save state into the event, and the order is not guaranteed.

Note:

If this function is not called before use hipEventQuery() or hipEventSynchronize(), hipSuccess is returned, meaning no pending event in the stream.

See:

hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventSynchronize, hipEventDestroy, hipEventElapsedTime

Args:
event (ihipEvent_t/object) – IN:

event to record.

stream (ihipStream_t/object) – IN:

stream in which to record event.

flags (int) – IN:

parameter for operations

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipEventRecordWithFlags(hipEvent_t event, hipStream_t stream, unsigned int flags)
rocm.bindings.hip.hipEventRecord(event, stream)#

Record an event in the specified stream.

hipEventQuery() or hipEventSynchronize() must be used to determine when the event transitions from “recording” (after hipEventRecord() is called) to “recorded” (when timestamps are set, if requested).

Events which are recorded in a non-NULL stream will transition to from recording to “recorded” state when they reach the head of the specified stream, after all previous commands in that stream have completed executing.

If hipEventRecord() has been previously called on this event, then this call will overwrite any existing state in event.

If this function is called on an event that is currently being recorded, results are undefined - either outstanding recording may save state into the event, and the order is not guaranteed.

Note:

If this function is not called before use hipEventQuery() or hipEventSynchronize(), hipSuccess is returned, meaning no pending event in the stream.

See:

hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventSynchronize, hipEventDestroy, hipEventElapsedTime

Args:
event (ihipEvent_t/object) – IN:

event to record.

stream (ihipStream_t/object) – IN:

stream in which to record event.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream)
rocm.bindings.hip.hipEventDestroy(event)#

Destroy the specified event.

Releases memory associated with the event. If the event is recording but has not completed recording when hipEventDestroy() is called, the function will return immediately and the completion_future resources will be released later, when the hipDevice is synchronized.

See:

hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventSynchronize, hipEventRecord, hipEventElapsedTime

Args:
event (ihipEvent_t/object) – IN:

Event to destroy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipEventDestroy(hipEvent_t event)
rocm.bindings.hip.hipEventSynchronize(event)#

Wait for an event to complete.

This function will block until the event is ready, waiting for all previous work in the stream specified when event was recorded with hipEventRecord().

If hipEventRecord() has not been called on event, this function returns hipSuccess when no event is captured.

See:

hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventDestroy, hipEventRecord, hipEventElapsedTime

Args:
event (ihipEvent_t/object) – IN:

Event on which to wait.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipEventSynchronize(hipEvent_t event)
rocm.bindings.hip.hipEventElapsedTime(start, stop)#

Return the elapsed time between two events.

Computes the elapsed time between two events. Time is computed in ms, with a resolution of approximately 1 us.

Events which are recorded in a NULL stream will block until all commands on all other streams complete execution, and then record the timestamp.

Events which are recorded in a non-NULL stream will record their timestamp when they reach the head of the specified stream, after all previous commands in that stream have completed executing. Thus the time that the event recorded may be significantly after the host calls hipEventRecord().

If hipEventRecord() has not been called on either event, then hipErrorInvalidHandle is returned. If hipEventRecord() has been called on both events, but the timestamp has not yet been recorded on one or both events (that is, hipEventQuery() would return hipErrorNotReady on at least one of the events), then hipErrorNotReady is returned.

See:

hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventDestroy, hipEventRecord, hipEventSynchronize

Args:
start (ihipEvent_t/object) – IN:

Start event.

stop (ihipEvent_t/object) – IN:

Stop event.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipEventElapsedTime(float * ms, hipEvent_t start, hipEvent_t stop)
rocm.bindings.hip.hipEventQuery(event)#

Query event status

Query the status of the specified event. This function will return hipSuccess if all commands in the appropriate stream (specified to hipEventRecord()) have completed. If any execution has not completed, then hipErrorNotReady is returned.

Note:

This API returns hipSuccess, if hipEventRecord() is not called before this API.

See:

hipEventCreate, hipEventCreateWithFlags, hipEventRecord, hipEventDestroy, hipEventSynchronize, hipEventElapsedTime

Args:
event (ihipEvent_t/object) – IN:

Event to query.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipEventQuery(hipEvent_t event)
rocm.bindings.hip.hipPointerSetAttribute(value, attribute, ptr)#

Sets information on the specified pointer.[BETA]

Warning:

This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.

Args:
value (Pointer/object) – IN:

Sets pointer attribute value

attribute (hipPointer_attribute) – IN:

Attribute to set

ptr (Pointer/object) – IN:

Pointer to set attributes for

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipPointerSetAttribute(const void * value, hipPointer_attribute attribute, hipDeviceptr_t ptr)
rocm.bindings.hip.hipPointerGetAttributes(ptr)#

Returns attributes for the specified pointer

The output parameter ‘attributes’ has a member named ‘type’ that describes what memory the pointer is associated with, such as device memory, host memory, managed memory, and others. Otherwise, the API cannot handle the pointer and returns hipErrorInvalidValue.

Note:

The unrecognized memory type is unsupported to keep the HIP functionality backward compatibility due to hipMemoryType enum values.

Note:

The current behavior of this HIP API corresponds to the CUDA API before version 11.0.

See:

hipPointerGetAttribute

Args:
ptr (Pointer/object) – IN:

pointer to get attributes for

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipPointerGetAttributes(hipPointerAttribute_t * attributes, const void * ptr)
rocm.bindings.hip.hipPointerGetAttribute(data, attribute, ptr)#

Returns information about the specified pointer.[BETA]

Warning:

This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.

See:

hipPointerGetAttributes

Args:
data (Pointer/object) – IN,OUT:

Returned pointer attribute value

attribute (hipPointer_attribute) – IN:

Attribute to query for

ptr (Pointer/object) – IN:

Pointer to get attributes for

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipPointerGetAttribute(void * data, hipPointer_attribute attribute, hipDeviceptr_t ptr)
rocm.bindings.hip.hipDrvPointerGetAttributes(numAttributes, ptr)#

Returns information about the specified pointer.[BETA]

Warning:

This API is marked as Beta. While this feature is complete, it can change and might have outstanding issues.

See:

hipPointerGetAttribute

Args:
numAttributes (int) – IN:

number of attributes to query for

ptr (Pointer/object) – IN:

pointer to get attributes for

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipDrvPointerGetAttributes(unsigned int numAttributes, hipPointer_attribute * attributes, void ** data, hipDeviceptr_t ptr)
rocm.bindings.hip.hipImportExternalSemaphore(semHandleDesc)#

Imports an external semaphore.

This section describes the external resource interoperability functions of HIP runtime API.

See:

Note:

This API is currently not supported on Linux.

Args:
semHandleDesc (hipExternalSemaphoreHandleDesc_st/object) – IN:

Semaphore import handle descriptor

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t * extSem_out, const hipExternalSemaphoreHandleDesc * semHandleDesc)
rocm.bindings.hip.hipSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)#

Signals a set of external semaphore objects.

See:

Note:

This API is currently not supported on Linux.

Args:
extSemArray (ListOfPointer/object) – IN:

External semaphores to be waited on

paramsArray (hipExternalSemaphoreSignalParams_st/object) – IN:

Array of semaphore parameters

numExtSems (int) – IN:

Number of semaphores to wait on

stream (ihipStream_t/object) – IN:

Stream to enqueue the wait operations in

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipSignalExternalSemaphoresAsync(const hipExternalSemaphore_t * extSemArray, const hipExternalSemaphoreSignalParams * paramsArray, unsigned int numExtSems, hipStream_t stream)
rocm.bindings.hip.hipWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)#

Waits on a set of external semaphore objects

See:

Note:

This API is currently not supported on Linux.

Args:
extSemArray (ListOfPointer/object) – IN:

External semaphores to be waited on

paramsArray (hipExternalSemaphoreWaitParams_st/object) – IN:

Array of semaphore parameters

numExtSems (int) – IN:

Number of semaphores to wait on

stream (ihipStream_t/object) – IN:

Stream to enqueue the wait operations in

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipWaitExternalSemaphoresAsync(const hipExternalSemaphore_t * extSemArray, const hipExternalSemaphoreWaitParams * paramsArray, unsigned int numExtSems, hipStream_t stream)
rocm.bindings.hip.hipDestroyExternalSemaphore(extSem)#

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.

See:

Note:

This API is currently not supported on Linux.

Args:
extSem (Pointer/object) – IN:

handle to an external memory object

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDestroyExternalSemaphore(hipExternalSemaphore_t extSem)
rocm.bindings.hip.hipImportExternalMemory(memHandleDesc)#

Imports an external memory object.

See:

Args:
memHandleDesc (hipExternalMemoryHandleDesc_st/object) – IN:

Memory import handle descriptor

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipImportExternalMemory(hipExternalMemory_t * extMem_out, const hipExternalMemoryHandleDesc * memHandleDesc)
rocm.bindings.hip.hipExternalMemoryGetMappedBuffer(extMem, bufferDesc)#

Maps a buffer onto an imported memory object.

See:

Args:
extMem (Pointer/object) – IN:

Handle to external memory object

bufferDesc (hipExternalMemoryBufferDesc_st/object) – IN:

Buffer descriptor

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipExternalMemoryGetMappedBuffer(void ** devPtr, hipExternalMemory_t extMem, const hipExternalMemoryBufferDesc * bufferDesc)
rocm.bindings.hip.hipDestroyExternalMemory(extMem)#

Destroys an external memory object.

See:

Args:
extMem (Pointer/object) – IN:

External memory object to be destroyed

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem)
rocm.bindings.hip.hipExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc)#

Maps a mipmapped array onto an external memory object.

Returned mipmapped array must be freed using hipFreeMipmappedArray.

See:

hipImportExternalMemory, hipDestroyExternalMemory, hipExternalMemoryGetMappedBuffer, hipFreeMipmappedArray

Args:
extMem (Pointer/object) – IN:

external memory object handle

mipmapDesc (hipExternalMemoryMipmappedArrayDesc_st/object) – IN:

external mipmapped array descriptor

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipExternalMemoryGetMappedMipmappedArray(hipMipmappedArray_t * mipmap, hipExternalMemory_t extMem, const hipExternalMemoryMipmappedArrayDesc * mipmapDesc)
rocm.bindings.hip.hipMalloc(size)#

Allocate memory on the default accelerator

If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.

See:

hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray, hipHostFree, hipHostMalloc

Args:
size (int) – IN:

Requested memory size

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMalloc(void ** ptr, size_t size)
rocm.bindings.hip.hipExtMallocWithFlags(sizeBytes, flags)#

Allocate memory on the default accelerator

If requested memory size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.

The memory allocation flag should be either hipDeviceMallocDefault, hipDeviceMallocFinegrained, hipDeviceMallocUncached, or hipMallocSignalMemory. If the flag is any other value, the API returns hipErrorInvalidValue.

See:

hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray, hipHostFree, hiHostMalloc

Args:
sizeBytes (int) – IN:

Requested memory size

flags (int) – IN:

Type of memory allocation

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipExtMallocWithFlags(void ** ptr, size_t sizeBytes, unsigned int flags)
rocm.bindings.hip.hipMallocHost(size)#

Allocate pinned host memory [Deprecated]

If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.

Warning:

This API is deprecated, use hipHostMalloc() instead

Args:
size (int) – IN:

Requested memory size

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMallocHost(void ** ptr, size_t size)
rocm.bindings.hip.hipMemAllocHost(size)#

Allocate pinned host memory [Deprecated]

If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.

Warning:

This API is deprecated, use hipHostMalloc() instead

Args:
size (int) – IN:

Requested memory size

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemAllocHost(void ** ptr, size_t size)
rocm.bindings.hip.hipHostMalloc(size, flags)#

Allocates device accessible page locked (pinned) host memory

This API allocates pinned host memory which is mapped into the address space of all GPUs in the system, the memory can be accessed directly by the GPU device, and can be read or written with much higher bandwidth than pageable memory obtained with functions such as malloc().

Using the pinned host memory, applications can implement faster data transfers for HostToDevice and DeviceToHost. The runtime tracks the hipHostMalloc allocations and can avoid some of the setup required for regular unpinned memory.

When the memory accesses are infrequent, zero-copy memory can be a good choice, for coherent allocation. GPU can directly access the host memory over the CPU/GPU interconnect, without need to copy the data.

Currently the allocation granularity is 4KB for the API.

Developers need to choose proper allocation flag with consideration of synchronization.

If no input for flags, it will be the default pinned memory allocation on the host.

See:

hipSetDeviceFlags, hiptHostFree

Args:
size (int) – IN:

Requested memory size in bytes If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.

flags (int) – IN:

Type of host memory allocation. See the description of flags in hipSetDeviceFlags.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipHostMalloc(void ** ptr, size_t size, unsigned int flags)
rocm.bindings.hip.hipMallocManaged(size, flags)#

Allocates memory that will be automatically managed by HIP.

  • This section describes the managed memory management functions of HIP runtime API.

Note:

The managed memory management APIs are implemented on Linux, under developement on Windows.

This API is used for managed memory, allows data be shared and accessible to both CPU and GPU using a single pointer.

The API returns the allocation pointer, managed by HMM, can be used further to execute kernels on device and fetch data between the host and device as needed.

If HMM is not supported, the function behaves the same as hipMallocHost .

Note:

It is recommend to do the capability check before call this API.

Args:
size (int) – IN:
  • requested allocation size in bytes, it should be granularity of 4KB

flags (int) – IN:
  • must be either hipMemAttachGlobal or hipMemAttachHost

(defaults to hipMemAttachGlobal)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMallocManaged(void ** dev_ptr, size_t size, unsigned int flags)
rocm.bindings.hip.hipMemPrefetchAsync(dev_ptr, count, device, stream)#

Prefetches memory to the specified destination device using HIP.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
dev_ptr (Pointer/object) – IN:

pointer to be prefetched

count (int) – IN:

size in bytes for prefetching

device (int) – IN:

destination device to prefetch to

stream (ihipStream_t/object) – IN:

stream to enqueue prefetch operation

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemPrefetchAsync(const void * dev_ptr, size_t count, int device, hipStream_t stream)
rocm.bindings.hip.hipMemPrefetchAsync_v2(dev_ptr, count, location, flags, stream)#

Prefetches memory to the specified destination device using HIP.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
dev_ptr (Pointer/object) – IN:

pointer to be prefetched

count (int) – IN:

size in bytes for prefetching

location (hipMemLocation) – IN:

destination location to prefetch to

flags (int) – IN:

flags for future use, must be zero now.

stream (ihipStream_t/object) – IN:

stream to enqueue prefetch operation

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemPrefetchAsync_v2(const void * dev_ptr, size_t count, hipMemLocation location, unsigned int flags, hipStream_t stream)
rocm.bindings.hip.hipMemPrefetchBatchAsync(dev_ptrs, count, prefetch_locs, num_prefetch_locs, flags, stream)#

Prefetches a batch of memory ranges to the specified locations using HIP.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
dev_ptrs (ListOfPointer/object) – IN:

pointers to the memory ranges to prefetch

count (int) – IN:

number of memory ranges to prefetch

prefetch_locs (hipMemLocation/object) – IN:

locations to prefetch the memory ranges to

num_prefetch_locs (int) – IN:

number of locations to prefetch

flags (int) – IN:

flags for future use, must be zero now.

stream (ihipStream_t/object) – IN:

stream to enqueue the prefetch operation

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipMemPrefetchBatchAsync(void ** dev_ptrs, size_t * sizes, size_t count, hipMemLocation * prefetch_locs, size_t * prefetch_loc_idxs, size_t num_prefetch_locs, unsigned long long flags, hipStream_t stream)
rocm.bindings.hip.hipMemDiscardBatchAsync(dev_ptrs, count, flags, stream)#

Discards a batch of memory ranges asynchronously.

Warning:

Reading from a discarded range without first writing or prefetching to it will return an indeterminate value.

Warning:

Concurrent reads, writes, or prefetches to discarded ranges result in undefined behavior.

Note:

All memory ranges must be managed memory allocated via hipMallocManaged or system-allocated memory (if device supports pageable memory access).

Note:

This API is implemented on Linux and requires XNACK to be enabled.

Note:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

See:

hipMemPrefetchBatchAsync, hipMallocManaged

Args:
dev_ptrs (ListOfPointer/object) – IN:

pointers to the memory ranges to discard

count (int) – IN:

number of memory ranges to discard

flags (int) – IN:

flags for future use, must be zero now.

stream (ihipStream_t/object) – IN:

stream to enqueue the discard operation

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemDiscardBatchAsync(void ** dev_ptrs, size_t * sizes, size_t count, unsigned long long flags, hipStream_t stream)
rocm.bindings.hip.hipDrvMemDiscardBatchAsync(dptrs, count, flags, stream)#

Discards a batch of memory ranges asynchronously (driver API variant).

Warning:

Reading from a discarded range without first writing or prefetching to it will return an indeterminate value.

Note:

This is the driver API variant that uses hipDeviceptr_t instead of void*. Both hipMemDiscardBatchAsync and hipDrvMemDiscardBatchAsync use the same internal implementation.

See:

hipMemDiscardBatchAsync, hipMemPrefetchBatchAsync, hipMallocManaged

Args:
dptrs (ListOfPointer/object) – IN:

pointers to the memory ranges to discard

count (int) – IN:

number of memory ranges to discard

flags (int) – IN:

flags for future use, must be zero now.

stream (ihipStream_t/object) – IN:

stream to enqueue the discard operation

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDrvMemDiscardBatchAsync(hipDeviceptr_t * dptrs, size_t * sizes, size_t count, unsigned long long flags, hipStream_t stream)
rocm.bindings.hip.hipMemDiscardAndPrefetchBatchAsync(dptrs, count, prefetchLocs, numPrefetchLocs, flags, stream)#

Discards and prefetches a batch of memory ranges asynchronously.

Semantically equivalent to calling hipMemDiscardBatchAsync followed by hipMemPrefetchBatchAsync, but combines both operations into a single command submission for reduced overhead.

Warning:

Reading from a discarded range without first writing or prefetching to it will return an indeterminate value.

Note:

All memory ranges must be managed memory allocated via hipMallocManaged or system-allocated memory (if device supports pageable memory access).

Note:

This API is implemented on Linux and requires XNACK to be enabled.

Note:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

See:

hipMemDiscardBatchAsync, hipMemPrefetchBatchAsync, hipMallocManaged

Args:
dptrs (ListOfPointer/object) – IN:

pointers to the memory ranges

count (int) – IN:

number of memory ranges

prefetchLocs (hipMemLocation/object) – IN:

array of target locations for prefetching

numPrefetchLocs (int) – IN:

number of unique prefetch locations

flags (int) – IN:

flags for future use, must be zero now.

stream (ihipStream_t/object) – IN:

stream to enqueue the operation

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipMemDiscardAndPrefetchBatchAsync(void ** dptrs, size_t * sizes, size_t count, hipMemLocation * prefetchLocs, size_t * prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, hipStream_t stream)
rocm.bindings.hip.hipDrvMemDiscardAndPrefetchBatchAsync(dptrs, count, prefetchLocs, numPrefetchLocs, flags, stream)#

Discards and prefetches a batch of memory ranges asynchronously (driver API variant).

Note:

This is the driver API variant that uses hipDeviceptr_t instead of void*.

See:

hipMemDiscardAndPrefetchBatchAsync, hipMemDiscardBatchAsync, hipMemPrefetchBatchAsync

Args:
dptrs (ListOfPointer/object) – IN:

pointers to the memory ranges

count (int) – IN:

number of memory ranges

prefetchLocs (hipMemLocation/object) – IN:

array of target locations for prefetching

numPrefetchLocs (int) – IN:

number of unique prefetch locations

flags (int) – IN:

flags for future use, must be zero now.

stream (ihipStream_t/object) – IN:

stream to enqueue the operation

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipDrvMemDiscardAndPrefetchBatchAsync(hipDeviceptr_t * dptrs, size_t * sizes, size_t count, hipMemLocation * prefetchLocs, size_t * prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, hipStream_t stream)
rocm.bindings.hip.hipMemAdvise(dev_ptr, count, advice, device)#

Advise about the usage of a given memory range to HIP.

This HIP API advises about the usage to be applied on unified memory allocation in the range starting from the pointer address devPtr, with the size of count bytes. The memory range must refer to managed memory allocated via the API hipMallocManaged, and the range will be handled with proper round down and round up respectively in the driver to be aligned to CPU page size, the same way as corresponding CUDA API behaves in CUDA version 8.0 and afterwards.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
dev_ptr (Pointer/object) – IN:

pointer to memory to set the advice for

count (int) – IN:

size in bytes of the memory range, it should be CPU page size alligned.

advice (hipMemoryAdvise) – IN:

advice to be applied for the specified memory range

device (int) – IN:

device to apply the advice for

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemAdvise(const void * dev_ptr, size_t count, hipMemoryAdvise advice, int device)
rocm.bindings.hip.hipMemAdvise_v2(dev_ptr, count, advice, location)#

Advise about the usage of a given memory range to HIP.

This HIP API advises about the usage to be applied on unified memory allocation in the range starting from the pointer address devPtr, with the size of count bytes. The memory range must refer to managed memory allocated via the API hipMallocManaged, and the range will be handled with proper round down and round up respectively in the driver to be aligned to CPU page size, the same way as corresponding CUDA API behaves in CUDA version 8.0 and afterwards.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
dev_ptr (Pointer/object) – IN:

pointer to memory to set the advice for

count (int) – IN:

size in bytes of the memory range, it should be CPU page size alligned.

advice (hipMemoryAdvise) – IN:

advice to be applied for the specified memory range

location (hipMemLocation) – IN:

location to apply the advice for

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemAdvise_v2(const void * dev_ptr, size_t count, hipMemoryAdvise advice, hipMemLocation location)
rocm.bindings.hip.hipMemRangeGetAttribute(data, data_size, attribute, dev_ptr, count)#

Query an attribute of a given memory range in HIP.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
data (Pointer/object) – IN,OUT:

a pointer to a memory location where the result of each attribute query will be written to

data_size (int) – IN:

the size of data

attribute (hipMemRangeAttribute) – IN:

the attribute to query

dev_ptr (Pointer/object) – IN:

start of the range to query

count (int) – IN:

size of the range to query

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemRangeGetAttribute(void * data, size_t data_size, hipMemRangeAttribute attribute, const void * dev_ptr, size_t count)
rocm.bindings.hip.hipMemRangeGetAttributes(num_attributes, dev_ptr, count)#

Query attributes of a given memory range in HIP.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
num_attributes (int) – IN:

an array of attributes to query (numAttributes and the number of attributes in this array should match)

dev_ptr (Pointer/object) – IN:

start of the range to query

count (int) – IN:

size of the range to query

Returns:

A tuple of size 4 that contains (in that order):

C signature

hipError_t hipMemRangeGetAttributes(void ** data, size_t * data_sizes, hipMemRangeAttribute * attributes, size_t num_attributes, const void * dev_ptr, size_t count)
rocm.bindings.hip.hipStreamAttachMemAsync(stream, dev_ptr, length, flags)#

Attach memory to a stream asynchronously in HIP.

Warning:

This API is under development. Currently it is a no-operation (NOP) function on AMD GPUs and returns hipSuccess.

Args:
stream (ihipStream_t/object) – IN:
  • stream in which to enqueue the attach operation

dev_ptr (Pointer/object) – IN:
  • pointer to memory (must be a pointer to managed memory or

to a valid host-accessible region of system-allocated memory)

length (int) – IN:
  • length of memory (defaults to zero)

flags (int) – IN:
  • must be one of hipMemAttachGlobal, hipMemAttachHost or

hipMemAttachSingle (defaults to hipMemAttachSingle)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamAttachMemAsync(hipStream_t stream, void * dev_ptr, size_t length, unsigned int flags)
rocm.bindings.hip.hipMallocAsync(size, stream)#

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.

Note:

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.

Note:

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.

See:

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.

Args:
size (int) – IN:

Number of bytes to allocate

stream (ihipStream_t/object) – IN:

The stream establishing the stream ordering contract and the memory pool to allocate from

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMallocAsync(void ** dev_ptr, size_t size, hipStream_t stream)
rocm.bindings.hip.hipFreeAsync(dev_ptr, stream)#

Frees memory with stream ordered semantics

Inserts a free operation into stream. The allocation must not be used after stream execution reaches the free. After this API returns, accessing the memory from any subsequent work launched on the GPU or querying its pointer attributes results in undefined behavior.

Note:

During stream capture, this function results in the creation of a free node and must therefore be passed the address of a graph allocation.

See:

hipMallocFromPoolAsync, hipMallocAsync, 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.

Args:
dev_ptr (Pointer/object) – IN:

Pointer to device memory to free

stream (ihipStream_t/object) – IN:

The stream, where the destruciton will occur according to the execution order

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipFreeAsync(void * dev_ptr, hipStream_t stream)
rocm.bindings.hip.hipMemPoolTrimTo(mem_pool, min_bytes_to_hold)#

Releases freed memory back to the OS

Releases memory back to the OS until the pool contains fewer than min_bytes_to_keep reserved bytes, or there is no more memory that the allocator can safely release. The allocator cannot release OS allocations that back outstanding asynchronous allocations. The OS allocations may happen at different granularity from the user allocations.

Note:

Allocations that have not been freed count as outstanding.

Note:

Allocations that have been asynchronously freed but whose completion has not been observed on the host (eg. by a synchronize) can count as outstanding.

See:

hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, 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.

Args:
mem_pool (ihipMemPoolHandle_t/object) – IN:

The memory pool to trim allocations

min_bytes_to_hold (int) – IN:

If the pool has less than min_bytes_to_hold reserved, then the TrimTo operation is a no-op. Otherwise the memory pool will contain at least min_bytes_to_hold bytes reserved after the operation.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemPoolTrimTo(hipMemPool_t mem_pool, size_t min_bytes_to_hold)
rocm.bindings.hip.hipMemPoolSetAttribute(mem_pool, attr, value)#

Sets attributes of a memory pool

Supported attributes are: - hipMemPoolAttrReleaseThreshold: (value type = cuuint64_t)

Amount of reserved memory in bytes to hold onto before trying to release memory back to the OS. When more than the release threshold bytes of memory are held by the memory pool, the allocator will try to release memory back to the OS on the next call to stream, event or context synchronize. (default 0)

  • hipMemPoolReuseFollowEventDependencies: (value type = int)

    Allow hipMallocAsync to use memory asynchronously freed in another stream as long as a stream ordering dependency of the allocating stream on the free action exists. HIP events and null stream interactions can create the required stream ordered dependencies. (default enabled)

  • hipMemPoolReuseAllowOpportunistic: (value type = int)

    Allow reuse of already completed frees when there is no

dependency between the free and allocation. (default enabled) - hipMemPoolReuseAllowInternalDependencies: (value type = int)

Allow hipMallocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by hipFreeAsync (default enabled).

See:

hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolTrimTo, hipDeviceSetMemPool, 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.

Args:
mem_pool (ihipMemPoolHandle_t/object) – IN:

The memory pool to modify

attr (hipMemPoolAttr) – IN:

The attribute to modify

value (Pointer/object) – IN:

Pointer to the value to assign

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemPoolSetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void * value)
rocm.bindings.hip.hipMemPoolGetAttribute(mem_pool, attr, value)#

Gets attributes of a memory pool

Supported attributes are: - hipMemPoolAttrReleaseThreshold: (value type = cuuint64_t)

Amount of reserved memory in bytes to hold onto before trying to release memory back to the OS. When more than the release threshold bytes of memory are held by the memory pool, the allocator will try to release memory back to the OS on the next call to stream, event or context synchronize. (default 0)

  • hipMemPoolReuseFollowEventDependencies: (value type = int)

    Allow hipMallocAsync to use memory asynchronously freed in another stream as long as a stream ordering dependency of the allocating stream on the free action exists. HIP events and null stream interactions can create the required stream ordered dependencies. (default enabled)

  • hipMemPoolReuseAllowOpportunistic: (value type = int)

    Allow reuse of already completed frees when there is no

dependency between the free and allocation. (default enabled) - hipMemPoolReuseAllowInternalDependencies: (value type = int)

Allow hipMallocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by hipFreeAsync (default enabled).

See:

hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolTrimTo, 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.

Args:
mem_pool (ihipMemPoolHandle_t/object) – IN:

The memory pool to get attributes of

attr (hipMemPoolAttr) – IN:

The attribute to get

value (Pointer/object) – IN:

Retrieved value

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemPoolGetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void * value)
rocm.bindings.hip.hipMemPoolSetAccess(mem_pool, desc_list, count)#

Controls visibility of the specified pool between devices

See:

hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, 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.

Args:
mem_pool (ihipMemPoolHandle_t/object) – IN:

Memory pool for acccess change

desc_list (hipMemAccessDesc/object) – IN:

Array of access descriptors. Each descriptor instructs the access to enable for a single gpu

count (int) – IN:

Number of descriptors in the map array.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemPoolSetAccess(hipMemPool_t mem_pool, const hipMemAccessDesc * desc_list, size_t count)
rocm.bindings.hip.hipMemPoolGetAccess(mem_pool, location)#

Returns the accessibility of a pool from a device

Returns the accessibility of the pool’s memory from the specified location.

See:

hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess

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.

Args:
mem_pool (ihipMemPoolHandle_t/object) – IN:

Memory pool being queried

location (hipMemLocation/object) – IN:

Location/device for memory pool access

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemPoolGetAccess(hipMemAccessFlags * flags, hipMemPool_t mem_pool, hipMemLocation * location)
rocm.bindings.hip.hipMemPoolCreate(pool_props)#

Creates a memory pool

Creates a HIP memory pool and returns the handle in mem_pool. The pool_props determines the properties of the pool such as the backing device and IPC capabilities.

By default, the memory pool will be accessible from the device it is allocated on.

Note:

Specifying hipMemHandleTypeNone creates a memory pool that will not support IPC.

See:

hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolDestroy, hipMemPoolTrimTo, 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.

Args:
pool_props (hipMemPoolProps/object) – IN:

Memory pool properties

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemPoolCreate(hipMemPool_t * mem_pool, const hipMemPoolProps * pool_props)
rocm.bindings.hip.hipMemPoolDestroy(mem_pool)#

Destroys the specified memory pool

If any pointers obtained from this pool haven’t been freed or the pool has free operations that haven’t completed when hipMemPoolDestroy is invoked, the function will return immediately and the resources associated with the pool will be released automatically once there are no more outstanding allocations.

Destroying the current mempool of a device sets the default mempool of that device as the current mempool for that device.

Note:

A device’s default memory pool cannot be destroyed.

See:

hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolCreate hipMemPoolTrimTo, 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.

Args:
mem_pool (ihipMemPoolHandle_t/object) – IN:

Memory pool for destruction

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemPoolDestroy(hipMemPool_t mem_pool)
rocm.bindings.hip.hipMallocFromPoolAsync(size, mem_pool, stream)#

Allocates memory from a specified pool with stream ordered semantics.

Inserts an allocation operation into stream. A pointer to the allocated memory is returned immediately in dev_ptr. The allocation must not be accessed until the allocation operation completes. The allocation comes from the specified memory pool.

Note:

The specified memory pool may be from a device different than that of the specified stream.

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.

Note:

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.

See:

hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolCreate hipMemPoolTrimTo, 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.

Args:
size (int) – IN:

Number of bytes to allocate

mem_pool (ihipMemPoolHandle_t/object) – IN:

The pool to allocate from

stream (ihipStream_t/object) – IN:

The stream establishing the stream ordering semantic

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMallocFromPoolAsync(void ** dev_ptr, size_t size, hipMemPool_t mem_pool, hipStream_t stream)
rocm.bindings.hip.hipMemPoolExportToShareableHandle(shared_handle, mem_pool, handle_type, flags)#

Exports a memory pool to the requested handle type.

Given an IPC capable mempool, create an OS handle to share the pool with another process. A recipient process can convert the shareable handle into a mempool with hipMemPoolImportFromShareableHandle. Individual pointers can then be shared with the hipMemPoolExportPointer and hipMemPoolImportPointer APIs. The implementation of what the shareable handle is and how it can be transferred is defined by the requested handle type.

Note:

To create an IPC capable mempool, create a mempool with a hipMemAllocationHandleType other than hipMemHandleTypeNone.

See:

hipMemPoolImportFromShareableHandle

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.

Args:
shared_handle (Pointer/object) – OUT:

Pointer to the location in which to store the requested handle

mem_pool (ihipMemPoolHandle_t/object) – IN:

Pool to export

handle_type (hipMemAllocationHandleType) – IN:

The type of handle to create

flags (int) – IN:

Must be 0

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemPoolExportToShareableHandle(void * shared_handle, hipMemPool_t mem_pool, hipMemAllocationHandleType handle_type, unsigned int flags)
rocm.bindings.hip.hipMemPoolImportFromShareableHandle(shared_handle, handle_type, flags)#

Imports a memory pool from a shared handle.

Specific allocations can be imported from the imported pool with hipMemPoolImportPointer.

Note:

Imported memory pools do not support creating new allocations. As such imported memory pools may not be used in hipDeviceSetMemPool or hipMallocFromPoolAsync calls.

See:

hipMemPoolExportToShareableHandle

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.

Args:
shared_handle (Pointer/object) – IN:

OS handle of the pool to open

handle_type (hipMemAllocationHandleType) – IN:

The type of handle being imported

flags (int) – IN:

Must be 0

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemPoolImportFromShareableHandle(hipMemPool_t * mem_pool, void * shared_handle, hipMemAllocationHandleType handle_type, unsigned int flags)
rocm.bindings.hip.hipMemPoolExportPointer(dev_ptr)#

Export data to share a memory pool allocation between processes.

Constructs export_data for sharing a specific allocation from an already shared memory pool. The recipient process can import the allocation with the hipMemPoolImportPointer api. The data is not a handle and may be shared through any IPC mechanism.

See:

hipMemPoolImportPointer

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.

Args:
dev_ptr (Pointer/object) – IN:

Pointer to memory being exported

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemPoolExportPointer(hipMemPoolPtrExportData * export_data, void * dev_ptr)
rocm.bindings.hip.hipMemPoolImportPointer(mem_pool, export_data)#

Import a memory pool allocation from another process.

Returns in dev_ptr a pointer to the imported memory. The imported memory must not be accessed before the allocation operation completes in the exporting process. The imported memory must be freed from all importing processes before being freed in the exporting process. The pointer may be freed with hipFree or hipFreeAsync. If hipFreeAsync is used, the free must be completed on the importing process before the free operation on the exporting process.

Note:

The hipFreeAsync api may be used in the exporting process before the hipFreeAsync operation completes in its stream as long as the hipFreeAsync in the exporting process specifies a stream with a stream dependency on the importing process’s hipFreeAsync.

See:

hipMemPoolExportPointer

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.

Args:
mem_pool (ihipMemPoolHandle_t/object) – IN:

Memory pool from which to import a pointer

export_data (hipMemPoolPtrExportData/object) – IN:

Data specifying the memory to import

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemPoolImportPointer(void ** dev_ptr, hipMemPool_t mem_pool, hipMemPoolPtrExportData * export_data)
rocm.bindings.hip.hipMemSetMemPool(location, type, pool)#

Sets memory pool for memory location and allocation type.

Args:
location (hipMemLocation/object):

(undocumented)

type (hipMemAllocationType):

(undocumented)

pool (ihipMemPoolHandle_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemSetMemPool(hipMemLocation * location, hipMemAllocationType type, hipMemPool_t pool)
rocm.bindings.hip.hipMemGetMemPool(location, type)#

Retrieves memory pool for memory location and allocation type.

Args:
location (hipMemLocation/object):

(undocumented)

type (hipMemAllocationType):

(undocumented)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemGetMemPool(hipMemPool_t * pool, hipMemLocation * location, hipMemAllocationType type)
rocm.bindings.hip.hipMemGetDefaultMemPool(location, type)#

Returns the default memory pool for a given location and allocation type

Args:
location (hipMemLocation/object) – IN:

location type for which to get the default memory pool, currently only hipMemLocationTypeDevice is supported

type (hipMemAllocationType) – IN:

allocation type for which to get the default memory pool, currently only hipMemAllocationTypePinned & hipMemAllocationTypeManaged are supported

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemGetDefaultMemPool(hipMemPool_t * memPool, hipMemLocation * location, hipMemAllocationType type)
rocm.bindings.hip.hipHostAlloc(size, flags)#

Allocate device accessible page locked host memory

If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.

Flags: - hipHostAllocDefault Default pinned memory allocation on the host. - hipHostAllocPortable Memory is considered allocated by all contexts. - hipHostAllocMapped Map the allocation into the address space for the current device. - hipHostAllocWriteCombined Allocates the memory as write-combined. - hipHostAllocUncached Allocate the host memory on extended fine grained access system

memory pool

Args:
size (int) – IN:

Requested memory size in bytes

flags (int) – IN:

Type of host memory allocation see below

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipHostAlloc(void ** ptr, size_t size, unsigned int flags)
rocm.bindings.hip.hipHostGetDevicePointer(hstPtr, flags)#

Get Device pointer from Host Pointer allocated through hipHostMalloc

See:

hipSetDeviceFlags, hipHostMalloc

Args:
hstPtr (Pointer/object) – IN:

Host Pointer allocated through hipHostMalloc

flags (int) – IN:

Flags to be passed for extension

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipHostGetDevicePointer(void ** devPtr, void * hstPtr, unsigned int flags)
rocm.bindings.hip.hipHostGetFlags(hostPtr)#

Return flags associated with host pointer

See:

hipHostMalloc

Args:
hostPtr (Pointer/object) – IN:

Host Pointer allocated through hipHostMalloc

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipHostGetFlags(unsigned int * flagsPtr, void * hostPtr)
rocm.bindings.hip.hipHostRegister(hostPtr, sizeBytes, flags)#

Register host memory so it can be accessed from the current device.

Flags:
one context so this is always assumed true.
The device pointer can be obtained with hipHostGetDevicePointer.
  • hipExtHostRegisterUncached Map the host memory onto extended fine grained access system

memory pool.

After registering the memory, use hipHostGetDevicePointer to obtain the mapped device pointer. On many systems, the mapped device pointer will have a different value than the mapped host

pointer. Applications must use the device pointer in device code, and the host pointer in host code.

On some systems, registered memory is pinned. On some systems, registered memory may not be

actually be pinned but uses OS or hardware facilities to all GPU access to the host memory.

Developers are strongly encouraged to register memory blocks which are aligned to the host

cache-line size. (typically 64-bytes but can be obtains from the CPUID instruction).

If registering non-aligned pointers, the application must take care when register pointers from

the same cache line on different devices. HIP’s coarse-grained synchronization model does not guarantee correct results if different devices write to different parts of the same cache block - typically one of the writes will “win” and overwrite data from the other registered memory region.

See:

hipHostUnregister, hipHostGetFlags, hipHostGetDevicePointer

Args:
hostPtr (Pointer/object) – OUT:

Pointer to host memory to be registered.

sizeBytes (int) – IN:

Size of the host memory

flags (int) – IN:

See below.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipHostRegister(void * hostPtr, size_t sizeBytes, unsigned int flags)
rocm.bindings.hip.hipHostUnregister(hostPtr)#

Un-register host pointer

See:

hipHostRegister

Args:
hostPtr (Pointer/object) – IN:

Host pointer previously registered with hipHostRegister

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipHostUnregister(void * hostPtr)
rocm.bindings.hip.hipMallocPitch(width, height)#
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 retu […]

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

If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.

See:

hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D, hipMalloc3DArray, hipHostMalloc

Args:
width (int) – IN:

Requested pitched allocation width (in bytes)

height (int) – IN:

Requested pitched allocation height

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipMallocPitch(void ** ptr, size_t * pitch, size_t width, size_t height)
rocm.bindings.hip.hipMemAllocPitch(widthInBytes, height, elementSizeBytes)#
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 retu […]

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

If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.

The intended usage of pitch is as a separate parameter of the allocation, used to compute

addresses within the 2D array. Given the row and column of an array element of type T, the address is computed as: T* pElement = (T*)((char*)BaseAddress + Row * Pitch) + Column;

See:

hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D, hipMalloc3DArray, hipHostMalloc

Args:
widthInBytes (int) – IN:

Requested pitched allocation width (in bytes)

height (int) – IN:

Requested pitched allocation height

elementSizeBytes (int) – IN:

The size of element bytes, should be 4, 8 or 16

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipMemAllocPitch(hipDeviceptr_t * dptr, size_t * pitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes)
rocm.bindings.hip.hipFree(ptr)#
Free memory allocated by the HIP-Clang hip memory allocation API.

This API performs an implicit hipDeviceSynchronize() call. If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.

See:

hipMalloc, hipMallocPitch, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D, hipMalloc3DArray, hipHostMalloc

Args:
ptr (Pointer/object) – IN:

Pointer to memory to be freed

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipFree(void * ptr)
rocm.bindings.hip.hipFreeHost(ptr)#

Frees page-locked memory This API performs an implicit hipDeviceSynchronize() call. If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.

Args:
ptr (Pointer/object) – IN:

Pointer to memory to be freed

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipFreeHost(void * ptr)
rocm.bindings.hip.hipHostFree(ptr)#
Free memory allocated by the HIP-Clang 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.

See:

hipMalloc, hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray, hipHostMalloc

Args:
ptr (Pointer/object) – IN:

Pointer to memory to be freed

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipHostFree(void * ptr)
rocm.bindings.hip.hipMemcpy(dst, src, sizeBytes, kind)#

Copy data from src to dst.

It supports memory from host to device,

device to host, device to device and host to host The src and dst must not overlap.

For hipMemcpy, the copy is always performed by the current device (set by hipSetDevice). For multi-gpu or peer-to-peer configurations, it is recommended to set the current device to the device where the src data is physically located. For optimal peer-to-peer copies, the copy

device must be able to access the src and dst pointers (by calling hipDeviceEnablePeerAccess with copy agent as the current device and src/dst as the peerDevice argument. if this is not done, the hipMemcpy will still work, but will perform the copy using a staging buffer on the host.

Calling hipMemcpy with dst and src pointers that do not match the hipMemcpyKind results in undefined behavior.

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dst (Pointer/object) – OUT:

Data being copy to

src (Pointer/object) – IN:

Data being copy from

sizeBytes (int) – IN:

Data size in bytes

kind (hipMemcpyKind) – IN:

Kind of transfer

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy(void * dst, const void * src, size_t sizeBytes, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpyWithStream(dst, src, sizeBytes, kind, stream)#
Memory copy on the stream.

It allows single or multiple devices to do memory copy on single or multiple streams. The operation is akin to hipMemcpyAsync + hipStreamSynchronize. Since it is a sync API, it is not allowed during graph capture.

See:

hipMemcpy, hipStreamCreate, hipStreamSynchronize, hipStreamDestroy, hipSetDevice, hipLaunchKernelGGL

Args:
dst (Pointer/object) – OUT:

Data being copy to

src (Pointer/object) – IN:

Data being copy from

sizeBytes (int) – IN:

Data size in bytes

kind (hipMemcpyKind) – IN:

Kind of transfer

stream (ihipStream_t/object) – IN:

Valid stream

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyWithStream(void * dst, const void * src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpyHtoD(dst, src, sizeBytes)#

Copy data from Host to Device

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dst (Pointer/object) – OUT:

Data being copy to

src (Pointer/object) – IN:

Data being copy from

sizeBytes (int) – IN:

Data size in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyHtoD(hipDeviceptr_t dst, const void * src, size_t sizeBytes)
rocm.bindings.hip.hipMemcpyDtoH(dst, src, sizeBytes)#

Copy data from Device to Host

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dst (Pointer/object) – OUT:

Data being copy to

src (Pointer/object) – IN:

Data being copy from

sizeBytes (int) – IN:

Data size in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyDtoH(void * dst, hipDeviceptr_t src, size_t sizeBytes)
rocm.bindings.hip.hipMemcpyDtoD(dst, src, sizeBytes)#

Copy data from Device to Device

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dst (Pointer/object) – OUT:

Data being copy to

src (Pointer/object) – IN:

Data being copy from

sizeBytes (int) – IN:

Data size in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes)
rocm.bindings.hip.hipMemcpyAtoD(dstDevice, srcArray, srcOffset, ByteCount)#

Copies from one 1D array to device memory.

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dstDevice (Pointer/object) – OUT:

Destination device pointer

srcArray (hipArray/object) – IN:

Source array

srcOffset (int) – IN:

Offset in bytes of source array

ByteCount (int) – IN:

Size of memory copy in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyAtoD(hipDeviceptr_t dstDevice, hipArray_t srcArray, size_t srcOffset, size_t ByteCount)
rocm.bindings.hip.hipMemcpyDtoA(dstArray, dstOffset, srcDevice, ByteCount)#

Copies from device memory to a 1D array.

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dstArray (hipArray/object) – OUT:

Destination array

dstOffset (int) – IN:

Offset in bytes of destination array

srcDevice (Pointer/object) – IN:

Source device pointer

ByteCount (int) – IN:

Size of memory copy in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyDtoA(hipArray_t dstArray, size_t dstOffset, hipDeviceptr_t srcDevice, size_t ByteCount)
rocm.bindings.hip.hipMemcpyAtoA(dstArray, dstOffset, srcArray, srcOffset, ByteCount)#

Copies from one 1D array to another.

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dstArray (hipArray/object) – OUT:

Destination array

dstOffset (int) – IN:

Offset in bytes of destination array

srcArray (hipArray/object) – IN:

Source array

srcOffset (int) – IN:

Offset in bytes of source array

ByteCount (int) – IN:

Size of memory copy in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyAtoA(hipArray_t dstArray, size_t dstOffset, hipArray_t srcArray, size_t srcOffset, size_t ByteCount)
rocm.bindings.hip.hipMemcpyHtoDAsync(dst, src, sizeBytes, stream)#

Copy data from Host to Device asynchronously

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dst (Pointer/object) – OUT:

Data being copy to

src (Pointer/object) – IN:

Data being copy from

sizeBytes (int) – IN:

Data size in bytes

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, const void * src, size_t sizeBytes, hipStream_t stream)
rocm.bindings.hip.hipMemcpyDtoHAsync(dst, src, sizeBytes, stream)#

Copy data from Device to Host asynchronously

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dst (Pointer/object) – OUT:

Data being copy to

src (Pointer/object) – IN:

Data being copy from

sizeBytes (int) – IN:

Data size in bytes

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyDtoHAsync(void * dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream)
rocm.bindings.hip.hipMemcpyDtoDAsync(dst, src, sizeBytes, stream)#

Copy data from Device to Device asynchronously

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dst (Pointer/object) – OUT:

Data being copy to

src (Pointer/object) – IN:

Data being copy from

sizeBytes (int) – IN:

Data size in bytes

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream)
rocm.bindings.hip.hipMemcpyAtoHAsync(dstHost, srcArray, srcOffset, ByteCount, stream)#

Copies from one 1D array to host memory.

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dstHost (Pointer/object) – OUT:

Destination pointer

srcArray (hipArray/object) – IN:

Source array

srcOffset (int) – IN:

Offset in bytes of source array

ByteCount (int) – IN:

Size of memory copy in bytes

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyAtoHAsync(void * dstHost, hipArray_t srcArray, size_t srcOffset, size_t ByteCount, hipStream_t stream)
rocm.bindings.hip.hipMemcpyHtoAAsync(dstArray, dstOffset, srcHost, ByteCount, stream)#

Copies from host memory to a 1D array.

See:

hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer

Args:
dstArray (hipArray/object) – OUT:

Destination array

dstOffset (int) – IN:

Offset in bytes of destination array

srcHost (Pointer/object) – IN:

Source host pointer

ByteCount (int) – IN:

Size of memory copy in bytes

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyHtoAAsync(hipArray_t dstArray, size_t dstOffset, const void * srcHost, size_t ByteCount, hipStream_t stream)
rocm.bindings.hip.hipModuleGetGlobal(hmod, name)#

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.

Args:
hmod (ihipModule_t/object) – IN:

Module to retrieve global from

name (CStr/object) – IN:

Name of global to retrieve

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipModuleGetGlobal(hipDeviceptr_t * dptr, size_t * bytes, hipModule_t hmod, const char * name)
rocm.bindings.hip.hipGetSymbolAddress(symbol)#

Gets device pointer associated with symbol on the device.

Args:
symbol (Pointer/object) – IN:

pointer to the symbole of the device

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetSymbolAddress(void ** devPtr, const void * symbol)
rocm.bindings.hip.hipGetSymbolSize(symbol)#

Gets the size of the given symbol on the device.

Args:
symbol (Pointer/object) – IN:

pointer to the device symbole

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetSymbolSize(size_t * size, const void * symbol)
rocm.bindings.hip.hipGetProcAddress(symbol, hipVersion, flags)#

Gets the pointer of requested HIP driver function.

Returns hipSuccess if the returned pfn is addressed to the pointer of found driver function.

Args:
symbol (CStr/object) – IN:

The Symbol name of the driver function to request.

hipVersion (int) – IN:

The HIP version for the requested driver function symbol. HIP version is defined as 100*version_major + version_minor. For example, in HIP 6.1, the hipversion is 601, for the symbol function “hipGetDeviceProperties”, the specified hipVersion 601 is greater or equal to the version 600, the symbol function will be handle properly as backend compatible function.

flags (int) – IN:

Currently only default flag is suppported.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipGetProcAddress(const char * symbol, void ** pfn, int hipVersion, uint64_t flags, hipDriverProcAddressQueryResult * symbolStatus)
rocm.bindings.hip.hipMemcpyToSymbol(symbol, src, sizeBytes, offset, kind)#

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 detailed usage, see the <a href=”https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_porting_guide.html:py:obj:memcpytosymbol”>memcpyToSymbol example</a> in the HIP Porting Guide.

Args:
symbol (Pointer/object) – OUT:

pointer to the device symbole

src (Pointer/object) – IN:

pointer to the source address

sizeBytes (int) – IN:

size in bytes to copy

offset (int) – IN:

offset in bytes from start of symbole

kind (hipMemcpyKind) – IN:

type of memory transfer

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyToSymbol(const void * symbol, const void * src, size_t sizeBytes, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpyToSymbolAsync(symbol, src, sizeBytes, offset, kind, stream)#

Copies data to the given symbol on the device asynchronously.

Args:
symbol (Pointer/object) – OUT:

pointer to the device symbole

src (Pointer/object) – IN:

pointer to the source address

sizeBytes (int) – IN:

size in bytes to copy

offset (int) – IN:

offset in bytes from start of symbole

kind (hipMemcpyKind) – IN:

type of memory transfer

stream (ihipStream_t/object) – IN:

stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyToSymbolAsync(const void * symbol, const void * src, size_t sizeBytes, size_t offset, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpyFromSymbol(dst, symbol, sizeBytes, offset, kind)#

Copies data from the given symbol on the device.

Args:
dst (Pointer/object) – OUT:

Returns pointer to destinition memory address

symbol (Pointer/object) – IN:

Pointer to the symbole address on the device

sizeBytes (int) – IN:

Size in bytes to copy

offset (int) – IN:

Offset in bytes from the start of symbole

kind (hipMemcpyKind) – IN:

Type of memory transfer

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyFromSymbol(void * dst, const void * symbol, size_t sizeBytes, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpyFromSymbolAsync(dst, symbol, sizeBytes, offset, kind, stream)#

Copies data from the given symbol on the device asynchronously.

Args:
dst (Pointer/object) – OUT:

Returns pointer to destinition memory address

symbol (Pointer/object) – IN:

pointer to the symbole address on the device

sizeBytes (int) – IN:

size in bytes to copy

offset (int) – IN:

offset in bytes from the start of symbole

kind (hipMemcpyKind) – IN:

type of memory transfer

stream (ihipStream_t/object) – IN:

stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyFromSymbolAsync(void * dst, const void * symbol, size_t sizeBytes, size_t offset, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpyAsync(dst, src, sizeBytes, kind, stream)#

Copies data from src to dst asynchronously.

The copy is always performed by the device associated with the specified stream.

For multi-gpu or peer-to-peer configurations, it is recommended to use a stream which is

attached to the device where the src data is physically located.

For optimal peer-to-peer copies, the copy device must be able to access the src and dst

pointers (by calling hipDeviceEnablePeerAccess) with copy agent as the current device and src/dest as the peerDevice argument. If enabling device peer access is not done, the memory copy will still work, but will perform the copy using a staging buffer on the host.

Note:

If host or dst are not pinned, the memory copy will be performed synchronously. For best performance, use hipHostMalloc to allocate host memory that is transferred asynchronously.

See:

hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpy2DFromArray, hipMemcpyArrayToArray, hipMemcpy2DArrayToArray, hipMemcpyToSymbol, hipMemcpyFromSymbol, hipMemcpy2DAsync, hipMemcpyToArrayAsync, hipMemcpy2DToArrayAsync, hipMemcpyFromArrayAsync, hipMemcpy2DFromArrayAsync, hipMemcpyToSymbolAsync, hipMemcpyFromSymbolAsync

Args:
dst (Pointer/object) – OUT:

Data being copy to

src (Pointer/object) – IN:

Data being copy from

sizeBytes (int) – IN:

Data size in bytes

kind (hipMemcpyKind) – IN:

Type of memory transfer

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyAsync(void * dst, const void * src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemset(dst, value, sizeBytes)#

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant byte value value.

Args:
dst (Pointer/object) – OUT:

Data being filled

value (int) – IN:

Value to be set

sizeBytes (int) – IN:

Data size in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset(void * dst, int value, size_t sizeBytes)
rocm.bindings.hip.hipMemsetD8(dest, value, count)#

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant byte value value.

Args:
dest (Pointer/object) – OUT:

Data ptr to be filled

value (int) – IN:

Value to be set

count (int) – IN:

Number of values to be set

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD8(hipDeviceptr_t dest, unsigned char value, size_t count)
rocm.bindings.hip.hipMemsetD8Async(dest, value, count, stream)#

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant byte value value.

hipMemsetD8Async() is asynchronous with respect to the host, so the call may return before the memset is complete. The operation can optionally be associated to a stream by passing a non-zero stream argument. If stream is non-zero, the operation may overlap with operations in other streams.

Args:
dest (Pointer/object) – OUT:

Data ptr to be filled

value (int) – IN:

Constant value to be set

count (int) – IN:

Number of values to be set

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD8Async(hipDeviceptr_t dest, unsigned char value, size_t count, hipStream_t stream)
rocm.bindings.hip.hipMemsetD16(dest, value, count)#

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant short value value.

Args:
dest (Pointer/object) – OUT:

Data ptr to be filled

value (int) – IN:

Constant value to be set

count (int) – IN:

Number of values to be set

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD16(hipDeviceptr_t dest, unsigned short value, size_t count)
rocm.bindings.hip.hipMemsetD16Async(dest, value, count, stream)#

Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant short value value.

hipMemsetD16Async() is asynchronous with respect to the host, so the call may return before the memset is complete. The operation can optionally be associated to a stream by passing a non-zero stream argument. If stream is non-zero, the operation may overlap with operations in other streams.

Args:
dest (Pointer/object) – OUT:

Data ptr to be filled

value (int) – IN:

Constant value to be set

count (int) – IN:

Number of values to be set

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD16Async(hipDeviceptr_t dest, unsigned short value, size_t count, hipStream_t stream)
rocm.bindings.hip.hipMemsetD32(dest, value, count)#

Fills the memory area pointed to by dest with the constant integer value for specified number of times.

Args:
dest (Pointer/object) – OUT:

Data being filled

value (int) – IN:

Constant value to be set

count (int) – IN:

Number of values to be set

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD32(hipDeviceptr_t dest, int value, size_t count)
rocm.bindings.hip.hipMemsetAsync(dst, value, sizeBytes, stream)#

Fills the first sizeBytes bytes of the memory area pointed to by dev with the constant byte value value.

hipMemsetAsync() is asynchronous with respect to the host, so the call may return before the memset is complete. The operation can optionally be associated to a stream by passing a non-zero stream argument. If stream is non-zero, the operation may overlap with operations in other streams.

Args:
dst (Pointer/object) – OUT:

Pointer to device memory

value (int) – IN:

Value to set for each byte of specified memory

sizeBytes (int) – IN:

Size in bytes to set

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetAsync(void * dst, int value, size_t sizeBytes, hipStream_t stream)
rocm.bindings.hip.hipMemsetD32Async(dst, value, count, stream)#

Fills the memory area pointed to by dev with the constant integer value for specified number of times.

hipMemsetD32Async() is asynchronous with respect to the host, so the call may return before the memset is complete. The operation can optionally be associated to a stream by passing a non-zero stream argument. If stream is non-zero, the operation may overlap with operations in other streams.

Args:
dst (Pointer/object) – OUT:

Pointer to device memory

value (int) – IN:

Value to set for each byte of specified memory

count (int) – IN:

Number of values to be set

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD32Async(hipDeviceptr_t dst, int value, size_t count, hipStream_t stream)
rocm.bindings.hip.hipMemset2D(dst, pitch, value, width, height)#

Fills the memory area pointed to by dst with the constant value.

Args:
dst (Pointer/object) – OUT:

Pointer to 2D device memory

pitch (int) – IN:

Pitch size in bytes of 2D device memory, unused if height equals 1

value (int) – IN:

Constant value to set for each byte of specified memory

width (int) – IN:

Width size in bytes in 2D memory

height (int) – IN:

Height size in bytes in 2D memory

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset2D(void * dst, size_t pitch, int value, size_t width, size_t height)
rocm.bindings.hip.hipMemset2DAsync(dst, pitch, value, width, height, stream)#

Fills asynchronously the memory area pointed to by dst with the constant value.

Args:
dst (Pointer/object) – IN:

Pointer to 2D device memory

pitch (int) – IN:

Pitch size in bytes of 2D device memory, unused if height equals 1

value (int) – IN:

Value to set for each byte of specified memory

width (int) – IN:

Width size in bytes in 2D memory

height (int) – IN:

Height size in bytes in 2D memory

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset2DAsync(void * dst, size_t pitch, int value, size_t width, size_t height, hipStream_t stream)
rocm.bindings.hip.hipMemset3D(pitchedDevPtr, value, extent)#

Fills synchronously the memory area pointed to by pitchedDevPtr with the constant value.

Args:
pitchedDevPtr (hipPitchedPtr) – IN:

Pointer to pitched device memory

value (int) – IN:

Value to set for each byte of specified memory

extent (hipExtent) – IN:

Size parameters for width field in bytes in device memory

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset3D(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent)
rocm.bindings.hip.hipMemset3DAsync(pitchedDevPtr, value, extent, stream)#

Fills asynchronously the memory area pointed to by pitchedDevPtr with the constant value.

Args:
pitchedDevPtr (hipPitchedPtr) – IN:

Pointer to pitched device memory

value (int) – IN:

Value to set for each byte of specified memory

extent (hipExtent) – IN:

Size parameters for width field in bytes in device memory

stream (ihipStream_t/object) – IN:

Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset3DAsync(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent, hipStream_t stream)
rocm.bindings.hip.hipMemsetD2D8(dst, dstPitch, value, width, height)#

Fills 2D memory range of ‘width’ 8-bit values synchronously to the specified char value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each row.

Args:
dst (Pointer/object) – IN:

Pointer to device memory

dstPitch (int) – IN:

Pitch of dst device pointer

value (int) – IN:

value to set

width (int) – IN:

Width of row

height (int) – IN:

Number of rows

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD2D8(hipDeviceptr_t dst, size_t dstPitch, unsigned char value, size_t width, size_t height)
rocm.bindings.hip.hipMemsetD2D8Async(dst, dstPitch, value, width, height, stream)#

Fills 2D memory range of ‘width’ 8-bit values asynchronously to the specified char value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each row.

Args:
dst (Pointer/object) – IN:

Pointer to device memory

dstPitch (int) – IN:

Pitch of dst device pointer

value (int) – IN:

value to set

width (int) – IN:

Width of row

height (int) – IN:

Number of rows

stream (ihipStream_t/object) – IN:

Stream Identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD2D8Async(hipDeviceptr_t dst, size_t dstPitch, unsigned char value, size_t width, size_t height, hipStream_t stream)
rocm.bindings.hip.hipMemsetD2D16(dst, dstPitch, value, width, height)#

Fills 2D memory range of ‘width’ 16-bit values synchronously to the specified short value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each row.

Args:
dst (Pointer/object) – IN:

Pointer to device memory

dstPitch (int) – IN:

Pitch of dst device pointer

value (int) – IN:

value to set

width (int) – IN:

Width of row

height (int) – IN:

Number of rows

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD2D16(hipDeviceptr_t dst, size_t dstPitch, unsigned short value, size_t width, size_t height)
rocm.bindings.hip.hipMemsetD2D16Async(dst, dstPitch, value, width, height, stream)#

Fills 2D memory range of ‘width’ 16-bit values asynchronously to the specified short value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each row.

Args:
dst (Pointer/object) – IN:

Pointer to device memory

dstPitch (int) – IN:

Pitch of dst device pointer

value (int) – IN:

value to set

width (int) – IN:

Width of row

height (int) – IN:

Number of rows

stream (ihipStream_t/object) – IN:

Stream Identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD2D16Async(hipDeviceptr_t dst, size_t dstPitch, unsigned short value, size_t width, size_t height, hipStream_t stream)
rocm.bindings.hip.hipMemsetD2D32(dst, dstPitch, value, width, height)#

Fills 2D memory range of ‘width’ 32-bit values synchronously to the specified int value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each row.

Args:
dst (Pointer/object) – IN:

Pointer to device memory

dstPitch (int) – IN:

Pitch of dst device pointer

value (int) – IN:

value to set

width (int) – IN:

Width of row

height (int) – IN:

Number of rows

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD2D32(hipDeviceptr_t dst, size_t dstPitch, unsigned int value, size_t width, size_t height)
rocm.bindings.hip.hipMemsetD2D32Async(dst, dstPitch, value, width, height, stream)#

Fills 2D memory range of ‘width’ 32-bit values asynchronously to the specified int value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each row.

Args:
dst (Pointer/object) – IN:

Pointer to device memory

dstPitch (int) – IN:

Pitch of dst device pointer

value (int) – IN:

value to set

width (int) – IN:

Width of row

height (int) – IN:

Number of rows

stream (ihipStream_t/object) – IN:

Stream Identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetD2D32Async(hipDeviceptr_t dst, size_t dstPitch, unsigned int value, size_t width, size_t height, hipStream_t stream)
rocm.bindings.hip.hipMemGetInfo()#

Query memory info.

On ROCM, this function gets the actual free memory left on the current device, so supports the cases while running multi-workload (such as multiple processes, multiple threads, and multiple GPUs).

Warning:

On Windows, the free memory only accounts for memory allocated by this process and may be optimistic.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipMemGetInfo(size_t * free, size_t * total)
rocm.bindings.hip.hipMemPtrGetInfo(ptr)#

Get allocated memory size via memory pointer.

This function gets the allocated shared virtual memory size from memory pointer.

Args:
ptr (Pointer/object) – IN:

Pointer to allocated memory

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemPtrGetInfo(void * ptr, size_t * size)
rocm.bindings.hip.hipMallocArray(desc, width, height, flags)#

Allocate an array on the device.

See:

hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree

Args:
desc (hipChannelFormatDesc/object) – IN:

Requested channel format

width (int) – IN:

Requested array allocation width

height (int) – IN:

Requested array allocation height

flags (int) – IN:

Requested properties of allocated array

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMallocArray(hipArray_t * array, const hipChannelFormatDesc * desc, size_t width, size_t height, unsigned int flags)
rocm.bindings.hip.hipArrayCreate(pAllocateArray)#

Create an array memory pointer on the device.

See:

hipMallocArray, hipArrayDestroy, hipFreeArray

Args:
pAllocateArray (HIP_ARRAY_DESCRIPTOR/object) – IN:

Requested array desciptor

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipArrayCreate(hipArray_t * pHandle, const HIP_ARRAY_DESCRIPTOR * pAllocateArray)
rocm.bindings.hip.hipArrayDestroy(array)#

Destroy an array memory pointer on the device.

See:

hipArrayCreate, hipArrayDestroy, hipFreeArray

Args:
array (hipArray/object) – IN:

Pointer to the array memory

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipArrayDestroy(hipArray_t array)
rocm.bindings.hip.hipArray3DCreate(pAllocateArray)#

Create a 3D array memory pointer on the device.

See:

hipMallocArray, hipArrayDestroy, hipFreeArray

Args:
pAllocateArray (HIP_ARRAY3D_DESCRIPTOR/object) – IN:

Requested array desciptor

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipArray3DCreate(hipArray_t * array, const HIP_ARRAY3D_DESCRIPTOR * pAllocateArray)
rocm.bindings.hip.hipMalloc3D(extent)#

Create a 3D memory pointer on the device.

See:

hipMallocPitch, hipMemGetInfo, hipFree

Args:
extent (hipExtent) – IN:

Requested extent

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMalloc3D(hipPitchedPtr * pitchedDevPtr, hipExtent extent)
rocm.bindings.hip.hipFreeArray(array)#

Frees an array on the device.

See:

hipMalloc, hipMallocPitch, hipFree, hipMallocArray, hipHostMalloc, hipHostFree

Args:
array (hipArray/object) – IN:

Pointer to array to free

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipFreeArray(hipArray_t array)
rocm.bindings.hip.hipMalloc3DArray(desc, extent, flags)#

Allocate an array on the device.

See:

hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree

Args:
desc (hipChannelFormatDesc/object) – IN:

Requested channel format

extent (hipExtent) – IN:

Requested array allocation width, height and depth

flags (int) – IN:

Requested properties of allocated array

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMalloc3DArray(hipArray_t * array, const struct hipChannelFormatDesc * desc, struct hipExtent extent, unsigned int flags)
rocm.bindings.hip.hipArrayGetInfo(array)#

Gets info about the specified array

See:

hipArrayGetDescriptor, hipArray3DGetDescriptor

Args:
array (hipArray/object) – IN:
  • The HIP array to get info for

Returns:

A tuple of size 4 that contains (in that order):

C signature

hipError_t hipArrayGetInfo(hipChannelFormatDesc * desc, hipExtent * extent, unsigned int * flags, hipArray_t array)
rocm.bindings.hip.hipArrayGetDescriptor(array)#

Gets a 1D or 2D array descriptor

See:

hipArray3DCreate, hipArray3DGetDescriptor, hipArrayCreate, hipArrayDestroy, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpy3D, hipMemcpy3DAsync, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoD, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer, hipMemsetD8, hipMemsetD16, hipMemsetD32, hipArrayGetInfo

Args:
array (hipArray/object) – IN:
  • Array to get descriptor of

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipArrayGetDescriptor(HIP_ARRAY_DESCRIPTOR * pArrayDescriptor, hipArray_t array)
rocm.bindings.hip.hipArray3DGetDescriptor(array)#

Gets a 3D array descriptor

See:

hipArray3DCreate, hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpy3D, hipMemcpy3DAsync, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoD, hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc, hipMemHostGetDevicePointer, hipMemsetD8, hipMemsetD16, hipMemsetD32, hipArrayGetInfo

Args:
array (hipArray/object) – IN:
  • 3D array to get descriptor of

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipArray3DGetDescriptor(HIP_ARRAY3D_DESCRIPTOR * pArrayDescriptor, hipArray_t array)
rocm.bindings.hip.hipMemcpy2D(dst, dpitch, src, spitch, width, height, kind)#

Copies data between host and device.

hipMemcpy2D supports memory matrix copy from the pointed area src to the pointed area dst. The copy direction is defined by kind which must be one of hipMemcpyHostToDevice, hipMemcpyHostToDevice, hipMemcpyDeviceToHost hipMemcpyDeviceToDevice or hipMemcpyDefault. Device to Device copies don’t need to wait for host synchronization. The copy is executed on the default null tream. The src and dst must not overlap. dpitch and spitch are the widths in bytes in memory matrix, width cannot exceed dpitch or spitch.

For hipMemcpy2D, the copy is always performed by the current device (set by hipSetDevice). For multi-gpu or peer-to-peer configurations, it is recommended to set the current device to the device where the src data is physically located. For optimal peer-to-peer copies, the copy device must be able to access the src and dst pointers (by calling hipDeviceEnablePeerAccess with copy agent as the current device and src/dst as the peerDevice argument. if this is not done, the hipMemcpy2D will still work, but will perform the copy using a staging buffer on the host.

Warning:

Calling hipMemcpy2D with dst and src pointers that do not match the hipMemcpyKind results in undefined behavior.

See:

hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – OUT:

Destination memory address

dpitch (int) – IN:

Pitch size in bytes of destination memory

src (Pointer/object) – IN:

Source memory address

spitch (int) – IN:

Pitch size in bytes of source memory

width (int) – IN:

Width size in bytes of matrix transfer (columns)

height (int) – IN:

Height size in bytes of matrix transfer (rows)

kind (hipMemcpyKind) – IN:

Type of transfer

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2D(void * dst, size_t dpitch, const void * src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpyParam2D(pCopy)#

Copies memory for 2D arrays.

See:

hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
pCopy (hip_Memcpy2D/object) – IN:

Parameters for the memory copy

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyParam2D(const hip_Memcpy2D * pCopy)
rocm.bindings.hip.hipMemcpyParam2DAsync(pCopy, stream)#

Copies memory for 2D arrays.

See:

hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
pCopy (hip_Memcpy2D/object) – IN:

Parameters for the memory copy

stream (ihipStream_t/object) – IN:

Stream to use

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyParam2DAsync(const hip_Memcpy2D * pCopy, hipStream_t stream)
rocm.bindings.hip.hipMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream)#

Copies data between host and device asynchronously.

hipMemcpy2DAsync supports memory matrix copy from the pointed area src to the pointed area dst. The copy direction is defined by kind which must be one of hipMemcpyHostToDevice, hipMemcpyDeviceToHost, hipMemcpyDeviceToDevice or hipMemcpyDefault. dpitch and spitch are the widths in bytes for memory matrix corresponds to dst and src. width cannot exceed dpitch or spitch.

The copy is always performed by the device associated with the specified stream. The API is asynchronous with respect to the host, so the call may return before the copy is complete. The copy can optionally be excuted in a specific stream by passing a non-zero stream argument, for HostToDevice or DeviceToHost copies, the copy can overlap with operations in other streams.

For multi-gpu or peer-to-peer configurations, it is recommended to use a stream which is attached to the device where the src data is physically located.

For optimal peer-to-peer copies, the copy device must be able to access the src and dst pointers (by calling hipDeviceEnablePeerAccess) with copy agent as the current device and src/dst as the peerDevice argument. If enabling device peer access is not done, the API will still work, but will perform the copy using a staging buffer on the host.

Note:

If host or dst are not pinned, the memory copy will be performed synchronously. For best performance, use hipHostMalloc to allocate host memory that is transferred asynchronously.

See:

hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – OUT:

Pointer to destination memory address

dpitch (int) – IN:

Pitch size in bytes of destination memory

src (Pointer/object) – IN:

Pointer to source memory address

spitch (int) – IN:

Pitch size in bytes of source memory

width (int) – IN:

Width of matrix transfer (columns in bytes)

height (int) – IN:

Height of matrix transfer (rows)

kind (hipMemcpyKind) – IN:

Type of transfer

stream (ihipStream_t/object) – IN:

Stream to use

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DAsync(void * dst, size_t dpitch, const void * src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (hipArray/object) – OUT:

Destination memory address

wOffset (int) – IN:

Destination starting X offset

hOffset (int) – IN:

Destination starting Y offset

src (Pointer/object) – IN:

Source memory address

spitch (int) – IN:

Pitch of source memory

width (int) – IN:

Width of matrix transfer (columns in bytes)

height (int) – IN:

Height of matrix transfer (rows)

kind (hipMemcpyKind) – IN:

Type of transfer

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DToArray(hipArray_t dst, size_t wOffset, size_t hOffset, const void * src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (hipArray/object) – OUT:

Destination memory address

wOffset (int) – IN:

Destination starting X offset

hOffset (int) – IN:

Destination starting Y offset

src (Pointer/object) – IN:

Source memory address

spitch (int) – IN:

Pitch of source memory

width (int) – IN:

Width of matrix transfer (columns in bytes)

height (int) – IN:

Height of matrix transfer (rows)

kind (hipMemcpyKind) – IN:

Type of transfer

stream (ihipStream_t/object) – IN:

Accelerator view which the copy is being enqueued

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DToArrayAsync(hipArray_t dst, size_t wOffset, size_t hOffset, const void * src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (hipArray/object) – OUT:

Destination memory address

wOffsetDst (int) – IN:

Destination starting X offset

hOffsetDst (int) – IN:

Destination starting Y offset

src (hipArray/object) – IN:

Source memory address

wOffsetSrc (int) – IN:

Source starting X offset

hOffsetSrc (int) – IN:

Source starting Y offset (columns in bytes)

width (int) – IN:

Width of matrix transfer (columns in bytes)

height (int) – IN:

Height of matrix transfer (rows)

kind (hipMemcpyKind) – IN:

Type of transfer

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DArrayToArray(hipArray_t dst, size_t wOffsetDst, size_t hOffsetDst, hipArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpyToArray(dst, wOffset, hOffset, src, count, kind)#

Copies data between host and device [Deprecated]

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Warning:

This API is deprecated.

Args:
dst (hipArray/object) – OUT:

Destination memory address

wOffset (int) – IN:

Destination starting X offset

hOffset (int) – IN:

Destination starting Y offset

src (Pointer/object) – IN:

Source memory address

count (int) – IN:

size in bytes to copy

kind (hipMemcpyKind) – IN:

Type of transfer

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyToArray(hipArray_t dst, size_t wOffset, size_t hOffset, const void * src, size_t count, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpyFromArray(dst, srcArray, wOffset, hOffset, count, kind)#

Copies data between host and device [Deprecated]

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Warning:

This API is deprecated.

Args:
dst (Pointer/object) – OUT:

Destination memory address

srcArray (hipArray/object) – IN:

Source memory address

wOffset (int) – IN:

Source starting X offset

hOffset (int) – IN:

Source starting Y offset

count (int) – IN:

Size in bytes to copy

kind (hipMemcpyKind) – IN:

Type of transfer

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyFromArray(void * dst, hipArray_const_t srcArray, size_t wOffset, size_t hOffset, size_t count, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – OUT:

Destination memory address

dpitch (int) – IN:

Pitch of destination memory

src (hipArray/object) – IN:

Source memory address

wOffset (int) – IN:

Source starting X offset

hOffset (int) – IN:

Source starting Y offset

width (int) – IN:

Width of matrix transfer (columns in bytes)

height (int) – IN:

Height of matrix transfer (rows)

kind (hipMemcpyKind) – IN:

Type of transfer

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DFromArray(void * dst, size_t dpitch, hipArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream)#

Copies data between host and device asynchronously.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – OUT:

Destination memory address

dpitch (int) – IN:

Pitch of destination memory

src (hipArray/object) – IN:

Source memory address

wOffset (int) – IN:

Source starting X offset

hOffset (int) – IN:

Source starting Y offset

width (int) – IN:

Width of matrix transfer (columns in bytes)

height (int) – IN:

Height of matrix transfer (rows)

kind (hipMemcpyKind) – IN:

Type of transfer

stream (ihipStream_t/object) – IN:

Accelerator view which the copy is being enqueued

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DFromArrayAsync(void * dst, size_t dpitch, hipArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpyAtoH(dst, srcArray, srcOffset, count)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – OUT:

Destination memory address

srcArray (hipArray/object) – IN:

Source array

srcOffset (int) – IN:

Offset in bytes of source array

count (int) – IN:

Size of memory copy in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyAtoH(void * dst, hipArray_t srcArray, size_t srcOffset, size_t count)
rocm.bindings.hip.hipMemcpyHtoA(dstArray, dstOffset, srcHost, count)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dstArray (hipArray/object) – OUT:

Destination memory address

dstOffset (int) – IN:

Offset in bytes of destination array

srcHost (Pointer/object) – IN:

Source host pointer

count (int) – IN:

Size of memory copy in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyHtoA(hipArray_t dstArray, size_t dstOffset, const void * srcHost, size_t count)
rocm.bindings.hip.hipMemcpy3D(p)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
p (hipMemcpy3DParms/object) – IN:

3D memory copy parameters

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy3D(const struct hipMemcpy3DParms * p)
rocm.bindings.hip.hipMemcpy3DAsync(p, stream)#

Copies data between host and device asynchronously.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
p (hipMemcpy3DParms/object) – IN:

3D memory copy parameters

stream (ihipStream_t/object) – IN:

Stream to use

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy3DAsync(const struct hipMemcpy3DParms * p, hipStream_t stream)
rocm.bindings.hip.hipDrvMemcpy3D(pCopy)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
pCopy (HIP_MEMCPY3D/object) – IN:

3D memory copy parameters

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDrvMemcpy3D(const HIP_MEMCPY3D * pCopy)
rocm.bindings.hip.hipDrvMemcpy3DAsync(pCopy, stream)#

Copies data between host and device asynchronously.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
pCopy (HIP_MEMCPY3D/object) – IN:

3D memory copy parameters

stream (ihipStream_t/object) – IN:

Stream to use

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDrvMemcpy3DAsync(const HIP_MEMCPY3D * pCopy, hipStream_t stream)
rocm.bindings.hip.hipMemGetAddressRange(dptr)#

Get information on memory allocations.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Args:
dptr (Pointer/object) – IN:
  • Device Pointer

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipMemGetAddressRange(hipDeviceptr_t * pbase, size_t * psize, hipDeviceptr_t dptr)
rocm.bindings.hip.hipMemcpyBatchAsync(srcs, count, attrs, numAttrs, stream)#

Perform Batch of 1D copies

Args:
srcs (ListOfPointer/object) – IN:
  • Array of source pointers.

count (int) – IN:
  • Size of dsts, srcs and sizes arrays

attrs (hipMemcpyAttributes/object) – IN:
  • Array of memcpy attributes (not supported)

numAttrs (int) – IN:
  • Size of attrs and attrsIdxs arrays (not supported)

stream (ihipStream_t/object) – IN:
  • stream used to enqueue operations in.

Returns:

A tuple of size 5 that contains (in that order):

C signature

hipError_t hipMemcpyBatchAsync(void ** dsts, void ** srcs, size_t * sizes, size_t count, hipMemcpyAttributes * attrs, size_t * attrsIdxs, size_t numAttrs, size_t * failIdx, hipStream_t stream)
rocm.bindings.hip.hipMemcpy3DBatchAsync(numOps, opList, flags, stream)#

Perform Batch of 3D copies

Args:
numOps (int) – IN:
  • Total number of memcpy operations.

opList (hipMemcpy3DBatchOp/object) – IN:
  • Array of size numOps containing the actual memcpy operations.

flags (int) – IN:
  • Flags for future use, must be zero now.

stream (ihipStream_t/object) – IN:
  • The stream to enqueue the operations in.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemcpy3DBatchAsync(size_t numOps, struct hipMemcpy3DBatchOp * opList, size_t * failIdx, unsigned long long flags, hipStream_t stream)
rocm.bindings.hip.hipMemcpy3DPeer(p)#

Performs 3D memory copies between devices This API is asynchronous with respect to host

Args:
p (hipMemcpy3DPeerParms/object) – IN:
  • Parameters for memory copy

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy3DPeer(hipMemcpy3DPeerParms * p)
rocm.bindings.hip.hipMemcpy3DPeerAsync(p, stream)#

Performs 3D memory copies between devices asynchronously

Args:
p (hipMemcpy3DPeerParms/object) – IN:
  • Parameters for memory copy

stream (ihipStream_t/object) – IN:
  • Stream to enqueue operation in.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy3DPeerAsync(hipMemcpy3DPeerParms * p, hipStream_t stream)
rocm.bindings.hip.hipMipmappedArrayGetMemoryRequirements(mipmap, device)#

Returns the memory requirements of a HIP mipmapped array.

Returns the memory requirements of a HIP mipmapped array in memoryRequirements.

The returned value in hipArrayMemoryRequirements::size represents the total size of the HIP

mipmapped array. The returned value in hipArrayMemoryRequirements::alignment represents the alignment necessary for mapping the HIP mipmapped array.

Args:
mipmap (hipMipmappedArray/object) – IN:

HIP mipmapped array to get the memory requirements of

device (int) – IN:

Device to get the memory requirements for

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMipmappedArrayGetMemoryRequirements(hipArrayMemoryRequirements * memoryRequirements, hipMipmappedArray_t mipmap, hipDevice_t device)
rocm.bindings.hip.hipDeviceCanAccessPeer(deviceId, peerDeviceId)#

Determines if a device can access a peer device’s memory.

This section describes the PeerToPeer device memory access functions of HIP runtime API.

The value of canAccessPeer,

Returns “1” if the specified deviceId is capable of directly accessing memory physically located on peerDeviceId,

Returns “0” if the specified deviceId is not capable of directly accessing memory physically located on peerDeviceId.

Returns “0” if deviceId == peerDeviceId, both are valid devices, however, a device is not a peer of itself.

Returns hipErrorInvalidDevice if deviceId or peerDeviceId are not valid devices

Args:
deviceId (int) – IN:
  • The device accessing the peer device memory.

peerDeviceId (int) – IN:
  • Peer device where memory is physically located

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceCanAccessPeer(int * canAccessPeer, int deviceId, int peerDeviceId)
rocm.bindings.hip.hipDeviceEnablePeerAccess(peerDeviceId, flags)#

Enables direct access to memory allocations on a peer device.

When this API is successful, all memory allocations on peer device will be mapped into the address space of the current device. In addition, any future memory allocation on the peer device will remain accessible from the current device, until the access is disabled using hipDeviceDisablePeerAccess or device is reset using hipDeviceReset.

Args:
peerDeviceId (int) – IN:
  • Peer device to enable direct access to from the current device

flags (int) – IN:
  • Reserved for future use, must be zero

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceEnablePeerAccess(int peerDeviceId, unsigned int flags)
rocm.bindings.hip.hipDeviceDisablePeerAccess(peerDeviceId)#

Disables direct access to memory allocations on a peer device.

If direct access to memory allocations on peer device has not been enabled yet from the current device, it returns hipErrorPeerAccessNotEnabled.

Args:
peerDeviceId (int) – IN:

Peer device to disable direct access to

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceDisablePeerAccess(int peerDeviceId)
rocm.bindings.hip.hipMemcpyPeer(dst, dstDeviceId, src, srcDeviceId, sizeBytes)#

Copies memory between two peer accessible devices.

Args:
dst (Pointer/object) – OUT:
  • Destination device pointer

dstDeviceId (int) – IN:
  • Destination device

src (Pointer/object) – IN:
  • Source device pointer

srcDeviceId (int) – IN:
  • Source device

sizeBytes (int) – IN:
  • Size of memory copy in bytes

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyPeer(void * dst, int dstDeviceId, const void * src, int srcDeviceId, size_t sizeBytes)
rocm.bindings.hip.hipMemcpyPeerAsync(dst, dstDeviceId, src, srcDevice, sizeBytes, stream)#

Copies memory between two peer accessible devices asynchronously.

Args:
dst (Pointer/object) – OUT:
  • Destination device pointer

dstDeviceId (int) – IN:
  • Destination device

src (Pointer/object) – IN:
  • Source device pointer

srcDevice (int) – IN:
  • Source device

sizeBytes (int) – IN:
  • Size of memory copy in bytes

stream (ihipStream_t/object) – IN:
  • Stream identifier

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyPeerAsync(void * dst, int dstDeviceId, const void * src, int srcDevice, size_t sizeBytes, hipStream_t stream)
rocm.bindings.hip.hipDeviceGetDevResource(device, type)#

Gets device resource of a given type for a device.

  • This section describes execution context management functions of HIP runtime API.

Args:
device (int) – IN:
  • Device to get resource for

type (hipDevResourceType) – IN:
  • Type of resource to retrieve

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetDevResource(hipDevice_t device, hipDevResource * resource, hipDevResourceType type)
rocm.bindings.hip.hipDevSmResourceSplitByCount(input, remainder, flags, minCount)#

Splits SM resources into groups containing the specified number of SMs.

Args:
input (hipDevResource_st/object) – IN:
  • Valid input SM resource to be split

remainder (hipDevResource_st/object) – IN:
  • If the input resource cannot be evenly split among nbGroups,

the remaining resourced are returned through this parameter.

flags (int) – IN:
  • Flags specifying partition usage and constraints to apply when splitting

the inout resource.

minCount (int) – IN:
  • Specifies the minimum number of SMs required

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipDevSmResourceSplitByCount(hipDevResource * result, unsigned int * nbGroups, const hipDevResource * input, hipDevResource * remainder, unsigned int flags, unsigned int minCount)
rocm.bindings.hip.hipDevSmResourceSplit(nbGroups, input, remainder, flags, groupParams)#

Splits SM resources into structured groups.

Args:
nbGroups (int) – IN:
  • The poiter specifying the number of groups

input (hipDevResource_st/object) – IN:
  • Valid input SM resource to be split

remainder (hipDevResource_st/object) – IN:
  • If the input resource cannot be evenly split among nbGroups,

the remaining resourced are returned through this parameter.

flags (int) – IN:
  • Flags specifying partition usage and constraints to apply when splitting

the inout resource.

groupParams (hipDevSmResourceGroupParams_st/object) – IN:
  • Describes how the SM resources should be partitioned and assigned

to the corresponding result entries.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDevSmResourceSplit(hipDevResource * result, unsigned int nbGroups, const hipDevResource * input, hipDevResource * remainder, unsigned int flags, hipDevSmResourceGroupParams * groupParams)
rocm.bindings.hip.hipDevResourceGenerateDesc(resources, nbResources)#

Generates a resource descriptor from one or more device resources.

Args:
resources (hipDevResource_st/object) – IN:
  • Pointer of device resources to be included in the descriptor

nbResources (int) – IN:
  • Number of resources specified

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDevResourceGenerateDesc(hipDevResourceDesc_t * phDesc, hipDevResource * resources, unsigned int nbResources)
rocm.bindings.hip.hipGreenCtxCreate(desc, device, flags)#

Creates a green context from a resource descriptor.

Args:
desc (ihipDevResourceDesc_t/object) – IN:
  • Resource descriptor generated via hipDevResourceGenerateDesc that specifies

the set of resources to be used

device (int) – IN:
  • Device on which the green context is created

flags (int) – IN:
  • Flags controlling green context creation

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGreenCtxCreate(hipExecutionCtx_t * ctx, hipDevResourceDesc_t desc, int device, unsigned int flags)
rocm.bindings.hip.hipExecutionCtxDestroy(ctx)#

Destroys an execution context.

Args:
ctx (ihipExecutionCtx_t/object) – IN:
  • Execution context to destroy

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipExecutionCtxDestroy(hipExecutionCtx_t ctx)
rocm.bindings.hip.hipDeviceGetExecutionCtx(device)#

Returns the default execution context for a device.

Args:
device (int) – IN:
  • The device on which to receive the execution context

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDeviceGetExecutionCtx(hipExecutionCtx_t * ctx, int device)
rocm.bindings.hip.hipExecutionCtxStreamCreate(greenctx, flags, priority)#

Creates a stream on an execution context with specified flags and priority

Args:
greenctx (ihipExecutionCtx_t/object) – IN:
  • Execution context used to create and initialize the stream

flags (int) – IN:
  • Flags for stream creation

priority (int) – IN:
  • Stream priority

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipExecutionCtxStreamCreate(hipStream_t * stream, hipExecutionCtx_t greenctx, unsigned int flags, int priority)
rocm.bindings.hip.hipExecutionCtxGetDevResource(ctx, type)#

Returns the device resource of a given type for an execution context

Args:
ctx (ihipExecutionCtx_t/object) – IN:
  • Execution context to get resource for

type (hipDevResourceType) – IN:
  • Type of device resource

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipExecutionCtxGetDevResource(hipExecutionCtx_t ctx, hipDevResource * resource, hipDevResourceType type)
rocm.bindings.hip.hipExecutionCtxGetDevice(ctx)#

Returns the device associated with an execution context

Args:
ctx (ihipExecutionCtx_t/object) – IN:
  • Execution context to obtain the device

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipExecutionCtxGetDevice(int * device, hipExecutionCtx_t ctx)
rocm.bindings.hip.hipExecutionCtxGetId(ctx)#

Returns a unique identifier for an execution context

Args:
ctx (ihipExecutionCtx_t/object) – IN:
  • Execution context to obtain the ID

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipExecutionCtxGetId(hipExecutionCtx_t ctx, unsigned long long * ctxId)
rocm.bindings.hip.hipStreamGetDevResource(hStream, type)#

Returns the device resource of a given type for a stream

Args:
hStream (ihipStream_t/object) – IN:
  • Stream to get resource for

type (hipDevResourceType) – IN:
  • Type of resource

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamGetDevResource(hipStream_t hStream, hipDevResource * resource, hipDevResourceType type)
rocm.bindings.hip.hipExecutionCtxRecordEvent(ctx)#

Records an event on an execution context

Args:
ctx (ihipExecutionCtx_t/object) – IN:
  • Execution context to record event for

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipExecutionCtxRecordEvent(hipExecutionCtx_t ctx, hipEvent_t event)
rocm.bindings.hip.hipExecutionCtxSynchronize(ctx)#

Blocks until all work on an execution context has completed

Args:
ctx (ihipExecutionCtx_t/object) – IN:
  • Execution context to synchronize

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipExecutionCtxSynchronize(hipExecutionCtx_t ctx)
rocm.bindings.hip.hipExecutionCtxWaitEvent(ctx, event)#

Makes an execution context wait on an event

Args:
ctx (ihipExecutionCtx_t/object) – IN:
  • Execution context to wait for

event (ihipEvent_t/object) – IN:
  • Event to wait on

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipExecutionCtxWaitEvent(hipExecutionCtx_t ctx, hipEvent_t event)
rocm.bindings.hip.hipCtxCreate(flags, device)#

Create a context and set it as current/default context

See:

hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Args:
flags (int) – IN:

Context creation flags

device (int) – IN:

device handle

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCtxCreate(hipCtx_t * ctx, unsigned int flags, hipDevice_t device)
rocm.bindings.hip.hipCtxDestroy(ctx)#

Destroy a HIP context [Deprecated]

See:

hipCtxCreate, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,:py:obj:hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Args:
ctx (ihipCtx_t/object) – IN:

Context to destroy

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipCtxDestroy(hipCtx_t ctx)
rocm.bindings.hip.hipCtxPopCurrent()#

Pop the current/default context and return the popped context [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxSetCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCtxPopCurrent(hipCtx_t * ctx)
rocm.bindings.hip.hipCtxPushCurrent(ctx)#

Push the context to be set as current/ default context [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Args:
ctx (ihipCtx_t/object) – IN:

The current context to push

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipCtxPushCurrent(hipCtx_t ctx)
rocm.bindings.hip.hipCtxSetCurrent(ctx)#

Set the passed context as current/default [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Args:
ctx (ihipCtx_t/object) – IN:

The context to set as current

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipCtxSetCurrent(hipCtx_t ctx)
rocm.bindings.hip.hipCtxGetCurrent()#

Get the handle of the current/ default context [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCtxGetCurrent(hipCtx_t * ctx)
rocm.bindings.hip.hipCtxGetDevice()#

Get the handle of the device associated with current/default context [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCtxGetDevice(hipDevice_t * device)
rocm.bindings.hip.hipCtxGetApiVersion(ctx)#

Returns the approximate HIP api version.

Warning:

The HIP feature set does not correspond to an exact CUDA SDK api revision. This function always set *apiVersion to 4 as an approximation though HIP supports some features which were introduced in later CUDA SDK revisions. HIP apps code should not rely on the api revision number here and should use arch feature flags to test device capabilities or conditional compilation.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Args:
ctx (ihipCtx_t/object) – IN:

Context to check [Deprecated]

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCtxGetApiVersion(hipCtx_t ctx, unsigned int * apiVersion)
rocm.bindings.hip.hipCtxGetCacheConfig()#

Get Cache configuration for a specific function [Deprecated]

Warning:

AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCtxGetCacheConfig(hipFuncCache_t * cacheConfig)
rocm.bindings.hip.hipCtxSetCacheConfig(cacheConfig)#

Set L1/Shared cache partition [Deprecated]

Warning:

AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Args:
cacheConfig (hipFuncCache_t) – IN:

Cache configuration to set

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig)
rocm.bindings.hip.hipCtxSetSharedMemConfig(config)#

Set Shared memory bank configuration [Deprecated]

Warning:

AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Args:
config (hipSharedMemConfig) – IN:

Shared memory configuration to set

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config)
rocm.bindings.hip.hipCtxGetSharedMemConfig()#

Get Shared memory bank configuration [Deprecated]

Warning:

AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig * pConfig)
rocm.bindings.hip.hipCtxSynchronize()#

Blocks until the default context has completed all preceding requested tasks [Deprecated]

Warning:

This function waits for all streams on the default context to complete execution, and then returns.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipCtxSynchronize()
rocm.bindings.hip.hipCtxGetFlags()#

Return flags used for creating default context [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCtxGetFlags(unsigned int * flags)
rocm.bindings.hip.hipCtxEnablePeerAccess(peerCtx, flags)#

Enables direct access to memory allocations in a peer context [Deprecated]

Memory which already allocated on peer device will be mapped into the address space of the current device. In addition, all future memory allocations on peerDeviceId will be mapped into the address space of the current device when the memory is allocated. The peer memory remains accessible from the current device until a call to hipDeviceDisablePeerAccess or hipDeviceReset.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

PeerToPeer support is experimental.

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Args:
peerCtx (ihipCtx_t/object) – IN:

Peer context

flags (int) – IN:

flags, need to set as 0

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, unsigned int flags)
rocm.bindings.hip.hipCtxDisablePeerAccess(peerCtx)#

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 [Deprecated]

Returns hipErrorPeerAccessNotEnabled if direct access to memory on peerDevice has not yet been enabled from the current device.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

PeerToPeer support is experimental.

Warning:

This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the NVIDIA platform.

Args:
peerCtx (ihipCtx_t/object) – IN:

Peer context to be disabled

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx)
rocm.bindings.hip.hipDevicePrimaryCtxGetState(dev)#

Get the state of the primary context [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent driver API on the NVIDIA platform.

Args:
dev (int) – IN:

Device to get primary context flags for

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipDevicePrimaryCtxGetState(hipDevice_t dev, unsigned int * flags, int * active)
rocm.bindings.hip.hipDevicePrimaryCtxRelease(dev)#

Release the primary context on the GPU.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This function return hipSuccess though doesn’t release the primaryCtx by design on HIP/HIP-CLANG path.

Warning:

This API is deprecated on the AMD platform, only for equivalent driver API on the NVIDIA platform.

Args:
dev (int) – IN:

Device which primary context is released [Deprecated]

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDevicePrimaryCtxRelease(hipDevice_t dev)
rocm.bindings.hip.hipDevicePrimaryCtxRetain(dev)#

Retain the primary context on the GPU [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent driver API on the NVIDIA platform.

Args:
dev (int) – IN:

Device which primary context is released

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDevicePrimaryCtxRetain(hipCtx_t * pctx, hipDevice_t dev)
rocm.bindings.hip.hipDevicePrimaryCtxReset(dev)#

Resets the primary context on the GPU [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent driver API on the NVIDIA platform.

Args:
dev (int) – IN:

Device which primary context is reset

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDevicePrimaryCtxReset(hipDevice_t dev)
rocm.bindings.hip.hipDevicePrimaryCtxSetFlags(dev, flags)#

Set flags for the primary context [Deprecated]

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This API is deprecated on the AMD platform, only for equivalent driver API on the NVIDIA platform.

Args:
dev (int) – IN:

Device for which the primary context flags are set

flags (int) – IN:

New flags for the device

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags)
rocm.bindings.hip.hipModuleLoadFatBinary(fatbin)#

Loads fatbin object

This section describes the module management functions of HIP runtime API.

Args:
fatbin (Pointer/object) – IN:

fatbin to be loaded as a module

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipModuleLoadFatBinary(hipModule_t * module, const void * fatbin)
rocm.bindings.hip.hipModuleLoad(fname)#

Loads code object from file into a module the currrent context.

Warning:

File/memory resources allocated in this function are released only in hipModuleUnload.

Args:
fname (CStr/object) – IN:

Filename of code object to load

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipModuleLoad(hipModule_t * module, const char * fname)
rocm.bindings.hip.hipModuleUnload(module)#

Frees the module

The module is freed, and the code objects associated with it are destroyed.

Args:
module (ihipModule_t/object) – IN:

Module to free

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipModuleUnload(hipModule_t module)
rocm.bindings.hip.hipModuleGetFunction(module, kname)#

Function with kname will be extracted if present in module

Args:
module (ihipModule_t/object) – IN:

Module to get function from

kname (CStr/object) – IN:

Pointer to the name of function

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipModuleGetFunction(hipFunction_t * function, hipModule_t module, const char * kname)
rocm.bindings.hip.hipModuleGetFunctionCount(mod)#

Returns the number of functions within a module.

Args:
mod (ihipModule_t/object) – IN:

Module to get function count from

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipModuleGetFunctionCount(unsigned int * count, hipModule_t mod)
rocm.bindings.hip.hipKernelGetAttribute(attrib, kernel, dev)#

Returns information about a kernel.

Returns in *pi the integer value of the attribute attrib for the kernel kernel for the requested device dev. The supported attributes are:

  • HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK The maximum number of threads per block. This number depends on both the kernel and the requested device.

  • HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES The size in bytes of statically-allocated shared memory per block required by this kernel. This does not include dynamically-allocated shared memory requested by the user at runtime.

  • HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES The size in bytes of user-allocated constant memory required by this kernel.

  • HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES The size in bytes of local memory used by each thread of this kernel.

  • HIP_FUNC_ATTRIBUTE_NUM_REGS The number of registers used by each thread of this kernel.

  • HIP_FUNC_ATTRIBUTE_PTX_VERSION The PTX virtual architecture version for which the kernel was compiled. This value is the major PTX version * 10 + the minor PTX version, so a PTX version 1.3 function would return the value 13.

  • HIP_FUNC_ATTRIBUTE_BINARY_VERSION The binary architecture version for which the kernel was compiled. This value is the major binary version * 10 + the minor binary version, so a binary version 1.3 function would return the value 13.

  • HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES The maximum size in bytes of dynamically-allocated shared memory.

  • HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA The attribute to indicate whether the kernel has been compiled with user specified option “-Xptxas –dlcm=ca” set.

  • HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT Preferred shared memory-L1 cache split ratio in percent of total shared memory.

See:

hipLibraryLoadData, hipLibraryLoadFromFile, hipLibraryUnload, hipKernelSetAttribute, hipLibraryGetKernel, hipLaunchKernel, hipKernelGetFunction, hipLibraryGetModule, hipModuleGetFunction, hipFuncGetAttribute

Args:
attrib (hipFunction_attribute) – IN:

Attribute requested

kernel (ihipKernel_t/object) – IN:

Kernel to query attribute of

dev (int) – IN:

Device to query attribute of

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipKernelGetAttribute(int * pi, hipFunction_attribute attrib, hipKernel_t kernel, hipDevice_t dev)
rocm.bindings.hip.hipLibraryLoadData(code, jitOptionsValues, numJitOptions, libraryOptionValues, numLibraryOptions)#

Load hip Library from inmemory object

Args:
code (Pointer/object) – IN:

In memory object

jitOptionsValues (ListOfPointer/object) – IN:

JIT options values, CUDA only

numJitOptions (int) – IN:

Number of JIT options

libraryOptionValues (ListOfPointer/object) – IN:

Library options values

numLibraryOptions (int) – IN:

Number of library options

Returns:

A tuple of size 4 that contains (in that order):

C signature

hipError_t hipLibraryLoadData(hipLibrary_t * library, const void * code, hipJitOption * jitOptions, void ** jitOptionsValues, unsigned int numJitOptions, hipLibraryOption * libraryOptions, void ** libraryOptionValues, unsigned int numLibraryOptions)
rocm.bindings.hip.hipLibraryLoadFromFile(fileName, jitOptionsValues, numJitOptions, libraryOptionValues, numLibraryOptions)#

Load hip Library from file

Args:
fileName (CStr/object) – IN:

file which contains code object

jitOptionsValues (ListOfPointer/object) – IN:

JIT options values, CUDA only

numJitOptions (int) – IN:

Number of JIT options

libraryOptionValues (ListOfPointer/object) – IN:

Library options values

numLibraryOptions (int) – IN:

Number of library options

Returns:

A tuple of size 4 that contains (in that order):

C signature

hipError_t hipLibraryLoadFromFile(hipLibrary_t * library, const char * fileName, hipJitOption * jitOptions, void ** jitOptionsValues, unsigned int numJitOptions, hipLibraryOption * libraryOptions, void ** libraryOptionValues, unsigned int numLibraryOptions)
rocm.bindings.hip.hipLibraryUnload(library)#

Unload HIP Library

Args:
library (ihipLibrary_t/object) – IN:

Input created hip library

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipLibraryUnload(hipLibrary_t library)
rocm.bindings.hip.hipLibraryGetKernel(library, name)#

Get Kernel object from library

Args:
library (ihipLibrary_t/object) – IN:

Input hip library

name (CStr/object) – IN:

kernel name to be searched for

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipLibraryGetKernel(hipKernel_t * pKernel, hipLibrary_t library, const char * name)
rocm.bindings.hip.hipLibraryGetKernelCount(library)#

Get Kernel count in library

Args:
library (ihipLibrary_t/object) – IN:

Input created hip library

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipLibraryGetKernelCount(unsigned int * count, hipLibrary_t library)
rocm.bindings.hip.hipLibraryGetGlobal(library, name)#

Get device pointer to a __device__ global variable defined in a library.

Returns the device pointer and size of the named global symbol within the library’s code object. Mirrors CUDA’s cuLibraryGetGlobal / cudaLibraryGetGlobal. Either dptr or bytes (but not both) may be NULL.

Args:
library (ihipLibrary_t/object) – IN:

Input hip library handle.

name (CStr/object) – IN:

Name of the global symbol to look up.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipLibraryGetGlobal(void ** dptr, size_t * bytes, hipLibrary_t library, const char * name)
rocm.bindings.hip.hipLibraryGetManaged(library, name)#

Get host pointer to a __managed__ variable defined in a library.

Returns the host-accessible managed pointer and size of the named managed symbol within the library’s code object. Mirrors CUDA’s cuLibraryGetManaged / cudaLibraryGetManaged. Either dptr or bytes (but not both) may be NULL. Returns hipErrorNotFound if the symbol does not exist or is not a __managed__ variable.

Args:
library (ihipLibrary_t/object) – IN:

Input hip library handle.

name (CStr/object) – IN:

Name of the managed symbol to look up.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipLibraryGetManaged(void ** dptr, size_t * bytes, hipLibrary_t library, const char * name)
rocm.bindings.hip.hipLibraryEnumerateKernels(numKernels, library)#

Retrieve kernel handles within a library

Args:
numKernels (int) – IN:

Maximum number of kernel handles to return to buffer @oaram [in] library Library handle to query from

library (ihipLibrary_t/object):

(undocumented)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipLibraryEnumerateKernels(hipKernel_t * kernels, unsigned int numKernels, hipLibrary_t library)
rocm.bindings.hip.hipKernelGetLibrary(kernel)#

Returns a Library Handle

Args:
kernel (ihipKernel_t/object) – IN:

Kernel to retrieve library Handle

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipKernelGetLibrary(hipLibrary_t * library, hipKernel_t kernel)
rocm.bindings.hip.hipKernelGetName(kernel)#

Returns a Kernel Name

Args:
kernel (ihipKernel_t/object) – IN:

Kernel handle to retrieve name

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipKernelGetName(const char ** name, hipKernel_t kernel)
rocm.bindings.hip.hipKernelGetParamInfo(kernel, paramIndex)#

Returns the offset and size of a kernel parameter

Args:
kernel (ihipKernel_t/object) – IN:

Kernel handle to retrieve parameter info

paramIndex (int) – IN:

Index of the parameter

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipKernelGetParamInfo(hipKernel_t kernel, size_t paramIndex, size_t * paramOffset, size_t * paramSize)
rocm.bindings.hip.hipFuncGetAttributes(func)#

Find out attributes for a given function.

Args:
func (Pointer/object) – IN:

Pointer to the function handle

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipFuncGetAttributes(struct hipFuncAttributes * attr, const void * func)
rocm.bindings.hip.hipFuncGetAttribute(attrib, hfunc)#

Find out a specific attribute for a given function.

Args:
attrib (hipFunction_attribute) – IN:

Attributes of the given funtion

hfunc (ihipModuleSymbol_t/object) – IN:

Function to get attributes from

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipFuncGetAttribute(int * value, hipFunction_attribute attrib, hipFunction_t hfunc)
rocm.bindings.hip.hipGetFuncBySymbol(symbolPtr)#

Gets pointer to device entry function that matches entry function symbolPtr.

Args:
symbolPtr (Pointer/object) – IN:

Pointer to device entry function to search for

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetFuncBySymbol(hipFunction_t * functionPtr, const void * symbolPtr)
rocm.bindings.hip.hipGetDriverEntryPoint(symbol, flags)#

Gets function pointer of a requested HIP API

Args:
symbol (CStr/object) – IN:

The API base name

flags (int) – IN:

Flags for the search

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipGetDriverEntryPoint(const char * symbol, void ** funcPtr, unsigned long long flags, hipDriverEntryPointQueryResult * driverStatus)
rocm.bindings.hip.hipModuleGetTexRef(hmod, name)#

returns the handle of the texture reference with the name from the module.

Args:
hmod (ihipModule_t/object) – IN:

Module

name (CStr/object) – IN:

Pointer of name of texture reference

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipModuleGetTexRef(textureReference ** texRef, hipModule_t hmod, const char * name)
rocm.bindings.hip.hipModuleLoadData(image)#

builds module from code object data which resides in host memory.

The “image” is a pointer to the location of code object data. This data can be either a single code object or a fat binary (fatbin), which serves as the entry point for loading and launching device-specific kernel executions.

By default, the following command generates a fatbin:

“amdclang++ -O3 -c –offload-device-only –offload-arch=<GPU_ARCH> <input_file> -o <output_file>”

For more details, refer to: <a href= “https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/kernel_language_cpp_support.html:py:obj:kernel-compilation”> Kernel Compilation</a> in the HIP kernel language C++ support, or <a href=”https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_rtc.html”>HIP runtime compilation (HIP RTC)</a>.

Args:
image (Pointer/object) – IN:

The pointer to the location of data

Returns:

A tuple of size 2 that contains (in that order):

  • hipError_t: hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized

  • ihipModule_t:

    Retuned module

C signature

hipError_t hipModuleLoadData(hipModule_t * module, const void * image)
rocm.bindings.hip.hipModuleLoadDataEx(image, numOptions, optionValues)#

builds module from code object which resides in host memory. Image is pointer to that location. Options are not used. hipModuleLoadData is called.

Args:
image (Pointer/object) – IN:

The pointer to the location of data

numOptions (int) – IN:

Number of options

optionValues (ListOfPointer/object) – IN:

Option values for JIT

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipModuleLoadDataEx(hipModule_t * module, const void * image, unsigned int numOptions, hipJitOption * options, void ** optionValues)
rocm.bindings.hip.hipLinkAddData(state, type, data, size, name, numOptions, optionValues)#

Adds bitcode data to be linked with options.

If adding the file fails, it will

See:

hipError_t

Args:
state (ihipLinkState_t/object) – IN:

hip link state

type (hipJitInputType) – IN:

Type of the input data or bitcode

data (Pointer/object) – IN:

Input data which is null terminated

size (int) – IN:

Size of the input data

name (CStr/object) – IN:

Optional name for this input

numOptions (int) – IN:

Size of the options

optionValues (ListOfPointer/object) – IN:

Array of option values cast to void*

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipLinkAddData(hipLinkState_t state, hipJitInputType type, void * data, size_t size, const char * name, unsigned int numOptions, hipJitOption * options, void ** optionValues)
rocm.bindings.hip.hipLinkAddFile(state, type, path, numOptions, optionValues)#

Adds a file with bitcode to be linked with options.

If adding the file fails, it will

See:

hipError_t

Args:
state (ihipLinkState_t/object) – IN:

hip link state

type (hipJitInputType) – IN:

Type of the input data or bitcode

path (CStr/object) – IN:

Path to the input file where bitcode is present

numOptions (int) – IN:

Size of the options

optionValues (ListOfPointer/object) – IN:

Array of option values cast to void*

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipLinkAddFile(hipLinkState_t state, hipJitInputType type, const char * path, unsigned int numOptions, hipJitOption * options, void ** optionValues)
rocm.bindings.hip.hipLinkComplete(state)#

Completes the linking of the given program.

If adding the data fails, it will

See:

hipError_t

Args:
state (ihipLinkState_t/object) – IN:

hip link state

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipLinkComplete(hipLinkState_t state, void ** hipBinOut, size_t * sizeOut)
rocm.bindings.hip.hipLinkCreate(numOptions, optionValues)#

Creates a linker instance with options.

See:

hipSuccess

Args:
numOptions (int) – IN:

Number of options

optionValues (ListOfPointer/object) – IN:

Array of option values cast to void*

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipLinkCreate(unsigned int numOptions, hipJitOption * options, void ** optionValues, hipLinkState_t * stateOut)
rocm.bindings.hip.hipLinkDestroy(state)#

Deletes the linker instance.

See:

hipSuccess

Args:
state (ihipLinkState_t/object) – IN:

link state instance

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipLinkDestroy(hipLinkState_t state)
rocm.bindings.hip.hipModuleLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, stream, kernelParams, extra)#

launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelparams or extra

Please note, HIP does not support kernel launch with total work items defined in dimension with size gridDim x blockDim >= 2^32. So gridDim.x * blockDim.x, gridDim.y * blockDim.y and gridDim.z * blockDim.z are always less than 2^32.

Args:
f (ihipModuleSymbol_t/object) – IN:

Kernel to launch.

gridDimX (int) – IN:

X grid dimension specified as multiple of blockDimX.

gridDimY (int) – IN:

Y grid dimension specified as multiple of blockDimY.

gridDimZ (int) – IN:

Z grid dimension specified as multiple of blockDimZ.

blockDimX (int) – IN:

X block dimensions specified in work-items

blockDimY (int) – IN:

Y grid dimension specified in work-items

blockDimZ (int) – IN:

Z grid dimension specified in work-items

sharedMemBytes (int) – IN:

Amount of dynamic shared memory to allocate for this kernel. The HIP-Clang compiler provides support for extern shared declarations.

stream (ihipStream_t/object) – IN:

Stream where the kernel should be dispatched. May be 0, in which case th default stream is used with associated synchronization rules.

kernelParams (ListOfPointer/object) – IN:

Kernel parameters to launch

extra (HipModuleLaunchKernel_extra/object) – IN:

Pointer to kernel arguments. These are passed directly to the kernel and must be in the memory layout and alignment expected by the kernel. All passed arguments must be naturally aligned according to their type. The memory address of each argument should be a multiple of its size in bytes. Please refer to hip_porting_driver_api.md for sample usage.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipModuleLaunchKernel(hipFunction_t f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hipStream_t stream, void ** kernelParams, void ** extra)
rocm.bindings.hip.hipModuleLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, stream, kernelParams)#

launches kernel f with launch parameters and shared memory on stream with arguments passed to kernelParams, where thread blocks can cooperate and synchronize as they execute

Please note, HIP does not support kernel launch with total work items defined in dimension with size \(gridDim \cdot blockDim \geq 2^{32}\).

Args:
f (ihipModuleSymbol_t/object) – IN:

Kernel to launch.

gridDimX (int) – IN:

X grid dimension specified as multiple of blockDimX.

gridDimY (int) – IN:

Y grid dimension specified as multiple of blockDimY.

gridDimZ (int) – IN:

Z grid dimension specified as multiple of blockDimZ.

blockDimX (int) – IN:

X block dimension specified in work-items.

blockDimY (int) – IN:

Y block dimension specified in work-items.

blockDimZ (int) – IN:

Z block dimension specified in work-items.

sharedMemBytes (int) – IN:

Amount of dynamic shared memory to allocate for this kernel. The HIP-Clang compiler provides support for extern shared declarations.

stream (ihipStream_t/object) – IN:

Stream where the kernel should be dispatched. May be 0, in which case the default stream is used with associated synchronization rules.

kernelParams (ListOfPointer/object) – IN:

A list of kernel arguments.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipModuleLaunchCooperativeKernel(hipFunction_t f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hipStream_t stream, void ** kernelParams)
rocm.bindings.hip.hipModuleLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)#

Launches kernels on multiple devices where thread blocks can cooperate and synchronize as they execute.

Args:
launchParamsList (hipFunctionLaunchParams_t/object) – IN:

List of launch parameters, one per device.

numDevices (int) – IN:

Size of the launchParamsList array.

flags (int) – IN:

Flags to control launch behavior.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipModuleLaunchCooperativeKernelMultiDevice(hipFunctionLaunchParams * launchParamsList, unsigned int numDevices, unsigned int flags)
rocm.bindings.hip.hipLaunchCooperativeKernel(f, gridDim, blockDimX, kernelParams, sharedMemBytes, stream)#

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.

Please note, HIP does not support kernel launch with total work items defined in dimension with size \(gridDim \cdot blockDim \geq 2^{32}\).

Args:
f (Pointer/object) – IN:
  • Kernel to launch.

gridDim (dim3) – IN:
  • Grid dimensions specified as multiple of blockDim.

blockDimX (dim3) – IN:
  • Block dimensions specified in work-items

kernelParams (ListOfPointer/object) – IN:
  • Pointer of arguments passed to the kernel. If the kernel has multiple

parameters, ‘kernelParams’ should be array of pointers, each points the corresponding argument.

sharedMemBytes (int) – IN:
  • Amount of dynamic shared memory to allocate for this kernel. The

HIP-Clang compiler provides support for extern shared declarations.

stream (ihipStream_t/object) – IN:
  • Stream where the kernel should be dispatched. May be 0, in which case th

default stream is used with associated synchronization rules.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipLaunchCooperativeKernel(const void * f, dim3 gridDim, dim3 blockDimX, void ** kernelParams, unsigned int sharedMemBytes, hipStream_t stream)
rocm.bindings.hip.hipLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)#

Launches kernels on multiple devices where thread blocks can cooperate and synchronize as they execute.

Args:
launchParamsList (hipLaunchParams_t/object) – IN:

List of launch parameters, one per device.

numDevices (int) – IN:

Size of the launchParamsList array.

flags (int) – IN:

Flags to control launch behavior.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipLaunchCooperativeKernelMultiDevice(hipLaunchParams * launchParamsList, int numDevices, unsigned int flags)
rocm.bindings.hip.hipExtLaunchMultiKernelMultiDevice(launchParamsList, numDevices, flags)#

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

Args:
launchParamsList (hipLaunchParams_t/object) – IN:

List of launch parameters, one per device.

numDevices (int) – IN:

Size of the launchParamsList array.

flags (int) – IN:

Flags to control launch behavior.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipExtLaunchMultiKernelMultiDevice(hipLaunchParams * launchParamsList, int numDevices, unsigned int flags)
rocm.bindings.hip.hipLaunchKernelExC(config, fPtr, args)#

Launches a HIP kernel using a generic function pointer and the specified configuration.

This function is equivalent to hipLaunchKernelEx but accepts the kernel as a generic function pointer.

Args:
config (hipLaunchConfig_st/object) – IN:

Pointer to the kernel launch configuration structure.

fPtr (Pointer/object) – IN:

Pointer to the device kernel function.

args (ListOfPointer/object) – IN:

Array of pointers to the kernel arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • hipError_t: py:obj:hipSuccess if the kernel is launched successfully, otherwise an appropriate error code.

C signature

hipError_t hipLaunchKernelExC(const hipLaunchConfig_t * config, const void * fPtr, void ** args)
rocm.bindings.hip.hipDrvLaunchKernelEx(config, f, params, extra)#

Launches a HIP kernel using the driver API with the specified configuration.

This function dispatches the device kernel represented by a HIP function object. It passes both the kernel parameters and any extra configuration arguments to the kernel launch.

Args:
config (HIP_LAUNCH_CONFIG_st/object) – IN:

Pointer to the kernel launch configuration structure.

f (ihipModuleSymbol_t/object) – IN:

HIP function object representing the device kernel to be launched.

params (ListOfPointer/object) – IN:

Array of pointers to the kernel parameters.

extra (ListOfPointer/object) – IN:

Array of pointers for additional launch parameters or extra configuration data.

Returns:

A tuple of size 1 that contains (in that order):

  • hipError_t: py:obj:hipSuccess if the kernel is launched successfully, otherwise an appropriate error code.

C signature

hipError_t hipDrvLaunchKernelEx(const HIP_LAUNCH_CONFIG * config, hipFunction_t f, void ** params, void ** extra)
rocm.bindings.hip.hipMemGetHandleForAddressRange(handle, dptr, size, handleType, flags)#

Returns a handle for the address range requested.

This function returns a handle to a device pointer created using either hipMalloc set of APIs or through hipMemAddressReserve (as long as the ptr is mapped).

Args:
handle (Pointer/object) – OUT:

Ptr to the handle where the fd or other types will be returned.

dptr (Pointer/object) – IN:

Device ptr for which we get the handle.

size (int) – IN:

Size of the address range.

handleType (hipMemRangeHandleType) – IN:

Type of the handle requested for the address range.

flags (int) – IN:

Any flags set regarding the handle requested.

Returns:

A tuple of size 1 that contains (in that order):

  • hipError_t: py:obj:hipSuccess if the kernel is launched successfully, otherwise an appropriate error code.

C signature

hipError_t hipMemGetHandleForAddressRange(void * handle, hipDeviceptr_t dptr, size_t size, hipMemRangeHandleType handleType, unsigned long long flags)
rocm.bindings.hip.hipModuleOccupancyMaxPotentialBlockSize(f, dynSharedMemPerBlk, blockSizeLimit)#

determine the grid and block sizes to achieves maximum occupancy for a kernel

  • This section describes the occupancy functions of HIP runtime API.

Please note, HIP does not support kernel launch with total work items defined in dimension with size gridDim x blockDim >= 2^32.

Args:
f (ihipModuleSymbol_t/object) – IN:

kernel function for which occupancy is calculated

dynSharedMemPerBlk (int) – IN:

dynamic shared memory usage (in bytes) intended for each block

blockSizeLimit (int) – IN:

the maximum block size for the kernel, use 0 for no limit

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipModuleOccupancyMaxPotentialBlockSize(int * gridSize, int * blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit)
rocm.bindings.hip.hipModuleOccupancyMaxPotentialBlockSizeWithFlags(f, dynSharedMemPerBlk, blockSizeLimit, flags)#

determine the grid and block sizes to achieves maximum occupancy for a kernel

Please note, HIP does not support kernel launch with total work items defined in dimension with size gridDim x blockDim >= 2^32.

Args:
f (ihipModuleSymbol_t/object) – IN:

kernel function for which occupancy is calculated

dynSharedMemPerBlk (int) – IN:

dynamic shared memory usage (in bytes) intended for each block

blockSizeLimit (int) – IN:

the maximum block size for the kernel, use 0 for no limit

flags (int) – IN:

Extra flags for occupancy calculation (only default supported)

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipModuleOccupancyMaxPotentialBlockSizeWithFlags(int * gridSize, int * blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit, unsigned int flags)
rocm.bindings.hip.hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(f, blockSize, dynSharedMemPerBlk)#

Returns occupancy for a device function.

Args:
f (ihipModuleSymbol_t/object) – IN:

Kernel function (hipFunction) for which occupancy is calculated

blockSize (int) – IN:

Block size the kernel is intended to be launched with

dynSharedMemPerBlk (int) – IN:

Dynamic shared memory usage (in bytes) intended for each block

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(int * numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk)
rocm.bindings.hip.hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(f, blockSize, dynSharedMemPerBlk, flags)#

Returns occupancy for a device function.

Args:
f (ihipModuleSymbol_t/object) – IN:

Kernel function(hipFunction_t) for which occupancy is calculated

blockSize (int) – IN:

Block size the kernel is intended to be launched with

dynSharedMemPerBlk (int) – IN:

Dynamic shared memory usage (in bytes) intended for each block

flags (int) – IN:

Extra flags for occupancy calculation (only default supported)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int * numBlocks, hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags)
rocm.bindings.hip.hipOccupancyMaxActiveBlocksPerMultiprocessor(f, blockSize, dynSharedMemPerBlk)#

Returns occupancy for a device function.

Args:
f (Pointer/object) – IN:

Kernel function for which occupancy is calculated

blockSize (int) – IN:

Block size the kernel is intended to be launched with

dynSharedMemPerBlk (int) – IN:

Dynamic shared memory usage (in bytes) intended for each block

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor(int * numBlocks, const void * f, int blockSize, size_t dynSharedMemPerBlk)
rocm.bindings.hip.hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(f, blockSize, dynSharedMemPerBlk, flags)#

Returns occupancy for a device function.

Args:
f (Pointer/object) – IN:

Kernel function for which occupancy is calculated

blockSize (int) – IN:

Block size the kernel is intended to be launched with

dynSharedMemPerBlk (int) – IN:

Dynamic shared memory usage (in bytes) intended for each block

flags (int) – IN:

Extra flags for occupancy calculation (currently ignored)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int * numBlocks, const void * f, int blockSize, size_t dynSharedMemPerBlk, unsigned int flags)
rocm.bindings.hip.hipOccupancyMaxPotentialBlockSize(f, dynSharedMemPerBlk, blockSizeLimit)#

determine the grid and block sizes to achieves maximum occupancy for a kernel

Please note, HIP does not support kernel launch with total work items defined in dimension with size gridDim x blockDim >= 2^32.

Args:
f (Pointer/object) – IN:

kernel function for which occupancy is calculated

dynSharedMemPerBlk (int) – IN:

dynamic shared memory usage (in bytes) intended for each block

blockSizeLimit (int) – IN:

the maximum block size for the kernel, use 0 for no limit

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipOccupancyMaxPotentialBlockSize(int * gridSize, int * blockSize, const void * f, size_t dynSharedMemPerBlk, int blockSizeLimit)
rocm.bindings.hip.hipOccupancyAvailableDynamicSMemPerBlock(f, numBlocks, blockSize)#

Returns dynamic shared memory available per block when launching numBlocks blocks on SM.

Returns in *dynamicSmemSize the maximum size of dynamic shared memory / to allow numBlocks blocks per SM.

Args:
f (Pointer/object) – IN:

Kernel function for which occupancy is calculated.

numBlocks (int) – IN:

Number of blocks to fit on SM

blockSize (int) – IN:

Size of the block

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipOccupancyAvailableDynamicSMemPerBlock(size_t * dynamicSmemSize, const void * f, int numBlocks, int blockSize)
rocm.bindings.hip.hipOccupancyMaxActiveClusters(f, config)#

determines the amount of active kernel clusters can co-exist at the same time in a device

Args:
f (Pointer/object) – IN:

kernel function for which occupancy is calculated

config (hipLaunchConfig_st/object) – IN:

pointer to the kernel launch configuration structure

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipOccupancyMaxActiveClusters(int * numClusters, const void * f, const hipLaunchConfig_t * config)
rocm.bindings.hip.hipOccupancyMaxPotentialClusterSize(f, config)#

returns the maximum cluster size (in number of blocks) that can run on the device

Args:
f (Pointer/object) – IN:

kernel function for which occupancy is calculated

config (hipLaunchConfig_st/object) – IN:

pointer to the kernel launch configuration structure

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipOccupancyMaxPotentialClusterSize(int * clusterSize, const void * f, const hipLaunchConfig_t * config)
rocm.bindings.hip.hipProfilerStart()#

Start recording of profiling information [Deprecated] When using this API, start the profiler with profiling disabled. (–startdisabled)

Warning:

hipProfilerStart API is deprecated, use roctracer/rocTX instead.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipProfilerStart()
rocm.bindings.hip.hipProfilerStop()#

Stop recording of profiling information [Deprecated] When using this API, start the profiler with profiling disabled. (–startdisabled)

Warning:

hipProfilerStart API is deprecated, use roctracer/rocTX instead.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipProfilerStop()
rocm.bindings.hip.hipConfigureCall(gridDim, blockDim, sharedMem, stream)#

Configure a kernel launch.

  • This section describes the API to support the triple-chevron syntax.

Please note, HIP does not support kernel launch with total work items defined in dimension with size gridDim x blockDim >= 2^32.

Args:
gridDim (dim3) – IN:

grid dimension specified as multiple of blockDim.

blockDim (dim3) – IN:

block dimensions specified in work-items

sharedMem (int) – IN:

Amount of dynamic shared memory to allocate for this kernel. The HIP-Clang compiler provides support for extern shared declarations.

stream (ihipStream_t/object) – IN:

Stream where the kernel should be dispatched. May be 0, in which case the default stream is used with associated synchronization rules.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem, hipStream_t stream)
rocm.bindings.hip.hipSetupArgument(arg, size, offset)#

Set a kernel argument.

Args:
arg (Pointer/object) – IN:

Pointer the argument in host memory.

size (int) – IN:

Size of the argument.

offset (int) – IN:

Offset of the argument on the argument stack.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipSetupArgument(const void * arg, size_t size, size_t offset)
rocm.bindings.hip.hipLaunchByPtr(func)#

Launch a kernel.

Args:
func (Pointer/object) – IN:

Kernel to launch.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipLaunchByPtr(const void * func)
rocm.bindings.hip.hipLaunchKernel(function_address, numBlocks, dimBlocks, args, sharedMemBytes, stream)#

C compliant kernel launch API

Args:
function_address (Pointer/object) – IN:
  • Kernel stub function pointer.

numBlocks (dim3) – IN:
  • Number of blocks.

dimBlocks (dim3) – IN:
  • Dimension of a block

args (ListOfPointer/object) – IN:
  • Pointer of arguments passed to the kernel. If the kernel has multiple

parameters, ‘args’ should be array of pointers, each points the corresponding argument.

sharedMemBytes (int) – IN:
  • Amount of dynamic shared memory to allocate for this kernel. The

HIP-Clang compiler provides support for extern shared declarations.

stream (ihipStream_t/object) – IN:
  • Stream where the kernel should be dispatched. May be 0, in which case th

default stream is used with associated synchronization rules.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipLaunchKernel(const void * function_address, dim3 numBlocks, dim3 dimBlocks, void ** args, size_t sharedMemBytes, hipStream_t stream)
rocm.bindings.hip.hipLaunchHostFunc(stream, fn, userData)#

Enqueues a host function call in a stream.

The host function to call in this API will be executed after the preceding operations in the stream are complete. The function is a blocking operation that blocks operations in the stream that follow it, until the function is returned. Event synchronization and internal callback functions make sure enqueued operations will execute in order, in the stream.

The host function must not make any HIP API calls. The host function is non-reentrant. It must not perform sychronization with any operation that may depend on other processing execution but is not enqueued to run earlier in the stream.

Host functions that are enqueued respectively in different non-blocking streams can run concurrently.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Args:
stream (ihipStream_t/object) – IN:
  • The stream to enqueue work in.

fn (hipHostFn_t/object) – IN:
  • The function to call once enqueued preceeding operations are complete.

userData (Pointer/object) – IN:
  • User-specified data to be passed to the function.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipLaunchHostFunc(hipStream_t stream, hipHostFn_t fn, void * userData)
rocm.bindings.hip.hipDrvMemcpy2DUnaligned(pCopy)#

Copies memory for 2D arrays.

Args:
pCopy (hip_Memcpy2D/object):
  • Parameters for the memory copy

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDrvMemcpy2DUnaligned(const hip_Memcpy2D * pCopy)
rocm.bindings.hip.hipExtLaunchKernel(function_address, numBlocks, dimBlocks, args, sharedMemBytes, stream, startEvent, stopEvent, flags)#

Launches kernel from the pointer address, with arguments and shared memory on stream.

Args:
function_address (Pointer/object) – IN:
  • Pointer to the Kernel to launch.

numBlocks (dim3) – IN:
  • Number of blocks.

dimBlocks (dim3) – IN:
  • Dimension of a block.

args (ListOfPointer/object) – IN:
  • Pointer of arguments passed to the kernel. If the kernel has multiple

parameters, ‘args’ should be array of pointers, each points the corresponding argument.

sharedMemBytes (int) – IN:
  • Amount of dynamic shared memory to allocate for this kernel.

HIP-Clang compiler provides support for extern shared declarations.

stream (ihipStream_t/object) – IN:
  • Stream where the kernel should be dispatched.

May be 0, in which case the default stream is used with associated synchronization rules.

startEvent (ihipEvent_t/object) – IN:
  • If non-null, specified event will be updated to track the start time of

the kernel launch. The event must be created before calling this API.

stopEvent (ihipEvent_t/object) – IN:
  • If non-null, specified event will be updated to track the stop time of

the kernel launch. The event must be created before calling this API.

flags (int) – IN:
  • The value of hipExtAnyOrderLaunch, signifies if kernel can be

launched in any order.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipExtLaunchKernel(const void * function_address, dim3 numBlocks, dim3 dimBlocks, void ** args, size_t sharedMemBytes, hipStream_t stream, hipEvent_t startEvent, hipEvent_t stopEvent, int flags)
rocm.bindings.hip.hipCreateTextureObject(pResDesc, pTexDesc, pResViewDesc)#

Creates a texture object.

Note:

3D linear filter isn’t supported on GFX90A boards, on which the API hipCreateTextureObject will return hipErrorNotSupported.

Args:
pResDesc (hipResourceDesc/object) – IN:

pointer to resource descriptor

pTexDesc (hipTextureDesc/object) – IN:

pointer to texture descriptor

pResViewDesc (hipResourceViewDesc/object) – IN:

pointer to resource view descriptor

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCreateTextureObject(hipTextureObject_t * pTexObject, const hipResourceDesc * pResDesc, const hipTextureDesc * pTexDesc, const struct hipResourceViewDesc * pResViewDesc)
rocm.bindings.hip.hipDestroyTextureObject(textureObject)#

Destroys a texture object.

Args:
textureObject (__hip_texture/object) – IN:

texture object to destroy

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDestroyTextureObject(hipTextureObject_t textureObject)
rocm.bindings.hip.hipGetChannelDesc(desc)#

Gets the channel descriptor in an array.

Args:
desc (hipChannelFormatDesc/object) – IN:

pointer to channel format descriptor

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetChannelDesc(hipChannelFormatDesc * desc, hipArray_const_t array)
rocm.bindings.hip.hipGetTextureObjectResourceDesc(textureObject)#

Gets resource descriptor for the texture object.

Args:
textureObject (__hip_texture/object) – IN:

texture object

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetTextureObjectResourceDesc(hipResourceDesc * pResDesc, hipTextureObject_t textureObject)
rocm.bindings.hip.hipGetTextureObjectResourceViewDesc(textureObject)#

Gets resource view descriptor for the texture object.

Args:
textureObject (__hip_texture/object) – IN:

texture object

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetTextureObjectResourceViewDesc(struct hipResourceViewDesc * pResViewDesc, hipTextureObject_t textureObject)
rocm.bindings.hip.hipGetTextureObjectTextureDesc(textureObject)#

Gets texture descriptor for the texture object.

Args:
textureObject (__hip_texture/object) – IN:

texture object

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetTextureObjectTextureDesc(hipTextureDesc * pTexDesc, hipTextureObject_t textureObject)
rocm.bindings.hip.hipTexObjectCreate(pResDesc, pTexDesc, pResViewDesc)#

Creates a texture object.

Args:
pResDesc (HIP_RESOURCE_DESC_st/object) – IN:

pointer to resource descriptor

pTexDesc (HIP_TEXTURE_DESC_st/object) – IN:

pointer to texture descriptor

pResViewDesc (HIP_RESOURCE_VIEW_DESC_st/object) – IN:

pointer to resource view descriptor

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexObjectCreate(hipTextureObject_t * pTexObject, const HIP_RESOURCE_DESC * pResDesc, const HIP_TEXTURE_DESC * pTexDesc, const HIP_RESOURCE_VIEW_DESC * pResViewDesc)
rocm.bindings.hip.hipTexObjectDestroy(texObject)#

Destroys a texture object.

Args:
texObject (__hip_texture/object) – IN:

texture object to destroy

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexObjectDestroy(hipTextureObject_t texObject)
rocm.bindings.hip.hipTexObjectGetResourceDesc(texObject)#

Gets resource descriptor of a texture object.

Args:
texObject (__hip_texture/object) – IN:

texture object

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexObjectGetResourceDesc(HIP_RESOURCE_DESC * pResDesc, hipTextureObject_t texObject)
rocm.bindings.hip.hipTexObjectGetResourceViewDesc(texObject)#

Gets resource view descriptor of a texture object.

Args:
texObject (__hip_texture/object) – IN:

texture object

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexObjectGetResourceViewDesc(HIP_RESOURCE_VIEW_DESC * pResViewDesc, hipTextureObject_t texObject)
rocm.bindings.hip.hipTexObjectGetTextureDesc(texObject)#

Gets texture descriptor of a texture object.

Args:
texObject (__hip_texture/object) – IN:

texture object

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexObjectGetTextureDesc(HIP_TEXTURE_DESC * pTexDesc, hipTextureObject_t texObject)
rocm.bindings.hip.hipMallocMipmappedArray(desc, extent, numLevels, flags)#

Allocate a mipmapped array on the device.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
desc (hipChannelFormatDesc/object) – IN:
  • Requested channel format

extent (hipExtent) – IN:
  • Requested allocation size (width field in elements)

numLevels (int) – IN:
  • Number of mipmap levels to allocate

flags (int) – IN:
  • Flags for extensions

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMallocMipmappedArray(hipMipmappedArray_t * mipmappedArray, const struct hipChannelFormatDesc * desc, struct hipExtent extent, unsigned int numLevels, unsigned int flags)
rocm.bindings.hip.hipFreeMipmappedArray(mipmappedArray)#

Frees a mipmapped array on the device.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
mipmappedArray (hipMipmappedArray/object) – IN:
  • Pointer to mipmapped array to free

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray)
rocm.bindings.hip.hipGetMipmappedArrayLevel(mipmappedArray, level)#

Gets a mipmap level of a HIP mipmapped array.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
mipmappedArray (hipMipmappedArray/object) – IN:
  • HIP mipmapped array

level (int) – IN:
  • Mipmap level

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetMipmappedArrayLevel(hipArray_t * levelArray, hipMipmappedArray_const_t mipmappedArray, unsigned int level)
rocm.bindings.hip.hipMipmappedArrayCreate(pMipmappedArrayDesc, numMipmapLevels)#

Create a mipmapped array.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
pMipmappedArrayDesc (HIP_ARRAY3D_DESCRIPTOR/object) – IN:

mipmapped array descriptor

numMipmapLevels (int) – IN:

mipmap level

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMipmappedArrayCreate(hipMipmappedArray_t * pHandle, HIP_ARRAY3D_DESCRIPTOR * pMipmappedArrayDesc, unsigned int numMipmapLevels)
rocm.bindings.hip.hipMipmappedArrayDestroy()#

Destroy a mipmapped array.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMipmappedArrayDestroy(hipMipmappedArray_t hMipmappedArray)
rocm.bindings.hip.hipMipmappedArrayGetLevel(pLevelArray, level)#

Get a mipmapped array on a mipmapped level.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
pLevelArray (Pointer/object) – IN:

Pointer of array

level (int) – OUT:

Mipmap level

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMipmappedArrayGetLevel(hipArray_t * pLevelArray, hipMipmappedArray_t hMipMappedArray, unsigned int level)
rocm.bindings.hip.hipBindTextureToMipmappedArray(tex, mipmappedArray, desc)#

Binds a mipmapped array to a texture [Deprecated]

Args:
tex (textureReference/object) – IN:

pointer to the texture reference to bind

mipmappedArray (hipMipmappedArray/object) – IN:

memory mipmapped array on the device

desc (hipChannelFormatDesc/object) – IN:

opointer to the channel format

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipBindTextureToMipmappedArray(const textureReference * tex, hipMipmappedArray_const_t mipmappedArray, const hipChannelFormatDesc * desc)
rocm.bindings.hip.hipGetTextureReference(symbol)#

Gets the texture reference related with the symbol [Deprecated]

Warning:

This API is deprecated.

Args:
symbol (Pointer/object) – IN:

pointer to the symbol related with the texture for the reference

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetTextureReference(const textureReference ** texref, const void * symbol)
rocm.bindings.hip.hipTexRefGetBorderColor(texRef)#

Gets the border color used by a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefGetBorderColor(float * pBorderColor, const textureReference * texRef)
rocm.bindings.hip.hipTexRefGetArray(pArray, texRef)#

Gets the array bound to a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
pArray (Pointer/object) – IN:

Returned array.

texRef (textureReference/object) – IN:

texture reference.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefGetArray(hipArray_t * pArray, const textureReference * texRef)
rocm.bindings.hip.hipTexRefSetAddressMode(texRef, dim, am)#

Sets address mode for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

texture reference.

dim (int) – IN:

Dimension of the texture.

am (hipTextureAddressMode) – IN:

Value of the texture address mode.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetAddressMode(textureReference * texRef, int dim, enum hipTextureAddressMode am)
rocm.bindings.hip.hipTexRefSetArray(tex, array, flags)#

Binds an array as a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
tex (textureReference/object) – IN:

Pointer texture reference.

array (hipArray/object) – IN:

Array to bind.

flags (int) – IN:

Flags should be set as HIP_TRSA_OVERRIDE_FORMAT, as a valid value.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetArray(textureReference * tex, hipArray_const_t array, unsigned int flags)
rocm.bindings.hip.hipTexRefSetFilterMode(texRef, fm)#

Set filter mode for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer texture reference.

fm (hipTextureFilterMode) – IN:

Value of texture filter mode.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetFilterMode(textureReference * texRef, enum hipTextureFilterMode fm)
rocm.bindings.hip.hipTexRefSetFlags(texRef, Flags)#

Set flags for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer texture reference.

Flags (int) – IN:

Value of flags.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetFlags(textureReference * texRef, unsigned int Flags)
rocm.bindings.hip.hipTexRefSetFormat(texRef, fmt, NumPackedComponents)#

Set format for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer texture reference.

fmt (hipArray_Format) – IN:

Value of format.

NumPackedComponents (int) – IN:

Number of components per array.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetFormat(textureReference * texRef, hipArray_Format fmt, int NumPackedComponents)
rocm.bindings.hip.hipBindTexture(tex, devPtr, desc, size)#

Binds a memory area to a texture [Deprecated]

Warning:

This API is deprecated.

Args:
tex (textureReference/object) – IN:

Texture to bind.

devPtr (Pointer/object) – IN:

Pointer of memory on the device.

desc (hipChannelFormatDesc/object) – IN:

Pointer of channel format descriptor.

size (int) – IN:

Size of memory in bites.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipBindTexture(size_t * offset, const textureReference * tex, const void * devPtr, const hipChannelFormatDesc * desc, size_t size)
rocm.bindings.hip.hipBindTexture2D(tex, devPtr, desc, width, height, pitch)#

Binds a 2D memory area to a texture [Deprecated]

Warning:

This API is deprecated.

Args:
tex (textureReference/object) – IN:

Texture to bind.

devPtr (Pointer/object) – IN:

Pointer of 2D memory area on the device.

desc (hipChannelFormatDesc/object) – IN:

Pointer of channel format descriptor.

width (int) – IN:

Width in texel units.

height (int) – IN:

Height in texel units.

pitch (int) – IN:

Pitch in bytes.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipBindTexture2D(size_t * offset, const textureReference * tex, const void * devPtr, const hipChannelFormatDesc * desc, size_t width, size_t height, size_t pitch)
rocm.bindings.hip.hipBindTextureToArray(tex, array, desc)#

Binds a memory area to a texture [Deprecated]

Warning:

This API is deprecated.

Args:
tex (textureReference/object) – IN:

Pointer of texture reference.

array (hipArray/object) – IN:

Array to bind.

desc (hipChannelFormatDesc/object) – IN:

Pointer of channel format descriptor.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipBindTextureToArray(const textureReference * tex, hipArray_const_t array, const hipChannelFormatDesc * desc)
rocm.bindings.hip.hipGetTextureAlignmentOffset(texref)#

Get the offset of the alignment in a texture [Deprecated]

Warning:

This API is deprecated.

Args:
texref (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGetTextureAlignmentOffset(size_t * offset, const textureReference * texref)
rocm.bindings.hip.hipUnbindTexture(tex)#

Unbinds a texture [Deprecated]

Warning:

This API is deprecated.

Args:
tex (textureReference/object) – IN:

Texture to unbind.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipUnbindTexture(const textureReference * tex)
rocm.bindings.hip.hipTexRefGetAddress(texRef)#

Gets the address for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefGetAddress(hipDeviceptr_t * dev_ptr, const textureReference * texRef)
rocm.bindings.hip.hipTexRefGetAddressMode(texRef, dim)#

Gets the address mode for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

dim (int) – IN:

Dimension.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefGetAddressMode(enum hipTextureAddressMode * pam, const textureReference * texRef, int dim)
rocm.bindings.hip.hipTexRefGetFilterMode(texRef)#

Gets filter mode for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefGetFilterMode(enum hipTextureFilterMode * pfm, const textureReference * texRef)
rocm.bindings.hip.hipTexRefGetFlags(texRef)#

Gets flags for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefGetFlags(unsigned int * pFlags, const textureReference * texRef)
rocm.bindings.hip.hipTexRefGetFormat(texRef)#

Gets texture format for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipTexRefGetFormat(hipArray_Format * pFormat, int * pNumChannels, const textureReference * texRef)
rocm.bindings.hip.hipTexRefGetMaxAnisotropy(texRef)#

Gets the maximum anisotropy for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefGetMaxAnisotropy(int * pmaxAnsio, const textureReference * texRef)
rocm.bindings.hip.hipTexRefGetMipmapFilterMode(texRef)#

Gets the mipmap filter mode for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefGetMipmapFilterMode(enum hipTextureFilterMode * pfm, const textureReference * texRef)
rocm.bindings.hip.hipTexRefGetMipmapLevelBias(texRef)#

Gets the mipmap level bias for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefGetMipmapLevelBias(float * pbias, const textureReference * texRef)
rocm.bindings.hip.hipTexRefGetMipmapLevelClamp(texRef)#

Gets the minimum and maximum mipmap level clamps for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipTexRefGetMipmapLevelClamp(float * pminMipmapLevelClamp, float * pmaxMipmapLevelClamp, const textureReference * texRef)
rocm.bindings.hip.hipTexRefGetMipMappedArray(texRef)#

Gets the mipmapped array bound to a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefGetMipMappedArray(hipMipmappedArray_t * pArray, const textureReference * texRef)
rocm.bindings.hip.hipTexRefSetAddress(texRef, dptr, bytes)#

Sets an bound address for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

dptr (Pointer/object) – IN:

Pointer of device address to bind.

bytes (int) – IN:

Size in bytes.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefSetAddress(size_t * ByteOffset, textureReference * texRef, hipDeviceptr_t dptr, size_t bytes)
rocm.bindings.hip.hipTexRefSetAddress2D(texRef, desc, dptr, Pitch)#

Set a bind an address as a 2D texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

desc (HIP_ARRAY_DESCRIPTOR/object) – IN:

Pointer of array descriptor.

dptr (Pointer/object) – IN:

Pointer of device address to bind.

Pitch (int) – IN:

Pitch in bytes.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetAddress2D(textureReference * texRef, const HIP_ARRAY_DESCRIPTOR * desc, hipDeviceptr_t dptr, size_t Pitch)
rocm.bindings.hip.hipTexRefSetMaxAnisotropy(texRef, maxAniso)#

Sets the maximum anisotropy for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

maxAniso (int) – OUT:

Value of the maximum anisotropy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetMaxAnisotropy(textureReference * texRef, unsigned int maxAniso)
rocm.bindings.hip.hipTexRefSetBorderColor(texRef)#

Sets border color for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipTexRefSetBorderColor(textureReference * texRef, float * pBorderColor)
rocm.bindings.hip.hipTexRefSetMipmapFilterMode(texRef, fm)#

Sets mipmap filter mode for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

fm (hipTextureFilterMode) – IN:

Value of filter mode.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetMipmapFilterMode(textureReference * texRef, enum hipTextureFilterMode fm)
rocm.bindings.hip.hipTexRefSetMipmapLevelBias(texRef, bias)#

Sets mipmap level bias for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

bias (float/int) – IN:

Value of mipmap bias.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetMipmapLevelBias(textureReference * texRef, float bias)
rocm.bindings.hip.hipTexRefSetMipmapLevelClamp(texRef, minMipMapLevelClamp, maxMipMapLevelClamp)#

Sets mipmap level clamp for a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference.

minMipMapLevelClamp (float/int) – IN:

Value of minimum mipmap level clamp.

maxMipMapLevelClamp (float/int) – IN:

Value of maximum mipmap level clamp.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetMipmapLevelClamp(textureReference * texRef, float minMipMapLevelClamp, float maxMipMapLevelClamp)
rocm.bindings.hip.hipTexRefSetMipmappedArray(texRef, mipmappedArray, Flags)#

Binds mipmapped array to a texture reference [Deprecated]

Warning:

This API is deprecated.

Args:
texRef (textureReference/object) – IN:

Pointer of texture reference to bind.

mipmappedArray (hipMipmappedArray/object) – IN:

Pointer of mipmapped array to bind.

Flags (int) – IN:

Flags should be set as HIP_TRSA_OVERRIDE_FORMAT, as a valid value.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipTexRefSetMipmappedArray(textureReference * texRef, struct hipMipmappedArray * mipmappedArray, unsigned int Flags)
rocm.bindings.hip.hipApiName(id)#

Returns HIP API name by ID.

  • This section describes the callback/Activity of HIP runtime API.

Args:
id (int) – IN:

ID of HIP API

Returns:

A tuple of size 2 that contains (in that order):

C signature

const char * hipApiName(uint32_t id)
rocm.bindings.hip.hipKernelNameRef(f)#

Returns kernel name reference by function name.

Args:
f (ihipModuleSymbol_t/object) – IN:

Name of function

Returns:

A tuple of size 2 that contains (in that order):

C signature

const char * hipKernelNameRef(const hipFunction_t f)
rocm.bindings.hip.hipKernelNameRefByPtr(hostFunction, stream)#

Retrives kernel for a given host pointer, unless stated otherwise.

Args:
hostFunction (Pointer/object) – IN:

Pointer of host function.

stream (ihipStream_t/object) – IN:

Stream the kernel is executed on.

Returns:

A tuple of size 2 that contains (in that order):

C signature

const char * hipKernelNameRefByPtr(const void * hostFunction, hipStream_t stream)
rocm.bindings.hip.hipGetStreamDeviceId(stream)#

Returns device ID on the stream.

Args:
stream (ihipStream_t/object) – IN:

Stream of device executed on.

Returns:

A tuple of size 2 that contains (in that order):

C signature

int hipGetStreamDeviceId(hipStream_t stream)
rocm.bindings.hip.hipStreamBeginCapture(stream, mode)#

Begins graph capture on a stream.

Args:
stream (ihipStream_t/object) – IN:
  • Stream to initiate capture.

mode (hipStreamCaptureMode) – IN:
  • Controls the interaction of this capture sequence with other API calls that

are not safe.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode)
rocm.bindings.hip.hipStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode)#

Begins graph capture on a stream to an existing graph.

Warning:

param “const hipGraphEdgeData* dependencyData” is currently not supported and has to be passed as nullptr. This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Args:
stream (ihipStream_t/object) – IN:
  • Stream to initiate capture.

graph (ihipGraph/object) – IN:
  • Graph to capture into.

dependencies (Pointer/object) – IN:
  • Dependencies of the first node captured in the stream. Can be NULL if

numDependencies is 0.

dependencyData (hipGraphEdgeData/object) – IN:
  • Optional array of data associated with each dependency.

numDependencies (int) – IN:
  • Number of dependencies.

mode (hipStreamCaptureMode) – IN:
  • Controls the interaction of this capture sequence with other API calls that

are not safe.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamBeginCaptureToGraph(hipStream_t stream, hipGraph_t graph, const hipGraphNode_t * dependencies, const hipGraphEdgeData * dependencyData, size_t numDependencies, hipStreamCaptureMode mode)
rocm.bindings.hip.hipStreamEndCapture(stream)#

Ends capture on a stream, returning the captured graph.

Args:
stream (ihipStream_t/object) – IN:
  • Stream to end capture.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t * pGraph)
rocm.bindings.hip.hipStreamGetCaptureInfo(stream)#

Get capture status of a stream.

Args:
stream (ihipStream_t/object) – IN:
  • Stream of which to get capture status from.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipStreamGetCaptureInfo(hipStream_t stream, hipStreamCaptureStatus * pCaptureStatus, unsigned long long * pId)
rocm.bindings.hip.hipStreamGetCaptureInfo_v2(stream, dependencies_out)#

Get stream’s capture state

Args:
stream (ihipStream_t/object) – IN:
  • Stream of which to get capture status from.

dependencies_out (Pointer/object) – OUT:
  • Pointer to an array of nodes representing the graphs

dependencies.

Returns:

A tuple of size 5 that contains (in that order):

C signature

hipError_t hipStreamGetCaptureInfo_v2(hipStream_t stream, hipStreamCaptureStatus * captureStatus_out, unsigned long long * id_out, hipGraph_t * graph_out, const hipGraphNode_t ** dependencies_out, size_t * numDependencies_out)
rocm.bindings.hip.hipStreamIsCapturing(stream)#

Get stream’s capture state

Args:
stream (ihipStream_t/object) – IN:
  • Stream of which to get capture status from.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamIsCapturing(hipStream_t stream, hipStreamCaptureStatus * pCaptureStatus)
rocm.bindings.hip.hipStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags)#

Update the set of dependencies in a capturing stream

Args:
stream (ihipStream_t/object) – IN:

Stream that is being captured.

dependencies (Pointer/object) – IN:

Pointer to an array of nodes to add/replace.

numDependencies (int) – IN:

Size of the dependencies array.

flags (int) – IN:

Flag to update dependency set. Should be one of the values in enum hipStreamUpdateCaptureDependenciesFlags.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamUpdateCaptureDependencies(hipStream_t stream, hipGraphNode_t * dependencies, size_t numDependencies, unsigned int flags)
rocm.bindings.hip.hipThreadExchangeStreamCaptureMode()#

Swaps the stream capture mode of a thread.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipThreadExchangeStreamCaptureMode(hipStreamCaptureMode * mode)
rocm.bindings.hip.hipGraphCreate(flags)#

Creates a graph

Args:
flags (int) – IN:
  • flags for graph creation, must be 0.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphCreate(hipGraph_t * pGraph, unsigned int flags)
rocm.bindings.hip.hipGraphDestroy(graph)#

Destroys a graph

Args:
graph (ihipGraph/object) – IN:
  • instance of graph to destroy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphDestroy(hipGraph_t graph)
rocm.bindings.hip.hipGraphAddDependencies(graph, from_, to, numDependencies)#

Adds dependency edges to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph to add dependencies to.

from (Pointer/object) – IN:
  • Pointer to the graph nodes with dependencies to add from.

to (Pointer/object) – IN:
  • Pointer to the graph nodes to add dependencies to.

numDependencies (int) – IN:
  • Number of dependencies to add.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphAddDependencies(hipGraph_t graph, const hipGraphNode_t * from, const hipGraphNode_t * to, size_t numDependencies)
rocm.bindings.hip.hipGraphRemoveDependencies(graph, from_, to, numDependencies)#

Removes dependency edges from a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph to remove dependencies from.

from (Pointer/object) – IN:
  • Array of nodes that provide the dependencies.

to (Pointer/object) – IN:
  • Array of dependent nodes.

numDependencies (int) – IN:
  • Number of dependencies to remove.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphRemoveDependencies(hipGraph_t graph, const hipGraphNode_t * from, const hipGraphNode_t * to, size_t numDependencies)
rocm.bindings.hip.hipGraphGetEdges(graph)#

Returns a graph’s dependency edges.

from and to may both be NULL, in which case this function only returns the number of edges in numEdges. Otherwise, numEdges entries will be filled in. If numEdges is higher than the actual number of edges, the remaining entries in from and to will be set to NULL, and the number of edges actually returned will be written to numEdges.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph to get the edges from.

Returns:

A tuple of size 4 that contains (in that order):

C signature

hipError_t hipGraphGetEdges(hipGraph_t graph, hipGraphNode_t * from, hipGraphNode_t * to, size_t * numEdges)
rocm.bindings.hip.hipGraphGetNodes(graph)#

Returns a graph’s nodes.

nodes may be NULL, in which case this function will return the number of nodes in numNodes. Otherwise, numNodes entries will be filled in. If numNodes is higher than the actual number of nodes, the remaining entries in nodes will be set to NULL, and the number of nodes actually obtained will be returned in numNodes.

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to get the nodes from.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipGraphGetNodes(hipGraph_t graph, hipGraphNode_t * nodes, size_t * numNodes)
rocm.bindings.hip.hipGraphGetRootNodes(graph)#

Returns a graph’s root nodes.

pRootNodes may be NULL, in which case this function will return the number of root nodes in pNumRootNodes. Otherwise, pNumRootNodes entries will be filled in. If pNumRootNodes is higher than the actual number of root nodes, the remaining entries in pRootNodes will be set to NULL, and the number of nodes actually obtained will be returned in pNumRootNodes.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph to get the nodes from.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipGraphGetRootNodes(hipGraph_t graph, hipGraphNode_t * pRootNodes, size_t * pNumRootNodes)
rocm.bindings.hip.hipGraphNodeGetDependencies(node)#

Returns a node’s dependencies.

pDependencies may be NULL, in which case this function will return the number of dependencies in pNumDependencies. Otherwise, pNumDependencies entries will be filled in. If pNumDependencies is higher than the actual number of dependencies, the remaining entries in pDependencies will be set to NULL, and the number of nodes actually obtained will be returned in pNumDependencies.

Args:
node (hipGraphNode/object) – IN:
  • Graph node to get the dependencies from.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipGraphNodeGetDependencies(hipGraphNode_t node, hipGraphNode_t * pDependencies, size_t * pNumDependencies)
rocm.bindings.hip.hipGraphNodeGetDependentNodes(node)#

Returns a node’s dependent nodes.

pDependentNodes may be NULL, in which case this function will return the number of dependent nodes in pNumDependentNodes. Otherwise, pNumDependentNodes entries will be filled in. If pNumDependentNodes is higher than the actual number of dependent nodes, the remaining entries in pDependentNodes will be set to NULL, and the number of nodes actually obtained will be returned in pNumDependentNodes.

Args:
node (hipGraphNode/object) – IN:
  • Graph node to get the dependent nodes from.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipGraphNodeGetDependentNodes(hipGraphNode_t node, hipGraphNode_t * pDependentNodes, size_t * pNumDependentNodes)
rocm.bindings.hip.hipGraphNodeGetType(node)#

Returns a node’s type.

Args:
node (hipGraphNode/object) – IN:
  • Node to get type of.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphNodeGetType(hipGraphNode_t node, hipGraphNodeType * pType)
rocm.bindings.hip.hipGraphDestroyNode(node)#

Remove a node from the graph.

Args:
node (hipGraphNode/object) – IN:
  • graph node to remove

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphDestroyNode(hipGraphNode_t node)
rocm.bindings.hip.hipGraphClone(originalGraph)#

Clones a graph.

Args:
originalGraph (ihipGraph/object) – IN:
  • original graph to clone from.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphClone(hipGraph_t * pGraphClone, hipGraph_t originalGraph)
rocm.bindings.hip.hipGraphNodeFindInClone(originalNode, clonedGraph)#

Finds a cloned version of a node.

Args:
originalNode (hipGraphNode/object) – IN:
  • original node handle.

clonedGraph (ihipGraph/object) – IN:
  • Cloned graph to query.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphNodeFindInClone(hipGraphNode_t * pNode, hipGraphNode_t originalNode, hipGraph_t clonedGraph)
rocm.bindings.hip.hipGraphInstantiate(graph, bufferSize)#

Creates an executable graph from a graph

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to instantiate.

bufferSize (int) – OUT:
  • Size of the log buffer.

Returns:

A tuple of size 4 that contains (in that order):

C signature

hipError_t hipGraphInstantiate(hipGraphExec_t * pGraphExec, hipGraph_t graph, hipGraphNode_t * pErrorNode, char * pLogBuffer, size_t bufferSize)
rocm.bindings.hip.hipGraphInstantiateWithFlags(graph, flags)#

Creates an executable graph from a graph.

Warning:

This API does not support any of flag and is behaving as hipGraphInstantiate.

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to instantiate.

flags (int) – IN:
  • Flags to control instantiation.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphInstantiateWithFlags(hipGraphExec_t * pGraphExec, hipGraph_t graph, unsigned long long flags)
rocm.bindings.hip.hipGraphInstantiateWithParams(graph, instantiateParams)#

Creates an executable graph from a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to instantiate.

instantiateParams (hipGraphInstantiateParams/object) – IN:
  • Graph instantiation Params

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphInstantiateWithParams(hipGraphExec_t * pGraphExec, hipGraph_t graph, hipGraphInstantiateParams * instantiateParams)
rocm.bindings.hip.hipGraphLaunch(graphExec, stream)#

Launches an executable graph in the specified stream.

Args:
graphExec (hipGraphExec/object) – IN:
  • Instance of executable graph to launch.

stream (ihipStream_t/object) – IN:
  • Instance of stream in which to launch executable graph.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphLaunch(hipGraphExec_t graphExec, hipStream_t stream)
rocm.bindings.hip.hipGraphUpload(graphExec, stream)#

Uploads an executable graph to a stream

Args:
graphExec (hipGraphExec/object) – IN:
  • Instance of executable graph to be uploaded.

stream (ihipStream_t/object) – IN:
  • Instance of stream to which the executable graph is uploaded to.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphUpload(hipGraphExec_t graphExec, hipStream_t stream)
rocm.bindings.hip.hipGraphAddNode(graph, pDependencies, numDependencies, nodeParams)#

Creates a kernel execution node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to add the created node to.

pDependencies (Pointer/object) – IN:
  • Pointer to the dependencies on the kernel execution node.

numDependencies (int) – IN:
  • Number of dependencies.

nodeParams (hipGraphNodeParams/object) – IN:
  • Pointer to the node parameters.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, hipGraphNodeParams * nodeParams)
rocm.bindings.hip.hipGraphExecGetFlags(graphExec)#

Return the flags of an executable graph.

Args:
graphExec (hipGraphExec/object) – IN:
  • Executable graph to get the flags from.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphExecGetFlags(hipGraphExec_t graphExec, unsigned long long * flags)
rocm.bindings.hip.hipGraphNodeSetParams(node, nodeParams)#

Updates parameters of a graph’s node.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters for.

nodeParams (hipGraphNodeParams/object) – IN:
  • Pointer to the parameters to be set.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphNodeSetParams(hipGraphNode_t node, hipGraphNodeParams * nodeParams)
rocm.bindings.hip.hipGraphExecNodeSetParams(graphExec, node, nodeParams)#

Updates parameters of an executable graph’s node.

Args:
graphExec (hipGraphExec/object) – IN:
  • Instance of the executable graph.

node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters to.

nodeParams (hipGraphNodeParams/object) – IN:
  • Pointer to the parameters to be set.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecNodeSetParams(hipGraphExec_t graphExec, hipGraphNode_t node, hipGraphNodeParams * nodeParams)
rocm.bindings.hip.hipGraphExecDestroy(graphExec)#

Destroys an executable graph

Args:
graphExec (hipGraphExec/object) – IN:
  • Instance of executable graph to destroy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecDestroy(hipGraphExec_t graphExec)
rocm.bindings.hip.hipGraphExecUpdate(hGraphExec, hGraph, hErrorNode_out)#

Check whether an executable graph can be updated with a graph and perform the update if * possible.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • instance of executable graph to update.

hGraph (ihipGraph/object) – IN:
  • graph that contains the updated parameters.

hErrorNode_out (Pointer/object) – IN:
  • node which caused the permissibility check to forbid the update.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphExecUpdate(hipGraphExec_t hGraphExec, hipGraph_t hGraph, hipGraphNode_t * hErrorNode_out, hipGraphExecUpdateResult * updateResult_out)
rocm.bindings.hip.hipGraphAddKernelNode(graph, pDependencies, numDependencies, pNodeParams)#

Creates a kernel execution node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to add the created node to.

pDependencies (Pointer/object) – IN:
  • Pointer to the dependencies of the kernel execution node.

numDependencies (int) – IN:
  • The number of the dependencies.

pNodeParams (hipKernelNodeParams/object) – IN:
  • Pointer to the parameters of the kernel execution node.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddKernelNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, const hipKernelNodeParams * pNodeParams)
rocm.bindings.hip.hipGraphKernelNodeGetParams(node)#

Gets kernel node’s parameters.

Args:
node (hipGraphNode/object) – IN:
  • instance of the node to get parameters from.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphKernelNodeGetParams(hipGraphNode_t node, hipKernelNodeParams * pNodeParams)
rocm.bindings.hip.hipGraphKernelNodeSetParams(node, pNodeParams)#

Sets a kernel node’s parameters.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

pNodeParams (hipKernelNodeParams/object) – IN:
  • const pointer to the parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphKernelNodeSetParams(hipGraphNode_t node, const hipKernelNodeParams * pNodeParams)
rocm.bindings.hip.hipGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams)#

Sets the parameters for a kernel node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • Instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

pNodeParams (hipKernelNodeParams/object) – IN:
  • const pointer to the kernel node parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipKernelNodeParams * pNodeParams)
rocm.bindings.hip.hipDrvGraphAddMemcpyNode(hGraph, dependencies, numDependencies, copyParams, ctx)#

Creates a memcpy node and adds it to a graph.

Args:
hGraph (ihipGraph/object) – IN:
  • Instance of graph to add the created node to.

dependencies (Pointer/object) – IN:
  • const pointer to the dependencies of the memcpy execution node.

numDependencies (int) – IN:
  • The number of dependencies.

copyParams (HIP_MEMCPY3D/object) – IN:
  • const pointer to the parameters for the memory copy.

ctx (ihipCtx_t/object) – IN:
  • context related to current device.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDrvGraphAddMemcpyNode(hipGraphNode_t * phGraphNode, hipGraph_t hGraph, const hipGraphNode_t * dependencies, size_t numDependencies, const HIP_MEMCPY3D * copyParams, hipCtx_t ctx)
rocm.bindings.hip.hipGraphAddMemcpyNode(graph, pDependencies, numDependencies, pCopyParams)#

Creates a memcpy node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to add the created node to.

pDependencies (Pointer/object) – IN:
  • const pointer to the dependencies of the memcpy execution node.

numDependencies (int) – IN:
  • The number of dependencies.

pCopyParams (hipMemcpy3DParms/object) – IN:
  • const pointer to the parameters for the memory copy.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddMemcpyNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, const hipMemcpy3DParms * pCopyParams)
rocm.bindings.hip.hipGraphMemcpyNodeGetParams(node)#

Gets a memcpy node’s parameters.

Args:
node (hipGraphNode/object) – IN:
  • instance of the node to get parameters from.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphMemcpyNodeGetParams(hipGraphNode_t node, hipMemcpy3DParms * pNodeParams)
rocm.bindings.hip.hipGraphMemcpyNodeSetParams(node, pNodeParams)#

Sets a memcpy node’s parameters.

Args:
node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

pNodeParams (hipMemcpy3DParms/object) – IN:
  • const pointer to the parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphMemcpyNodeSetParams(hipGraphNode_t node, const hipMemcpy3DParms * pNodeParams)
rocm.bindings.hip.hipGraphKernelNodeSetAttribute(hNode, attr, value)#

Sets a node’s attribute.

Args:
hNode (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

attr (hipLaunchAttributeID) – IN:
  • The attribute type to be set.

value (hipLaunchAttributeValue/object) – IN:
  • const pointer to the parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphKernelNodeSetAttribute(hipGraphNode_t hNode, hipLaunchAttributeID attr, const hipLaunchAttributeValue * value)
rocm.bindings.hip.hipGraphKernelNodeGetAttribute(hNode, attr, value)#

Gets a node’s attribute.

Args:
hNode (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

attr (hipLaunchAttributeID) – IN:
  • The attribute type to be set.

value (hipLaunchAttributeValue/object) – IN:
  • const pointer to the parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphKernelNodeGetAttribute(hipGraphNode_t hNode, hipLaunchAttributeID attr, hipLaunchAttributeValue * value)
rocm.bindings.hip.hipGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams)#

Sets the parameters of a memcpy node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • Instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

pNodeParams (hipMemcpy3DParms/object) – IN:
  • const pointer to the kernel node parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecMemcpyNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, hipMemcpy3DParms * pNodeParams)
rocm.bindings.hip.hipGraphAddMemcpyNode1D(graph, pDependencies, numDependencies, dst, src, count, kind)#

Creates a 1D memcpy node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to add the created node to.

pDependencies (Pointer/object) – IN:
  • const pointer to the dependencies of the memcpy execution node.

numDependencies (int) – IN:
  • The number of dependencies.

dst (Pointer/object) – IN:
  • Pointer to memory address of the destination.

src (Pointer/object) – IN:
  • Pointer to memory address of the source.

count (int) – IN:
  • Size of the memory to copy.

kind (hipMemcpyKind) – IN:
  • Type of memory copy.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddMemcpyNode1D(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, void * dst, const void * src, size_t count, hipMemcpyKind kind)
rocm.bindings.hip.hipGraphMemcpyNodeSetParams1D(node, dst, src, count, kind)#

Sets a memcpy node’s parameters to perform a 1-dimensional copy.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

dst (Pointer/object) – IN:
  • Pointer to memory address of the destination.

src (Pointer/object) – IN:
  • Pointer to memory address of the source.

count (int) – IN:
  • Size of the memory to copy.

kind (hipMemcpyKind) – IN:
  • Type of memory copy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphMemcpyNodeSetParams1D(hipGraphNode_t node, void * dst, const void * src, size_t count, hipMemcpyKind kind)
rocm.bindings.hip.hipGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind)#

Sets the parameters for a memcpy node in the given graphExec to perform a 1-dimensional copy.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • Instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

dst (Pointer/object) – IN:
  • Pointer to memory address of the destination.

src (Pointer/object) – IN:
  • Pointer to memory address of the source.

count (int) – IN:
  • Size of the memory to copy.

kind (hipMemcpyKind) – IN:
  • Type of memory copy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecMemcpyNodeSetParams1D(hipGraphExec_t hGraphExec, hipGraphNode_t node, void * dst, const void * src, size_t count, hipMemcpyKind kind)
rocm.bindings.hip.hipGraphAddMemcpyNodeFromSymbol(graph, pDependencies, numDependencies, dst, symbol, count, offset, kind)#

Creates a memcpy node to copy from a symbol on the device and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to add the created node to.

pDependencies (Pointer/object) – IN:
  • const pointer to the dependencies of the memcpy execution node.

numDependencies (int) – IN:
  • Number of the dependencies.

dst (Pointer/object) – IN:
  • Pointer to memory address of the destination.

symbol (Pointer/object) – IN:
  • Device symbol address.

count (int) – IN:
  • Size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • Type of memory copy.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddMemcpyNodeFromSymbol(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, void * dst, const void * symbol, size_t count, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipGraphMemcpyNodeSetParamsFromSymbol(node, dst, symbol, count, offset, kind)#

Sets a memcpy node’s parameters to copy from a symbol on the device.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

dst (Pointer/object) – IN:
  • Pointer to memory address of the destination.

symbol (Pointer/object) – IN:
  • Device symbol address.

count (int) – IN:
  • Size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • Type of memory copy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphMemcpyNodeSetParamsFromSymbol(hipGraphNode_t node, void * dst, const void * symbol, size_t count, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipGraphExecMemcpyNodeSetParamsFromSymbol(hGraphExec, node, dst, symbol, count, offset, kind)#

Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the * device.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • Instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

dst (Pointer/object) – IN:
  • Pointer to memory address of the destination.

symbol (Pointer/object) – IN:
  • Device symbol address.

count (int) – IN:
  • Size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • Type of memory copy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecMemcpyNodeSetParamsFromSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, void * dst, const void * symbol, size_t count, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipGraphAddMemcpyNodeToSymbol(graph, pDependencies, numDependencies, symbol, src, count, offset, kind)#

Creates a memcpy node to copy to a symbol on the device and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of graph to add the created node to.

pDependencies (Pointer/object) – IN:
  • const pointer to the dependencies on the memcpy execution node.

numDependencies (int) – IN:
  • Number of dependencies.

symbol (Pointer/object) – IN:
  • Device symbol address.

src (Pointer/object) – IN:
  • Pointer to memory address of the src.

count (int) – IN:
  • Size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • Type of memory copy.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddMemcpyNodeToSymbol(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, const void * symbol, const void * src, size_t count, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipGraphMemcpyNodeSetParamsToSymbol(node, symbol, src, count, offset, kind)#

Sets a memcpy node’s parameters to copy to a symbol on the device.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

symbol (Pointer/object) – IN:
  • Device symbol address.

src (Pointer/object) – IN:
  • Pointer to memory address of the src.

count (int) – IN:
  • Size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • Type of memory copy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphMemcpyNodeSetParamsToSymbol(hipGraphNode_t node, const void * symbol, const void * src, size_t count, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipGraphExecMemcpyNodeSetParamsToSymbol(hGraphExec, node, symbol, src, count, offset, kind)#

Sets the parameters for a memcpy node in the given graphExec to copy to a symbol on the device.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • Instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

symbol (Pointer/object) – IN:
  • Device symbol address.

src (Pointer/object) – IN:
  • Pointer to memory address of the src.

count (int) – IN:
  • Size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • Type of memory copy.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecMemcpyNodeSetParamsToSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node, const void * symbol, const void * src, size_t count, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipGraphAddMemsetNode(graph, pDependencies, numDependencies, pMemsetParams)#

Creates a memset node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph to add the created node to.

pDependencies (Pointer/object) – IN:
  • const pointer to the dependencies on the memset execution node.

numDependencies (int) – IN:
  • Number of dependencies.

pMemsetParams (hipMemsetParams/object) – IN:
  • const pointer to the parameters for the memory set.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddMemsetNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, const hipMemsetParams * pMemsetParams)
rocm.bindings.hip.hipGraphMemsetNodeGetParams(node)#

Gets a memset node’s parameters.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to get parameters of.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphMemsetNodeGetParams(hipGraphNode_t node, hipMemsetParams * pNodeParams)
rocm.bindings.hip.hipGraphMemsetNodeSetParams(node, pNodeParams)#

Sets a memset node’s parameters.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

pNodeParams (hipMemsetParams/object) – IN:
  • Pointer to the parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const hipMemsetParams * pNodeParams)
rocm.bindings.hip.hipGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams)#

Sets the parameters for a memset node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • Instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

pNodeParams (hipMemsetParams/object) – IN:
  • Pointer to the parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipMemsetParams * pNodeParams)
rocm.bindings.hip.hipGraphAddHostNode(graph, pDependencies, numDependencies, pNodeParams)#

Creates a host execution node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph to add the created node to.

pDependencies (Pointer/object) – IN:
  • const pointer to the dependencies of the memset execution node.

numDependencies (int) – IN:
  • Number of dependencies.

pNodeParams (hipHostNodeParams/object) – IN:
  • Pointer to the parameters.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddHostNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, const hipHostNodeParams * pNodeParams)
rocm.bindings.hip.hipGraphHostNodeGetParams(node)#

Returns a host node’s parameters.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to get parameters of.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphHostNodeGetParams(hipGraphNode_t node, hipHostNodeParams * pNodeParams)
rocm.bindings.hip.hipGraphHostNodeSetParams(node, pNodeParams)#

Sets a host node’s parameters.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

pNodeParams (hipHostNodeParams/object) – IN:
  • Pointer to the parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphHostNodeSetParams(hipGraphNode_t node, const hipHostNodeParams * pNodeParams)
rocm.bindings.hip.hipGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams)#

Sets the parameters for a host node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • Instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • Instance of the node to set parameters of.

pNodeParams (hipHostNodeParams/object) – IN:
  • Pointer to the parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecHostNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipHostNodeParams * pNodeParams)
rocm.bindings.hip.hipGraphAddChildGraphNode(graph, pDependencies, numDependencies, childGraph)#

Creates a child graph node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph to add the created node.

pDependencies (Pointer/object) – IN:
  • const pointer to the dependencies of the memset execution node.

numDependencies (int) – IN:
  • Number of dependencies.

childGraph (ihipGraph/object) – IN:
  • Graph to clone into this node

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddChildGraphNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, hipGraph_t childGraph)
rocm.bindings.hip.hipGraphChildGraphNodeGetGraph(node)#

Gets a handle to the embedded graph of a child graph node.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to get child graph of.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t * pGraph)
rocm.bindings.hip.hipGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph)#

Updates node parameters in the child graph node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • node from the graph which was used to instantiate graphExec.

childGraph (ihipGraph/object) – IN:
  • child graph with updated parameters.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecChildGraphNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, hipGraph_t childGraph)
rocm.bindings.hip.hipGraphAddEmptyNode(graph, pDependencies, numDependencies)#

Creates an empty node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph the node is added to.

pDependencies (Pointer/object) – IN:
  • const pointer to the node dependencies.

numDependencies (int) – IN:
  • Number of dependencies.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddEmptyNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies)
rocm.bindings.hip.hipGraphAddEventRecordNode(graph, pDependencies, numDependencies, event)#

Creates an event record node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph the node is added to.

pDependencies (Pointer/object) – IN:
  • const pointer to the node dependencies.

numDependencies (int) – IN:
  • Number of dependencies.

event (ihipEvent_t/object) – IN:
  • Event of the node.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddEventRecordNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, hipEvent_t event)
rocm.bindings.hip.hipGraphEventRecordNodeGetEvent(node)#

Returns the event associated with an event record node.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to get event of.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphEventRecordNodeGetEvent(hipGraphNode_t node, hipEvent_t * event_out)
rocm.bindings.hip.hipGraphEventRecordNodeSetEvent(node, event)#

Sets an event record node’s event.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to set event to.

event (ihipEvent_t/object) – IN:
  • Pointer to the event.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphEventRecordNodeSetEvent(hipGraphNode_t node, hipEvent_t event)
rocm.bindings.hip.hipGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)#

Sets the event for an event record node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

hNode (hipGraphNode/object) – IN:
  • node from the graph which was used to instantiate graphExec.

event (ihipEvent_t/object) – IN:
  • pointer to the event.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecEventRecordNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, hipEvent_t event)
rocm.bindings.hip.hipGraphAddEventWaitNode(graph, pDependencies, numDependencies, event)#

Creates an event wait node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph the node to be added.

pDependencies (Pointer/object) – IN:
  • const pointer to the node dependencies.

numDependencies (int) – IN:
  • Number of dependencies.

event (ihipEvent_t/object) – IN:
  • Event for the node.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddEventWaitNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, hipEvent_t event)
rocm.bindings.hip.hipGraphEventWaitNodeGetEvent(node)#

Returns the event associated with an event wait node.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to get event of.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphEventWaitNodeGetEvent(hipGraphNode_t node, hipEvent_t * event_out)
rocm.bindings.hip.hipGraphEventWaitNodeSetEvent(node, event)#

Sets an event wait node’s event.

Args:
node (hipGraphNode/object) – IN:
  • Instance of the node to set event of.

event (ihipEvent_t/object) – IN:
  • Pointer to the event.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphEventWaitNodeSetEvent(hipGraphNode_t node, hipEvent_t event)
rocm.bindings.hip.hipGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)#

Sets the event for an event record node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

hNode (hipGraphNode/object) – IN:
  • node from the graph which was used to instantiate graphExec.

event (ihipEvent_t/object) – IN:
  • pointer to the event.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, hipEvent_t event)
rocm.bindings.hip.hipGraphAddMemAllocNode(graph, pDependencies, numDependencies, pNodeParams)#

Creates a memory allocation node and adds it to a graph

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph node to be added

pDependencies (Pointer/object) – IN:
  • Const pointer to the node dependencies

numDependencies (int) – IN:
  • The number of dependencies

pNodeParams (hipMemAllocNodeParams/object) – IN,OUT:
  • Node parameters for memory allocation, returns a pointer to the

allocated memory.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddMemAllocNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, hipMemAllocNodeParams * pNodeParams)
rocm.bindings.hip.hipGraphMemAllocNodeGetParams(node)#

Returns parameters for memory allocation node

Args:
node (hipGraphNode/object) – IN:
  • Memory allocation node to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphMemAllocNodeGetParams(hipGraphNode_t node, hipMemAllocNodeParams * pNodeParams)
rocm.bindings.hip.hipGraphAddMemFreeNode(graph, pDependencies, numDependencies, dev_ptr)#

Creates a memory free node and adds it to a graph

Args:
graph (ihipGraph/object) – IN:
  • Instance of the graph node to be added

pDependencies (Pointer/object) – IN:
  • Const pointer to the node dependencies

numDependencies (int) – IN:
  • The number of dependencies

dev_ptr (Pointer/object) – IN:
  • Pointer to the memory to be freed

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddMemFreeNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, void * dev_ptr)
rocm.bindings.hip.hipGraphMemFreeNodeGetParams(node, dev_ptr)#

Returns parameters for memory free node

Args:
node (hipGraphNode/object) – IN:
  • Memory free node to query

dev_ptr (Pointer/object) – OUT:
  • Device pointer of the specified memory free node

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphMemFreeNodeGetParams(hipGraphNode_t node, void * dev_ptr)
rocm.bindings.hip.hipDeviceGetGraphMemAttribute(device, attr, value)#

Get the mem attribute for graphs.

Args:
device (int) – IN:
  • Device to get attributes from

attr (hipGraphMemAttributeType) – IN:
  • Attribute type to be queried

value (Pointer/object) – OUT:
  • Value of the queried attribute

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceGetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void * value)
rocm.bindings.hip.hipDeviceSetGraphMemAttribute(device, attr, value)#

Set the mem attribute for graphs.

Args:
device (int) – IN:
  • Device to set attribute of.

attr (hipGraphMemAttributeType) – IN:
  • Attribute type to be set.

value (Pointer/object) – IN:
  • Value of the attribute.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceSetGraphMemAttribute(int device, hipGraphMemAttributeType attr, void * value)
rocm.bindings.hip.hipDeviceGraphMemTrim(device)#

Free unused memory reserved for graphs on a specific device and return it back to the OS.

Args:
device (int) – IN:
  • Device for which memory should be trimmed

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDeviceGraphMemTrim(int device)
rocm.bindings.hip.hipUserObjectCreate(ptr, destroy, initialRefcount, flags)#

Create an instance of userObject to manage lifetime of a resource.

Args:
ptr (Pointer/object) – IN:
  • pointer to pass to destroy function.

destroy (hipHostFn_t/object) – IN:
  • destroy callback to remove resource.

initialRefcount (int) – IN:
  • reference to resource.

flags (int) – IN:
  • flags passed to API.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipUserObjectCreate(hipUserObject_t * object_out, void * ptr, hipHostFn_t destroy, unsigned int initialRefcount, unsigned int flags)
rocm.bindings.hip.hipUserObjectRelease(object, count)#

Release number of references to resource.

Args:
object (hipUserObject/object) – IN:
  • pointer to instace of userobj.

count (int) – IN:
  • reference to resource to be retained.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipUserObjectRelease(hipUserObject_t object, unsigned int count)
rocm.bindings.hip.hipUserObjectRetain(object, count)#

Retain number of references to resource.

Args:
object (hipUserObject/object) – IN:
  • pointer to instace of userobj.

count (int) – IN:
  • reference to resource to be retained.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipUserObjectRetain(hipUserObject_t object, unsigned int count)
rocm.bindings.hip.hipGraphRetainUserObject(graph, object, count, flags)#

Retain user object for graphs.

Args:
graph (ihipGraph/object) – IN:
  • pointer to graph to retain the user object for.

object (hipUserObject/object) – IN:
  • pointer to instace of userobj.

count (int) – IN:
  • reference to resource to be retained.

flags (int) – IN:
  • flags passed to API.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphRetainUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count, unsigned int flags)
rocm.bindings.hip.hipGraphReleaseUserObject(graph, object, count)#

Release user object from graphs.

Args:
graph (ihipGraph/object) – IN:
  • pointer to graph to retain the user object for.

object (hipUserObject/object) – IN:
  • pointer to instace of userobj.

count (int) – IN:
  • reference to resource to be retained.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphReleaseUserObject(hipGraph_t graph, hipUserObject_t object, unsigned int count)
rocm.bindings.hip.hipGraphDebugDotPrint(graph, path, flags)#

Write a DOT file describing graph structure.

Args:
graph (ihipGraph/object) – IN:
  • graph object for which DOT file has to be generated.

path (CStr/object) – IN:
  • path to write the DOT file.

flags (int) – IN:
  • Flags from hipGraphDebugDotFlags to get additional node information.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphDebugDotPrint(hipGraph_t graph, const char * path, unsigned int flags)
rocm.bindings.hip.hipGraphKernelNodeCopyAttributes(hSrc)#

Copies attributes from source node to destination node.

Copies attributes from source node to destination node. Both node must have the same context.

Args:
hSrc (hipGraphNode/object) – IN:
  • Source node.

For list of attributes see ::hipKernelNodeAttrID.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphKernelNodeCopyAttributes(hipGraphNode_t hSrc, hipGraphNode_t hDst)
rocm.bindings.hip.hipGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)#

Enables or disables the specified node in the given graphExec

Sets hNode to be either enabled or disabled. Disabled nodes are functionally equivalent to empty nodes until they are reenabled. Existing node parameters are not affected by disabling/enabling the node.

The node is identified by the corresponding hNode in the non-executable graph, from which the executable graph was instantiated.

hNode must not have been removed from the original graph.

Note:

Currently only kernel, memset and memcpy nodes are supported.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • The executable graph in which to set the specified node.

hNode (hipGraphNode/object) – IN:
  • Node from the graph from which graphExec was instantiated.

isEnabled (int) – IN:
  • Node is enabled if != 0, otherwise the node is disabled.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphNodeSetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, unsigned int isEnabled)
rocm.bindings.hip.hipGraphNodeGetEnabled(hGraphExec, hNode)#

Query whether a node in the given graphExec is enabled

Sets isEnabled to 1 if hNode is enabled, or 0 if it is disabled.

The node is identified by the corresponding node in the non-executable graph, from which the executable graph was instantiated.

hNode must not have been removed from the original graph.

Note:

Currently only kernel, memset and memcpy nodes are supported.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • The executable graph in which to set the specified node.

hNode (hipGraphNode/object) – IN:
  • Node from the graph from which graphExec was instantiated.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphNodeGetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, unsigned int * isEnabled)
rocm.bindings.hip.hipGraphAddExternalSemaphoresWaitNode(graph, pDependencies, numDependencies, nodeParams)#

Creates a external semaphor wait node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • instance of the graph to add the created node.

pDependencies (Pointer/object) – IN:
  • const pointer to the dependencies on the memset execution node.

numDependencies (int) – IN:
  • the number of the dependencies.

nodeParams (hipExternalSemaphoreWaitNodeParams/object) – IN:

-pointer to the parameters.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddExternalSemaphoresWaitNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, const hipExternalSemaphoreWaitNodeParams * nodeParams)
rocm.bindings.hip.hipGraphAddExternalSemaphoresSignalNode(graph, pDependencies, numDependencies, nodeParams)#

Creates a external semaphor signal node and adds it to a graph.

Args:
graph (ihipGraph/object) – IN:
  • instance of the graph to add the created node.

pDependencies (Pointer/object) – IN:
  • const pointer to the dependencies on the memset execution node.

numDependencies (int) – IN:
  • the number of the dependencies.

nodeParams (hipExternalSemaphoreSignalNodeParams/object) – IN:

-pointer to the parameters.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphAddExternalSemaphoresSignalNode(hipGraphNode_t * pGraphNode, hipGraph_t graph, const hipGraphNode_t * pDependencies, size_t numDependencies, const hipExternalSemaphoreSignalNodeParams * nodeParams)
rocm.bindings.hip.hipGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)#

Updates node parameters in the external semaphore signal node.

Args:
hNode (hipGraphNode/object) – IN:
  • Node from the graph from which graphExec was instantiated.

nodeParams (hipExternalSemaphoreSignalNodeParams/object) – IN:
  • Pointer to the params to be set.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExternalSemaphoresSignalNodeSetParams(hipGraphNode_t hNode, const hipExternalSemaphoreSignalNodeParams * nodeParams)
rocm.bindings.hip.hipGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)#

Updates node parameters in the external semaphore wait node.

Args:
hNode (hipGraphNode/object) – IN:
  • Node from the graph from which graphExec was instantiated.

nodeParams (hipExternalSemaphoreWaitNodeParams/object) – IN:
  • Pointer to the params to be set.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExternalSemaphoresWaitNodeSetParams(hipGraphNode_t hNode, const hipExternalSemaphoreWaitNodeParams * nodeParams)
rocm.bindings.hip.hipGraphExternalSemaphoresSignalNodeGetParams(hNode)#

Returns external semaphore signal node params.

Args:
hNode (hipGraphNode/object) – IN:
  • Node from the graph from which graphExec was instantiated.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphExternalSemaphoresSignalNodeGetParams(hipGraphNode_t hNode, hipExternalSemaphoreSignalNodeParams * params_out)
rocm.bindings.hip.hipGraphExternalSemaphoresWaitNodeGetParams(hNode)#

Returns external semaphore wait node params.

Args:
hNode (hipGraphNode/object) – IN:
  • Node from the graph from which graphExec was instantiated.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphExternalSemaphoresWaitNodeGetParams(hipGraphNode_t hNode, hipExternalSemaphoreWaitNodeParams * params_out)
rocm.bindings.hip.hipGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)#

Updates node parameters in the external semaphore signal node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • The executable graph in which to set the specified node.

hNode (hipGraphNode/object) – IN:
  • Node from the graph from which graphExec was instantiated.

nodeParams (hipExternalSemaphoreSignalNodeParams/object) – IN:
  • Pointer to the params to be set.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecExternalSemaphoresSignalNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const hipExternalSemaphoreSignalNodeParams * nodeParams)
rocm.bindings.hip.hipGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)#

Updates node parameters in the external semaphore wait node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • The executable graph in which to set the specified node.

hNode (hipGraphNode/object) – IN:
  • Node from the graph from which graphExec was instantiated.

nodeParams (hipExternalSemaphoreWaitNodeParams/object) – IN:
  • Pointer to the params to be set.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphExecExternalSemaphoresWaitNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const hipExternalSemaphoreWaitNodeParams * nodeParams)
rocm.bindings.hip.hipDrvGraphMemcpyNodeGetParams(hNode)#

Gets a memcpy node’s parameters.

Args:
hNode (hipGraphNode/object) – IN:
  • instance of the node to get parameters from.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDrvGraphMemcpyNodeGetParams(hipGraphNode_t hNode, HIP_MEMCPY3D * nodeParams)
rocm.bindings.hip.hipDrvGraphMemcpyNodeSetParams(hNode)#

Sets a memcpy node’s parameters.

Args:
hNode (hipGraphNode/object) – IN:
  • instance of the node to Set parameters for.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDrvGraphMemcpyNodeSetParams(hipGraphNode_t hNode, const HIP_MEMCPY3D * nodeParams)
rocm.bindings.hip.hipDrvGraphAddMemsetNode(hGraph, dependencies, numDependencies, memsetParams, ctx)#

Creates a memset node and adds it to a graph.

Args:
hGraph (ihipGraph/object) – IN:
  • instance of graph to add the created node to.

dependencies (Pointer/object) – IN:
  • const pointer to the dependencies on the memset execution node.

numDependencies (int) – IN:
  • number of the dependencies.

memsetParams (hipMemsetParams/object) – IN:
  • const pointer to the parameters for the memory set.

ctx (ihipCtx_t/object) – IN:
  • cotext related to current device.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDrvGraphAddMemsetNode(hipGraphNode_t * phGraphNode, hipGraph_t hGraph, const hipGraphNode_t * dependencies, size_t numDependencies, const hipMemsetParams * memsetParams, hipCtx_t ctx)
rocm.bindings.hip.hipDrvGraphAddMemFreeNode(hGraph, dependencies, numDependencies, dptr)#

Creates a memory free node and adds it to a graph

Args:
hGraph (ihipGraph/object) – IN:
  • Instance of the graph the node to be added

dependencies (Pointer/object) – IN:
  • Const pointer to the node dependencies

numDependencies (int) – IN:
  • The number of dependencies

dptr (Pointer/object) – IN:
  • Pointer to the memory to be freed

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipDrvGraphAddMemFreeNode(hipGraphNode_t * phGraphNode, hipGraph_t hGraph, const hipGraphNode_t * dependencies, size_t numDependencies, hipDeviceptr_t dptr)
rocm.bindings.hip.hipDrvGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)#

Sets the parameters for a memcpy node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

hNode (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

copyParams (HIP_MEMCPY3D/object) – IN:
  • const pointer to the memcpy node params.

ctx (ihipCtx_t/object) – IN:
  • cotext related to current device.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDrvGraphExecMemcpyNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const HIP_MEMCPY3D * copyParams, hipCtx_t ctx)
rocm.bindings.hip.hipDrvGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)#

Sets the parameters for a memset node in the given graphExec.

Args:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

hNode (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

memsetParams (hipMemsetParams/object) – IN:
  • pointer to the parameters.

ctx (ihipCtx_t/object) – IN:
  • cotext related to current device.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDrvGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t hNode, const hipMemsetParams * memsetParams, hipCtx_t ctx)
rocm.bindings.hip.hipMemAddressFree(devPtr, size)#

Frees an address range reservation made via hipMemAddressReserve

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
devPtr (Pointer/object) – IN:
  • starting address of the range.

size (int) – IN:
  • size of the range.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemAddressFree(void * devPtr, size_t size)
rocm.bindings.hip.hipMemAddressReserve(size, alignment, addr, flags)#

Reserves an address range

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
size (int) – IN:
  • size of the reservation.

alignment (int) – IN:
  • alignment of the address.

addr (Pointer/object) – IN:
  • requested starting address of the range.

flags (int) – IN:
  • currently unused, must be zero.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemAddressReserve(void ** ptr, size_t size, size_t alignment, void * addr, unsigned long long flags)
rocm.bindings.hip.hipMemCreate(size, prop, flags)#

Creates a memory handle for the allocation described by the properties and given size

This API creates a memory allocation on the target device specified through the prop structure. The prop allocation type must be specified as either hipMemAllocationTypePinned or hipMemAllocationTypeUncached. The prop location type must be specified as hipMemLocationTypeDevice or hipMemLocationTypeHost. Any other value results in hipErrorInvalidValue.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
size (int) – IN:
  • size of the allocation.

prop (hipMemAllocationProp/object) – IN:
  • properties of the allocation.

flags (int) – IN:
  • currently unused, must be zero.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemCreate(hipMemGenericAllocationHandle_t * handle, size_t size, const hipMemAllocationProp * prop, unsigned long long flags)
rocm.bindings.hip.hipMemExportToShareableHandle(shareableHandle, handle, handleType, flags)#

Exports an allocation to a requested shareable handle type.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
shareableHandle (Pointer/object) – OUT:
  • value of the returned handle.

handle (ihipMemGenericAllocationHandle/object) – IN:
  • handle to share.

handleType (hipMemAllocationHandleType) – IN:
  • type of the shareable handle.

flags (int) – IN:
  • currently unused, must be zero.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemExportToShareableHandle(void * shareableHandle, hipMemGenericAllocationHandle_t handle, hipMemAllocationHandleType handleType, unsigned long long flags)
rocm.bindings.hip.hipMemGetAccess(location, ptr)#

Get the access flags set for the given location and ptr.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
location (hipMemLocation/object) – IN:
  • target location.

ptr (Pointer/object) – IN:
  • address to check the access flags.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemGetAccess(unsigned long long * flags, const hipMemLocation * location, void * ptr)
rocm.bindings.hip.hipMemGetAllocationGranularity(prop, option)#

Calculates either the minimal or recommended granularity.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
prop (hipMemAllocationProp/object) – IN:
  • location properties.

option (hipMemAllocationGranularity_flags) – IN:
  • determines which granularity to return.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemGetAllocationGranularity(size_t * granularity, const hipMemAllocationProp * prop, hipMemAllocationGranularity_flags option)
rocm.bindings.hip.hipMemGetAllocationPropertiesFromHandle(handle)#

Retrieve the property structure of the given handle.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
handle (ihipMemGenericAllocationHandle/object) – IN:
  • handle to perform the query on.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemGetAllocationPropertiesFromHandle(hipMemAllocationProp * prop, hipMemGenericAllocationHandle_t handle)
rocm.bindings.hip.hipMemImportFromShareableHandle(osHandle, shHandleType)#

Imports an allocation from a requested shareable handle type.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
osHandle (Pointer/object) – IN:
  • shareable handle representing the memory allocation.

shHandleType (hipMemAllocationHandleType) – IN:
  • handle type.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemImportFromShareableHandle(hipMemGenericAllocationHandle_t * handle, void * osHandle, hipMemAllocationHandleType shHandleType)
rocm.bindings.hip.hipMemMap(ptr, size, offset, handle, flags)#

Maps an allocation handle to a reserved virtual address range.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
ptr (Pointer/object) – IN:
  • address where the memory will be mapped.

size (int) – IN:
  • size of the mapping.

offset (int) – IN:
  • offset into the memory, currently must be zero.

handle (ihipMemGenericAllocationHandle/object) – IN:
  • memory allocation to be mapped.

flags (int) – IN:
  • currently unused, must be zero.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemMap(void * ptr, size_t size, size_t offset, hipMemGenericAllocationHandle_t handle, unsigned long long flags)
rocm.bindings.hip.hipMemMapArrayAsync(mapInfoList, count, stream)#

Maps or unmaps subregions of sparse HIP arrays and sparse HIP mipmapped arrays.

Args:
mapInfoList (hipArrayMapInfo/object) – IN:
  • list of hipArrayMapInfo.

count (int) – IN:
  • number of hipArrayMapInfo in mapInfoList.

stream (ihipStream_t/object) – IN:
  • stream identifier for the stream to use for map or unmap operations.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemMapArrayAsync(hipArrayMapInfo * mapInfoList, unsigned int count, hipStream_t stream)
rocm.bindings.hip.hipMemRelease(handle)#

Release a memory handle representing a memory allocation which was previously allocated through hipMemCreate.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
handle (ihipMemGenericAllocationHandle/object) – IN:
  • handle of the memory allocation.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemRelease(hipMemGenericAllocationHandle_t handle)
rocm.bindings.hip.hipMemRetainAllocationHandle(addr)#

Returns the allocation handle of the backing memory allocation given the address.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
addr (Pointer/object) – IN:
  • address to look up.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipMemRetainAllocationHandle(hipMemGenericAllocationHandle_t * handle, void * addr)
rocm.bindings.hip.hipMemSetAccess(ptr, size, desc, count)#

Set the access flags for each location specified in desc for the given virtual address range.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
ptr (Pointer/object) – IN:
  • starting address of the virtual address range.

size (int) – IN:
  • size of the range.

desc (hipMemAccessDesc/object) – IN:
  • array of hipMemAccessDesc.

count (int) – IN:
  • number of hipMemAccessDesc in desc.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemSetAccess(void * ptr, size_t size, const hipMemAccessDesc * desc, size_t count)
rocm.bindings.hip.hipMemUnmap(ptr, size)#

Unmap memory allocation of a given address range.

Note:

This API is implemented on Linux and is under development on Microsoft Windows.

Args:
ptr (Pointer/object) – IN:
  • starting address of the range to unmap.

size (int) – IN:
  • size of the virtual address range.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemUnmap(void * ptr, size_t size)
rocm.bindings.hip.hipGraphicsMapResources(count, resources, stream)#

Maps a graphics resource for access.

Args:
count (int) – IN:
  • Number of resources to map.

resources (Pointer/object) – IN:
  • Pointer of resources to map.

stream (ihipStream_t/object) – IN:
  • Stream for synchronization.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t * resources, hipStream_t stream)
rocm.bindings.hip.hipGraphicsSubResourceGetMappedArray(resource, arrayIndex, mipLevel)#

Get an array through which to access a subresource of a mapped graphics resource.

Note:

In this API, the value of arrayIndex higher than zero is currently not supported.

Args:
resource (_hipGraphicsResource/object) – IN:
  • Mapped resource to access.

arrayIndex (int) – IN:
  • Array index for the subresource to access.

mipLevel (int) – IN:
  • Mipmap level for the subresource to access.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t * array, hipGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel)
rocm.bindings.hip.hipGraphicsResourceGetMappedPointer(resource)#

Gets device accessible address of a graphics resource.

Args:
resource (_hipGraphicsResource/object) – IN:
  • Mapped resource to access.

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipGraphicsResourceGetMappedPointer(void ** devPtr, size_t * size, hipGraphicsResource_t resource)
rocm.bindings.hip.hipGraphicsUnmapResources(count, resources, stream)#

Unmaps graphics resources.

Args:
count (int) – IN:
  • Number of resources to unmap.

resources (Pointer/object) – IN:
  • Pointer of resources to unmap.

stream (ihipStream_t/object) – IN:
  • Stream for synchronization.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphicsUnmapResources(int count, hipGraphicsResource_t * resources, hipStream_t stream)
rocm.bindings.hip.hipGraphicsUnregisterResource(resource)#

Unregisters a graphics resource.

Args:
resource (_hipGraphicsResource/object) – IN:
  • Graphics resources to unregister.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphicsUnregisterResource(hipGraphicsResource_t resource)
rocm.bindings.hip.hipCreateSurfaceObject(pResDesc)#

Create a surface object.

Args:
pResDesc (hipResourceDesc/object) – IN:

Pointer of suface object descriptor.

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipCreateSurfaceObject(hipSurfaceObject_t * pSurfObject, const hipResourceDesc * pResDesc)
rocm.bindings.hip.hipDestroySurfaceObject(surfaceObject)#

Destroy a surface object.

Args:
surfaceObject (__hip_surface/object) – IN:

Surface object to be destroyed.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipDestroySurfaceObject(hipSurfaceObject_t surfaceObject)
rocm.bindings.hip.hipExtEnableLogging()#

Enable HIP runtime logging.

This function enables the HIP runtime logging mechanism, allowing diagnostic and trace information to be captured during HIP API execution.

See:

hipExtDisableLogging, hipExtSetLoggingParams

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipExtEnableLogging()
rocm.bindings.hip.hipExtDisableLogging()#

Disable HIP runtime logging.

This function disables the HIP runtime logging mechanism, stopping the capture of diagnostic and trace information during HIP API execution.

See:

hipExtEnableLogging, hipExtSetLoggingParams

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipExtDisableLogging()
rocm.bindings.hip.hipExtSetLoggingParams(log_level, log_size, log_mask)#

Set HIP runtime logging parameters.

This function configures the logging behavior of the HIP runtime, including the verbosity level, buffer size, and which components to log.

See:

hipExtEnableLogging, hipExtDisableLogging

Args:
log_level (int) – IN:

The logging verbosity level. Higher values produce more detailed output.

log_size (int) – IN:

Reserved for future use. Currently not implemented.

log_mask (int) – IN:

A bitmask specifying which HIP runtime components to log.

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipExtSetLoggingParams(size_t log_level, size_t log_size, size_t log_mask)
rocm.bindings.hip.hipMemcpy_spt(dst, src, sizeBytes, kind)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

src (Pointer/object):

(undocumented)

sizeBytes (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy_spt(void * dst, const void * src, size_t sizeBytes, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpyToSymbol_spt(symbol, src, sizeBytes, offset, kind)#

(No short description, might be part of a group.)

Args:
symbol (Pointer/object):

(undocumented)

src (Pointer/object):

(undocumented)

sizeBytes (int):

(undocumented)

offset (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyToSymbol_spt(const void * symbol, const void * src, size_t sizeBytes, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpyFromSymbol_spt(dst, symbol, sizeBytes, offset, kind)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

symbol (Pointer/object):

(undocumented)

sizeBytes (int):

(undocumented)

offset (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyFromSymbol_spt(void * dst, const void * symbol, size_t sizeBytes, size_t offset, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpy2D_spt(dst, dpitch, src, spitch, width, height, kind)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

dpitch (int):

(undocumented)

src (Pointer/object):

(undocumented)

spitch (int):

(undocumented)

width (int):

(undocumented)

height (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2D_spt(void * dst, size_t dpitch, const void * src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpy2DFromArray_spt(dst, dpitch, src, wOffset, hOffset, width, height, kind)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

dpitch (int):

(undocumented)

src (hipArray/object):

(undocumented)

wOffset (int):

(undocumented)

hOffset (int):

(undocumented)

width (int):

(undocumented)

height (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DFromArray_spt(void * dst, size_t dpitch, hipArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpy3D_spt(p)#

(No short description, might be part of a group.)

Args:
p (hipMemcpy3DParms/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy3D_spt(const struct hipMemcpy3DParms * p)
rocm.bindings.hip.hipMemset_spt(dst, value, sizeBytes)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

value (int):

(undocumented)

sizeBytes (int):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset_spt(void * dst, int value, size_t sizeBytes)
rocm.bindings.hip.hipMemsetAsync_spt(dst, value, sizeBytes, stream)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

value (int):

(undocumented)

sizeBytes (int):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemsetAsync_spt(void * dst, int value, size_t sizeBytes, hipStream_t stream)
rocm.bindings.hip.hipMemset2D_spt(dst, pitch, value, width, height)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

pitch (int):

(undocumented)

value (int):

(undocumented)

width (int):

(undocumented)

height (int):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset2D_spt(void * dst, size_t pitch, int value, size_t width, size_t height)
rocm.bindings.hip.hipMemset2DAsync_spt(dst, pitch, value, width, height, stream)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

pitch (int):

(undocumented)

value (int):

(undocumented)

width (int):

(undocumented)

height (int):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset2DAsync_spt(void * dst, size_t pitch, int value, size_t width, size_t height, hipStream_t stream)
rocm.bindings.hip.hipMemset3DAsync_spt(pitchedDevPtr, value, extent, stream)#

(No short description, might be part of a group.)

Args:
pitchedDevPtr (hipPitchedPtr):

(undocumented)

value (int):

(undocumented)

extent (hipExtent):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset3DAsync_spt(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent, hipStream_t stream)
rocm.bindings.hip.hipMemset3D_spt(pitchedDevPtr, value, extent)#

(No short description, might be part of a group.)

Args:
pitchedDevPtr (hipPitchedPtr):

(undocumented)

value (int):

(undocumented)

extent (hipExtent):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemset3D_spt(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent)
rocm.bindings.hip.hipMemcpyAsync_spt(dst, src, sizeBytes, kind, stream)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

src (Pointer/object):

(undocumented)

sizeBytes (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyAsync_spt(void * dst, const void * src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpy3DAsync_spt(p, stream)#

(No short description, might be part of a group.)

Args:
p (hipMemcpy3DParms/object):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy3DAsync_spt(const hipMemcpy3DParms * p, hipStream_t stream)
rocm.bindings.hip.hipMemcpy2DAsync_spt(dst, dpitch, src, spitch, width, height, kind, stream)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

dpitch (int):

(undocumented)

src (Pointer/object):

(undocumented)

spitch (int):

(undocumented)

width (int):

(undocumented)

height (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DAsync_spt(void * dst, size_t dpitch, const void * src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpyFromSymbolAsync_spt(dst, symbol, sizeBytes, offset, kind, stream)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

symbol (Pointer/object):

(undocumented)

sizeBytes (int):

(undocumented)

offset (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyFromSymbolAsync_spt(void * dst, const void * symbol, size_t sizeBytes, size_t offset, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpyToSymbolAsync_spt(symbol, src, sizeBytes, offset, kind, stream)#

(No short description, might be part of a group.)

Args:
symbol (Pointer/object):

(undocumented)

src (Pointer/object):

(undocumented)

sizeBytes (int):

(undocumented)

offset (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyToSymbolAsync_spt(const void * symbol, const void * src, size_t sizeBytes, size_t offset, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpyFromArray_spt(dst, src, wOffsetSrc, hOffset, count, kind)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

src (hipArray/object):

(undocumented)

wOffsetSrc (int):

(undocumented)

hOffset (int):

(undocumented)

count (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpyFromArray_spt(void * dst, hipArray_const_t src, size_t wOffsetSrc, size_t hOffset, size_t count, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpy2DToArray_spt(dst, wOffset, hOffset, src, spitch, width, height, kind)#

(No short description, might be part of a group.)

Args:
dst (hipArray/object):

(undocumented)

wOffset (int):

(undocumented)

hOffset (int):

(undocumented)

src (Pointer/object):

(undocumented)

spitch (int):

(undocumented)

width (int):

(undocumented)

height (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DToArray_spt(hipArray_t dst, size_t wOffset, size_t hOffset, const void * src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind)
rocm.bindings.hip.hipMemcpy2DFromArrayAsync_spt(dst, dpitch, src, wOffsetSrc, hOffsetSrc, width, height, kind, stream)#

(No short description, might be part of a group.)

Args:
dst (Pointer/object):

(undocumented)

dpitch (int):

(undocumented)

src (hipArray/object):

(undocumented)

wOffsetSrc (int):

(undocumented)

hOffsetSrc (int):

(undocumented)

width (int):

(undocumented)

height (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DFromArrayAsync_spt(void * dst, size_t dpitch, hipArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipMemcpy2DToArrayAsync_spt(dst, wOffset, hOffset, src, spitch, width, height, kind, stream)#

(No short description, might be part of a group.)

Args:
dst (hipArray/object):

(undocumented)

wOffset (int):

(undocumented)

hOffset (int):

(undocumented)

src (Pointer/object):

(undocumented)

spitch (int):

(undocumented)

width (int):

(undocumented)

height (int):

(undocumented)

kind (hipMemcpyKind):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipMemcpy2DToArrayAsync_spt(hipArray_t dst, size_t wOffset, size_t hOffset, const void * src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream)
rocm.bindings.hip.hipStreamQuery_spt(stream)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamQuery_spt(hipStream_t stream)
rocm.bindings.hip.hipStreamSynchronize_spt(stream)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamSynchronize_spt(hipStream_t stream)
rocm.bindings.hip.hipStreamGetPriority_spt(stream)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamGetPriority_spt(hipStream_t stream, int * priority)
rocm.bindings.hip.hipStreamWaitEvent_spt(stream, event, flags)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

event (ihipEvent_t/object):

(undocumented)

flags (int):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamWaitEvent_spt(hipStream_t stream, hipEvent_t event, unsigned int flags)
rocm.bindings.hip.hipStreamGetFlags_spt(stream)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamGetFlags_spt(hipStream_t stream, unsigned int * flags)
rocm.bindings.hip.hipStreamAddCallback_spt(stream, callback, userData, flags)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

callback (hipStreamCallback_t/object):

(undocumented)

userData (Pointer/object):

(undocumented)

flags (int):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamAddCallback_spt(hipStream_t stream, hipStreamCallback_t callback, void * userData, unsigned int flags)
rocm.bindings.hip.hipEventRecord_spt(event, stream)#

(No short description, might be part of a group.)

Args:
event (ihipEvent_t/object):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipEventRecord_spt(hipEvent_t event, hipStream_t stream)
rocm.bindings.hip.hipLaunchCooperativeKernel_spt(f, gridDim, blockDim, sharedMemBytes, hStream)#

(No short description, might be part of a group.)

Args:
f (Pointer/object):

(undocumented)

gridDim (dim3):

(undocumented)

blockDim (dim3):

(undocumented)

sharedMemBytes (int):

(undocumented)

hStream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipLaunchCooperativeKernel_spt(const void * f, dim3 gridDim, dim3 blockDim, void ** kernelParams, uint32_t sharedMemBytes, hipStream_t hStream)
rocm.bindings.hip.hipLaunchKernel_spt(function_address, numBlocks, dimBlocks, sharedMemBytes, stream)#

(No short description, might be part of a group.)

Args:
function_address (Pointer/object):

(undocumented)

numBlocks (dim3):

(undocumented)

dimBlocks (dim3):

(undocumented)

sharedMemBytes (int):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipLaunchKernel_spt(const void * function_address, dim3 numBlocks, dim3 dimBlocks, void ** args, size_t sharedMemBytes, hipStream_t stream)
rocm.bindings.hip.hipGraphLaunch_spt(graphExec, stream)#

(No short description, might be part of a group.)

Args:
graphExec (hipGraphExec/object):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipGraphLaunch_spt(hipGraphExec_t graphExec, hipStream_t stream)
rocm.bindings.hip.hipStreamBeginCapture_spt(stream, mode)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

mode (hipStreamCaptureMode):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipStreamBeginCapture_spt(hipStream_t stream, hipStreamCaptureMode mode)
rocm.bindings.hip.hipStreamEndCapture_spt(stream)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamEndCapture_spt(hipStream_t stream, hipGraph_t * pGraph)
rocm.bindings.hip.hipStreamIsCapturing_spt(stream)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 2 that contains (in that order):

C signature

hipError_t hipStreamIsCapturing_spt(hipStream_t stream, hipStreamCaptureStatus * pCaptureStatus)
rocm.bindings.hip.hipStreamGetCaptureInfo_spt(stream)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipStreamGetCaptureInfo_spt(hipStream_t stream, hipStreamCaptureStatus * pCaptureStatus, unsigned long long * pId)
rocm.bindings.hip.hipStreamGetCaptureInfo_v2_spt(stream, dependencies_out)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

dependencies_out (Pointer/object):

(undocumented)

Returns:

A tuple of size 5 that contains (in that order):

C signature

hipError_t hipStreamGetCaptureInfo_v2_spt(hipStream_t stream, hipStreamCaptureStatus * captureStatus_out, unsigned long long * id_out, hipGraph_t * graph_out, const hipGraphNode_t ** dependencies_out, size_t * numDependencies_out)
rocm.bindings.hip.hipLaunchHostFunc_spt(stream, fn, userData)#

(No short description, might be part of a group.)

Args:
stream (ihipStream_t/object):

(undocumented)

fn (hipHostFn_t/object):

(undocumented)

userData (Pointer/object):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

C signature

hipError_t hipLaunchHostFunc_spt(hipStream_t stream, hipHostFn_t fn, void * userData)
rocm.bindings.hip.hipGetDriverEntryPoint_spt(symbol, flags)#

(No short description, might be part of a group.)

Args:
symbol (CStr/object):

(undocumented)

flags (int):

(undocumented)

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipGetDriverEntryPoint_spt(const char * symbol, void ** funcPtr, unsigned long long flags, hipDriverEntryPointQueryResult * status)
rocm.bindings.hip.hipGetProcAddress_spt(symbol, hipVersion, flags)#

(No short description, might be part of a group.)

Args:
symbol (CStr/object):

(undocumented)

hipVersion (int):

(undocumented)

flags (int):

(undocumented)

Returns:

A tuple of size 3 that contains (in that order):

C signature

hipError_t hipGetProcAddress_spt(const char * symbol, void ** pfn, int hipVersion, uint64_t flags, hipDriverProcAddressQueryResult * symbolStatus)
class rocm.bindings.hip.hipDataType#

Bases: enum.IntEnum

(No short description)

HIP_R_32F: int#
HIP_R_64F: int#
HIP_R_16F: int#
HIP_R_8I: int#
HIP_C_32F: int#
HIP_C_64F: int#
HIP_C_16F: int#
HIP_C_8I: int#
HIP_R_8U: int#
HIP_C_8U: int#
HIP_R_32I: int#
HIP_C_32I: int#
HIP_R_32U: int#
HIP_C_32U: int#
HIP_R_16BF: int#
HIP_C_16BF: int#
HIP_R_4I: int#
HIP_C_4I: int#
HIP_R_4U: int#
HIP_C_4U: int#
HIP_R_16I: int#
HIP_C_16I: int#
HIP_R_16U: int#
HIP_C_16U: int#
HIP_R_64I: int#
HIP_C_64I: int#
HIP_R_64U: int#
HIP_C_64U: int#
HIP_R_8F_E4M3: int#
HIP_R_8F_E5M2: int#
HIP_R_8F_UE8M0: int#
HIP_R_6F_E2M3: int#
HIP_R_6F_E3M2: int#
HIP_R_4F_E2M1: int#
HIP_R_8F_E4M3_FNUZ: int#
HIP_R_8F_E5M2_FNUZ: int#
class rocm.bindings.hip.hipLibraryPropertyType#

Bases: enum.IntEnum

(No short description)

HIP_LIBRARY_MAJOR_VERSION: int#
HIP_LIBRARY_MINOR_VERSION: int#
HIP_LIBRARY_PATCH_LEVEL: int#