hip.hip#

(No short description)

Attributes:
HIP_VERSION_MAJOR (int):

Macro constant.

HIP_VERSION_MINOR (int):

Macro constant.

HIP_VERSION_PATCH (int):

Macro constant.

HIP_VERSION_GITHASH (bytes):

Macro constant.

HIP_VERSION_BUILD_ID (int):

Macro constant.

HIP_VERSION_BUILD_NAME (bytes):

Macro constant.

HIP_VERSION (int):

Macro constant.

HIP_TRSA_OVERRIDE_FORMAT (int):

Macro constant.

HIP_TRSF_READ_AS_INTEGER (int):

Macro constant.

HIP_TRSF_NORMALIZED_COORDINATES (int):

Macro constant.

HIP_TRSF_SRGB (int):

Macro constant.

hipTextureType1D (int):

Macro constant.

hipTextureType2D (int):

Macro constant.

hipTextureType3D (int):

Macro constant.

hipTextureTypeCubemap (int):

Macro constant.

hipTextureType1DLayered (int):

Macro constant.

hipTextureType2DLayered (int):

Macro constant.

hipTextureTypeCubemapLayered (int):

Macro constant.

HIP_IMAGE_OBJECT_SIZE_DWORD (int):

Macro constant.

HIP_SAMPLER_OBJECT_SIZE_DWORD (int):

Macro constant.

HIP_SAMPLER_OBJECT_OFFSET_DWORD (int):

Macro constant.

HIP_TEXTURE_OBJECT_SIZE_DWORD (int):

Macro constant.

HIP_LAUNCH_PARAM_BUFFER_POINTER (int):

Macro constant.

HIP_LAUNCH_PARAM_BUFFER_SIZE (int):

Macro constant.

HIP_LAUNCH_PARAM_END (int):

Macro constant.

hipIpcMemLazyEnablePeerAccess (int):

Macro constant.

HIP_IPC_HANDLE_SIZE (int):

Macro constant.

hipStreamDefault (int):

Macro constant.

hipStreamNonBlocking (int):

Macro constant.

hipEventDefault (int):

Macro constant.

hipEventBlockingSync (int):

Macro constant.

hipEventDisableTiming (int):

Macro constant.

hipEventInterprocess (int):

Macro constant.

hipEventReleaseToDevice (int):

Macro constant.

hipEventReleaseToSystem (int):

Macro constant.

hipHostMallocDefault (int):

Macro constant.

hipHostMallocPortable (int):

Macro constant.

hipHostMallocMapped (int):

Macro constant.

hipHostMallocWriteCombined (int):

Macro constant.

hipHostMallocNumaUser (int):

Macro constant.

hipHostMallocCoherent (int):

Macro constant.

hipHostMallocNonCoherent (int):

Macro constant.

hipMemAttachGlobal (int):

Macro constant.

hipMemAttachHost (int):

Macro constant.

hipMemAttachSingle (int):

Macro constant.

hipDeviceMallocDefault (int):

Macro constant.

hipDeviceMallocFinegrained (int):

Macro constant.

hipMallocSignalMemory (int):

Macro constant.

hipHostRegisterDefault (int):

Macro constant.

hipHostRegisterPortable (int):

Macro constant.

hipHostRegisterMapped (int):

Macro constant.

hipHostRegisterIoMemory (int):

Macro constant.

hipExtHostRegisterCoarseGrained (int):

Macro constant.

hipDeviceScheduleAuto (int):

Macro constant.

hipDeviceScheduleSpin (int):

Macro constant.

hipDeviceScheduleYield (int):

Macro constant.

hipDeviceScheduleBlockingSync (int):

Macro constant.

hipDeviceScheduleMask (int):

Macro constant.

hipDeviceMapHost (int):

Macro constant.

hipDeviceLmemResizeToMax (int):

Macro constant.

hipArrayDefault (int):

Macro constant.

hipArrayLayered (int):

Macro constant.

hipArraySurfaceLoadStore (int):

Macro constant.

hipArrayCubemap (int):

Macro constant.

hipArrayTextureGather (int):

Macro constant.

hipOccupancyDefault (int):

Macro constant.

hipCooperativeLaunchMultiDeviceNoPreSync (int):

Macro constant.

hipCooperativeLaunchMultiDeviceNoPostSync (int):

Macro constant.

hipCpuDeviceId (int):

Macro constant.

hipInvalidDeviceId (int):

Macro constant.

hipExtAnyOrderLaunch (int):

Macro constant.

hipStreamWaitValueGte (int):

Macro constant.

hipStreamWaitValueEq (int):

Macro constant.

hipStreamWaitValueAnd (int):

Macro constant.

hipStreamWaitValueNor (int):

Macro constant.

HIP_SUCCESS:

(undocumented)

HIP_ERROR_INVALID_VALUE:

(undocumented)

HIP_ERROR_NOT_INITIALIZED:

(undocumented)

HIP_ERROR_LAUNCH_OUT_OF_RESOURCES:

(undocumented)

HIP_SUCCESS:

(undocumented)

HIP_ERROR_INVALID_VALUE:

(undocumented)

HIP_ERROR_NOT_INITIALIZED:

(undocumented)

HIP_ERROR_LAUNCH_OUT_OF_RESOURCES:

(undocumented)

HIP_SUCCESS:

(undocumented)

HIP_ERROR_INVALID_VALUE:

(undocumented)

HIP_ERROR_NOT_INITIALIZED:

(undocumented)

HIP_ERROR_LAUNCH_OUT_OF_RESOURCES:

(undocumented)

HIP_SUCCESS:

(undocumented)

HIP_ERROR_INVALID_VALUE:

(undocumented)

HIP_ERROR_NOT_INITIALIZED:

(undocumented)

HIP_ERROR_LAUNCH_OUT_OF_RESOURCES:

(undocumented)

hipUUID:

alias of hipUUID_t

hipArray_t:

alias of hipArray

hipArray_const_t:

alias of hipArray

hipMipmappedArray_t:

alias of hipMipmappedArray

hipMipmappedArray_const_t:

alias of hipMipmappedArray

HIPresourcetype:

alias of HIPresourcetype_enum

hipResourcetype:

alias of HIPresourcetype_enum

HIPaddress_mode:

alias of HIPaddress_mode_enum

HIPfilter_mode:

alias of HIPfilter_mode_enum

HIP_TEXTURE_DESC:

alias of HIP_TEXTURE_DESC_st

HIPresourceViewFormat:

alias of HIPresourceViewFormat_enum

HIP_RESOURCE_DESC:

alias of HIP_RESOURCE_DESC_st

HIP_RESOURCE_VIEW_DESC:

alias of HIP_RESOURCE_VIEW_DESC_st

hipTextureObject_t:

alias of __hip_texture

hipSurfaceObject_t:

alias of __hip_surface

hipCtx_t:

alias of ihipCtx_t

hipStream_t:

alias of ihipStream_t

hipIpcMemHandle_t:

alias of hipIpcMemHandle_st

hipIpcEventHandle_t:

alias of hipIpcEventHandle_st

hipModule_t:

alias of ihipModule_t

hipFunction_t:

alias of ihipModuleSymbol_t

hipMemPool_t:

alias of ihipMemPoolHandle_t

hipEvent_t:

alias of ihipEvent_t

hipLaunchParams:

alias of hipLaunchParams_t

hipFunctionLaunchParams:

alias of hipFunctionLaunchParams_t

hipExternalMemoryHandleType:

alias of hipExternalMemoryHandleType_enum

hipExternalMemoryHandleDesc:

alias of hipExternalMemoryHandleDesc_st

hipExternalMemoryBufferDesc:

alias of hipExternalMemoryBufferDesc_st

hipExternalMemoryMipmappedArrayDesc:

alias of hipExternalMemoryMipmappedArrayDesc_st

hipExternalSemaphoreHandleType:

alias of hipExternalSemaphoreHandleType_enum

hipExternalSemaphoreHandleDesc:

alias of hipExternalSemaphoreHandleDesc_st

hipExternalSemaphoreSignalParams:

alias of hipExternalSemaphoreSignalParams_st

hipExternalSemaphoreWaitParams:

alias of hipExternalSemaphoreWaitParams_st

hipGraphicsResource:

alias of _hipGraphicsResource

hipGraphicsResource_t:

alias of _hipGraphicsResource

hipGraph_t:

alias of ihipGraph

hipGraphNode_t:

alias of hipGraphNode

hipGraphExec_t:

alias of hipGraphExec

hipUserObject_t:

alias of hipUserObject

hipMemGenericAllocationHandle_t:

alias of ihipMemGenericAllocationHandle

class hip.hip.hipDeviceArch_t(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipDeviceArch_t.

Python wrapper for cdef class chip.hipDeviceArch_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipDeviceArch_t.

Constructor for type hipDeviceArch_t.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipDeviceArch_t from a Python object.

Derives a hipDeviceArch_t from the given Python object pyobj. In case pyobj is itself an hipDeviceArch_t reference, this method returns it directly. No new hipDeviceArch_t is created in this case.

get_has3dGrid(self, i)#

Get value has3dGrid of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasDoubles(self, i)#

Get value hasDoubles of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasDynamicParallelism(self, i)#

Get value hasDynamicParallelism of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasFloatAtomicAdd(self, i)#

Get value hasFloatAtomicAdd of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasFunnelShift(self, i)#

Get value hasFunnelShift of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasGlobalFloatAtomicExch(self, i)#

Get value hasGlobalFloatAtomicExch of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasGlobalInt32Atomics(self, i)#

Get value hasGlobalInt32Atomics of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasGlobalInt64Atomics(self, i)#

Get value hasGlobalInt64Atomics of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasSharedFloatAtomicExch(self, i)#

Get value hasSharedFloatAtomicExch of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasSharedInt32Atomics(self, i)#

Get value hasSharedInt32Atomics of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasSharedInt64Atomics(self, i)#

Get value hasSharedInt64Atomics of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasSurfaceFuncs(self, i)#

Get value hasSurfaceFuncs of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasSyncThreadsExt(self, i)#

Get value hasSyncThreadsExt of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasThreadFenceSystem(self, i)#

Get value hasThreadFenceSystem of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasWarpBallot(self, i)#

Get value hasWarpBallot of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasWarpShuffle(self, i)#

Get value hasWarpShuffle of (<chip.hipDeviceArch_t*>self._ptr)[i].

get_hasWarpVote(self, i)#

Get value hasWarpVote of (<chip.hipDeviceArch_t*>self._ptr)[i].

has3dGrid#

Grid and group dims are 3D (rather than 2D).

hasDoubles#

Double-precision floating point.

hasDynamicParallelism#

Dynamic parallelism.

hasFloatAtomicAdd#

32-bit float atomic add in global and shared memory.

hasFunnelShift#

Funnel two words into one with shift&mask caps.

hasGlobalFloatAtomicExch#

32-bit float atomic exch for global memory.

hasGlobalInt32Atomics#

32-bit integer atomics for global memory.

hasGlobalInt64Atomics#

64-bit integer atomics for global memory.

hasSharedFloatAtomicExch#

32-bit float atomic exch for shared memory.

hasSharedInt32Atomics#

32-bit integer atomics for shared memory.

hasSharedInt64Atomics#

64-bit integer atomics for shared memory.

hasSurfaceFuncs#

Surface functions.

hasSyncThreadsExt#

__syncthreads_count, syncthreads_and, syncthreads_or.

hasThreadFenceSystem#

__threadfence_system.

hasWarpBallot#

Warp ballot instructions (__ballot).

hasWarpShuffle#

Warp shuffle operations. (__shfl_*).

hasWarpVote#

Warp vote instructions (__any, __all).

is_ptr_null#

If data pointer is NULL.

set_has3dGrid(self, i, unsigned int value)#

Set value has3dGrid of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasDoubles(self, i, unsigned int value)#

Set value hasDoubles of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasDynamicParallelism(self, i, unsigned int value)#

Set value hasDynamicParallelism of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasFloatAtomicAdd(self, i, unsigned int value)#

Set value hasFloatAtomicAdd of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasFunnelShift(self, i, unsigned int value)#

Set value hasFunnelShift of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasGlobalFloatAtomicExch(self, i, unsigned int value)#

Set value hasGlobalFloatAtomicExch of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasGlobalInt32Atomics(self, i, unsigned int value)#

Set value hasGlobalInt32Atomics of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasGlobalInt64Atomics(self, i, unsigned int value)#

Set value hasGlobalInt64Atomics of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasSharedFloatAtomicExch(self, i, unsigned int value)#

Set value hasSharedFloatAtomicExch of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasSharedInt32Atomics(self, i, unsigned int value)#

Set value hasSharedInt32Atomics of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasSharedInt64Atomics(self, i, unsigned int value)#

Set value hasSharedInt64Atomics of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasSurfaceFuncs(self, i, unsigned int value)#

Set value hasSurfaceFuncs of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasSyncThreadsExt(self, i, unsigned int value)#

Set value hasSyncThreadsExt of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasThreadFenceSystem(self, i, unsigned int value)#

Set value hasThreadFenceSystem of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasWarpBallot(self, i, unsigned int value)#

Set value hasWarpBallot of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasWarpShuffle(self, i, unsigned int value)#

Set value hasWarpShuffle of (<chip.hipDeviceArch_t*>self._ptr)[i].

set_hasWarpVote(self, i, unsigned int value)#

Set value hasWarpVote of (<chip.hipDeviceArch_t*>self._ptr)[i].

class hip.hip.hipUUID_t(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipUUID_t.

Python wrapper for cdef class chip.hipUUID_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipUUID_t.

Constructor for type hipUUID_t.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

bytes#

(undocumented)

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipUUID_t from a Python object.

Derives a hipUUID_t from the given Python object pyobj. In case pyobj is itself an hipUUID_t reference, this method returns it directly. No new hipUUID_t is created in this case.

get_bytes(self, i)#

Get value of bytes of (<chip.hipUUID_t*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

hip.hip.hipUUID#

alias of hipUUID_t

class hip.hip.hipDeviceProp_t(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipDeviceProp_t.

Python wrapper for cdef class chip.hipDeviceProp_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

ECCEnabled#

Device has ECC support enabled

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipDeviceProp_t.

Constructor for type hipDeviceProp_t.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

accessPolicyMaxWindowSize#

Max value of access policy window

arch#

Architectural feature flags. New for HIP.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

asicRevision#

Revision of the GPU in this device

asyncEngineCount#

Number of async engines

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

canMapHostMemory#

Check whether HIP can map host memory

canUseHostPointerForRegisteredMem#

Device can access host registered memory with same address as the host

clockInstructionRate#

Frequency in khz of the timer used by the device-side “clock*” instructions. New for HIP.

clockRate#

Max clock frequency of the multiProcessors in khz.

clusterLaunch#

Device supports cluster launch

computeMode#

Compute mode.

computePreemptionSupported#

Is compute preemption supported on the device

concurrentKernels#

Device can possibly execute multiple kernels concurrently.

concurrentManagedAccess#

Device can coherently access managed memory concurrently with the CPU

cooperativeLaunch#

HIP device supports cooperative launch

cooperativeMultiDeviceLaunch#

HIP device supports cooperative launch on multiple devices

cooperativeMultiDeviceUnmatchedBlockDim#

HIP device supports cooperative launch on multiple

cooperativeMultiDeviceUnmatchedFunc#

HIP device supports cooperative launch on multiple

cooperativeMultiDeviceUnmatchedGridDim#

HIP device supports cooperative launch on multiple

cooperativeMultiDeviceUnmatchedSharedMem#

HIP device supports cooperative launch on multiple

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

deferredMappingHipArraySupported#

Device supports deferred mapping HIP arrays and HIP mipmapped arrays

deviceOverlap#

Deprecated. Use asyncEngineCount instead

directManagedMemAccessFromHost#

Host can directly access managed memory on the device without migration

static fromObj(pyobj)#

Creates a hipDeviceProp_t from a Python object.

Derives a hipDeviceProp_t from the given Python object pyobj. In case pyobj is itself an hipDeviceProp_t reference, this method returns it directly. No new hipDeviceProp_t is created in this case.

gcnArchName#

AMD GCN Arch Name. HIP Only.

get_ECCEnabled(self, i)#

Get value ECCEnabled of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_accessPolicyMaxWindowSize(self, i)#

Get value accessPolicyMaxWindowSize of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_arch(self, i)#

Get value of arch of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_asicRevision(self, i)#

Get value asicRevision of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_asyncEngineCount(self, i)#

Get value asyncEngineCount of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_canMapHostMemory(self, i)#

Get value canMapHostMemory of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_canUseHostPointerForRegisteredMem(self, i)#

Get value canUseHostPointerForRegisteredMem of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_clockInstructionRate(self, i)#

Get value clockInstructionRate of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_clockRate(self, i)#

Get value clockRate of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_clusterLaunch(self, i)#

Get value clusterLaunch of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_computeMode(self, i)#

Get value computeMode of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_computePreemptionSupported(self, i)#

Get value computePreemptionSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_concurrentKernels(self, i)#

Get value concurrentKernels of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_concurrentManagedAccess(self, i)#

Get value concurrentManagedAccess of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_cooperativeLaunch(self, i)#

Get value cooperativeLaunch of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_cooperativeMultiDeviceLaunch(self, i)#

Get value cooperativeMultiDeviceLaunch of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_cooperativeMultiDeviceUnmatchedBlockDim(self, i)#

Get value cooperativeMultiDeviceUnmatchedBlockDim of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_cooperativeMultiDeviceUnmatchedFunc(self, i)#

Get value cooperativeMultiDeviceUnmatchedFunc of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_cooperativeMultiDeviceUnmatchedGridDim(self, i)#

Get value cooperativeMultiDeviceUnmatchedGridDim of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_cooperativeMultiDeviceUnmatchedSharedMem(self, i)#

Get value cooperativeMultiDeviceUnmatchedSharedMem of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_deferredMappingHipArraySupported(self, i)#

Get value deferredMappingHipArraySupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_deviceOverlap(self, i)#

Get value deviceOverlap of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_directManagedMemAccessFromHost(self, i)#

Get value directManagedMemAccessFromHost of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_gcnArchName(self, i)#

Get value of gcnArchName of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_globalL1CacheSupported(self, i)#

Get value globalL1CacheSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_gpuDirectRDMAFlushWritesOptions(self, i)#

Get value gpuDirectRDMAFlushWritesOptions of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_gpuDirectRDMASupported(self, i)#

Get value gpuDirectRDMASupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_gpuDirectRDMAWritesOrdering(self, i)#

Get value gpuDirectRDMAWritesOrdering of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_hdpMemFlushCntl(self, i)#

Get value hdpMemFlushCntl of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_hdpRegFlushCntl(self, i)#

Get value hdpRegFlushCntl of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_hipReserved(self, i)#

Get value of hipReserved of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_hostNativeAtomicSupported(self, i)#

Get value hostNativeAtomicSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_hostRegisterReadOnlySupported(self, i)#

Get value hostRegisterReadOnlySupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_hostRegisterSupported(self, i)#

Get value hostRegisterSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_integrated(self, i)#

Get value integrated of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_ipcEventSupported(self, i)#

Get value ipcEventSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_isLargeBar(self, i)#

Get value isLargeBar of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_isMultiGpuBoard(self, i)#

Get value isMultiGpuBoard of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_kernelExecTimeoutEnabled(self, i)#

Get value kernelExecTimeoutEnabled of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_l2CacheSize(self, i)#

Get value l2CacheSize of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_localL1CacheSupported(self, i)#

Get value localL1CacheSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_luid(self, i)#

Get value of luid of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_luidDeviceNodeMask(self, i)#

Get value luidDeviceNodeMask of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_major(self, i)#

Get value major of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_managedMemory(self, i)#

Get value managedMemory of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxBlocksPerMultiProcessor(self, i)#

Get value maxBlocksPerMultiProcessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxGridSize(self, i)#

Get value of maxGridSize of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxSharedMemoryPerMultiProcessor(self, i)#

Get value maxSharedMemoryPerMultiProcessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxSurface1D(self, i)#

Get value maxSurface1D of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxSurface1DLayered(self, i)#

Get value of maxSurface1DLayered of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxSurface2D(self, i)#

Get value of maxSurface2D of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxSurface2DLayered(self, i)#

Get value of maxSurface2DLayered of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxSurface3D(self, i)#

Get value of maxSurface3D of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxSurfaceCubemap(self, i)#

Get value maxSurfaceCubemap of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxSurfaceCubemapLayered(self, i)#

Get value of maxSurfaceCubemapLayered of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture1D(self, i)#

Get value maxTexture1D of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture1DLayered(self, i)#

Get value of maxTexture1DLayered of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture1DLinear(self, i)#

Get value maxTexture1DLinear of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture1DMipmap(self, i)#

Get value maxTexture1DMipmap of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture2D(self, i)#

Get value of maxTexture2D of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture2DGather(self, i)#

Get value of maxTexture2DGather of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture2DLayered(self, i)#

Get value of maxTexture2DLayered of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture2DLinear(self, i)#

Get value of maxTexture2DLinear of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture2DMipmap(self, i)#

Get value of maxTexture2DMipmap of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture3D(self, i)#

Get value of maxTexture3D of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTexture3DAlt(self, i)#

Get value of maxTexture3DAlt of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTextureCubemap(self, i)#

Get value maxTextureCubemap of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxTextureCubemapLayered(self, i)#

Get value of maxTextureCubemapLayered of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxThreadsDim(self, i)#

Get value of maxThreadsDim of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxThreadsPerBlock(self, i)#

Get value maxThreadsPerBlock of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_maxThreadsPerMultiProcessor(self, i)#

Get value maxThreadsPerMultiProcessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_memPitch(self, i)#

Get value memPitch of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_memoryBusWidth(self, i)#

Get value memoryBusWidth of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_memoryClockRate(self, i)#

Get value memoryClockRate of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_memoryPoolSupportedHandleTypes(self, i)#

Get value memoryPoolSupportedHandleTypes of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_memoryPoolsSupported(self, i)#

Get value memoryPoolsSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_minor(self, i)#

Get value minor of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_multiGpuBoardGroupID(self, i)#

Get value multiGpuBoardGroupID of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_multiProcessorCount(self, i)#

Get value multiProcessorCount of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_name(self, i)#

Get value of name of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_pageableMemoryAccess(self, i)#

Get value pageableMemoryAccess of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_pageableMemoryAccessUsesHostPageTables(self, i)#

Get value pageableMemoryAccessUsesHostPageTables of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_pciBusID(self, i)#

Get value pciBusID of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_pciDeviceID(self, i)#

Get value pciDeviceID of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_pciDomainID(self, i)#

Get value pciDomainID of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_persistingL2CacheMaxSize(self, i)#

Get value persistingL2CacheMaxSize of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_regsPerBlock(self, i)#

Get value regsPerBlock of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_regsPerMultiprocessor(self, i)#

Get value regsPerMultiprocessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_reservedSharedMemPerBlock(self, i)#

Get value reservedSharedMemPerBlock of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_sharedMemPerBlock(self, i)#

Get value sharedMemPerBlock of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_sharedMemPerBlockOptin(self, i)#

Get value sharedMemPerBlockOptin of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_sharedMemPerMultiprocessor(self, i)#

Get value sharedMemPerMultiprocessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_singleToDoublePrecisionPerfRatio(self, i)#

Get value singleToDoublePrecisionPerfRatio of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_sparseHipArraySupported(self, i)#

Get value sparseHipArraySupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_streamPrioritiesSupported(self, i)#

Get value streamPrioritiesSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_surfaceAlignment(self, i)#

Get value surfaceAlignment of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_tccDriver(self, i)#

Get value tccDriver of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_textureAlignment(self, i)#

Get value textureAlignment of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_texturePitchAlignment(self, i)#

Get value texturePitchAlignment of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_timelineSemaphoreInteropSupported(self, i)#

Get value timelineSemaphoreInteropSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_totalConstMem(self, i)#

Get value totalConstMem of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_totalGlobalMem(self, i)#

Get value totalGlobalMem of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_unifiedAddressing(self, i)#

Get value unifiedAddressing of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_unifiedFunctionPointers(self, i)#

Get value unifiedFunctionPointers of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_uuid(self, i)#

Get value of uuid of (<chip.hipDeviceProp_t*>self._ptr)[i].

get_warpSize(self, i)#

Get value warpSize of (<chip.hipDeviceProp_t*>self._ptr)[i].

globalL1CacheSupported#

Indicates globals are cached in L1

gpuDirectRDMAFlushWritesOptions#

Bitmask to be interpreted according to hipFlushGPUDirectRDMAWritesOptions

gpuDirectRDMASupported#

Indicates device support of RDMA APIs

gpuDirectRDMAWritesOrdering#

value of hipGPUDirectRDMAWritesOrdering

hdpMemFlushCntl#

Addres of HDP_MEM_COHERENCY_FLUSH_CNTL register Note:

Setting this hdpMemFlushCntl can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

hdpRegFlushCntl#

Addres of HDP_REG_COHERENCY_FLUSH_CNTL register Note:

Setting this hdpRegFlushCntl can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

hipReserved#

Reserved for adding new entries for HIP/CUDA.

hostNativeAtomicSupported#

Link between host and device supports native atomics

hostRegisterReadOnlySupported#

Device supports using the hipHostRegisterReadOnly flag with hipHostRegistger

hostRegisterSupported#

Device supports hipHostRegister

integrated#

APU vs dGPU

ipcEventSupported#

Device supports IPC events

isLargeBar#

1: if it is a large PCI bar device, else 0

isMultiGpuBoard#

1 if device is on a multi-GPU board, 0 if not.

is_ptr_null#

If data pointer is NULL.

kernelExecTimeoutEnabled#

Run time limit for kernels executed on the device

l2CacheSize#

L2 cache size.

localL1CacheSupported#

Locals are cahced in L1

luid#

8-byte unique identifier. Only valid on windows

luidDeviceNodeMask#

LUID node mask

major#

Major compute capability. On HCC, this is an approximation and features may differ from CUDA CC. See the arch feature flags for portable ways to query feature caps.

managedMemory#

Device supports allocating managed memory on this system

maxBlocksPerMultiProcessor#

Max number of blocks on CU

maxGridSize#

Max grid dimensions (XYZ).

maxSharedMemoryPerMultiProcessor#

Maximum Shared Memory Per CU. HIP Only.

maxSurface1D#

Maximum 1D surface size

maxSurface1DLayered#

Maximum 1D layered surface size

maxSurface2D#

Maximum 2D surface size

maxSurface2DLayered#

Maximum 2D layared surface size

maxSurface3D#

Maximum 3D surface size

maxSurfaceCubemap#

Maximum cubemap surface size

maxSurfaceCubemapLayered#

Maximum cubemap layered surface size

maxTexture1D#

Maximum number of elements in 1D images

maxTexture1DLayered#

Maximum number of elements in 1D array images

maxTexture1DLinear#

Maximum size for 1D textures bound to linear memory

maxTexture1DMipmap#

Maximum 1D mipmap texture size

maxTexture2D#

Maximum dimensions (width, height) of 2D images, in image elements

maxTexture2DGather#

Maximum 2D tex dimensions if gather has to be performed

maxTexture2DLayered#

Maximum number of elements in 2D array images

maxTexture2DLinear#

Maximum 2D tex dimensions if tex are bound to pitched memory

maxTexture2DMipmap#

Maximum number of elements in 2D array mipmap of images

maxTexture3D#

Maximum dimensions (width, height, depth) of 3D images, in image elements

maxTexture3DAlt#

Maximum alternate 3D texture dims

maxTextureCubemap#

Maximum cubemap texture dims

maxTextureCubemapLayered#

Maximum cubemaps layered texture dims

maxThreadsDim#

Max number of threads in each dimension (XYZ) of a block.

maxThreadsPerBlock#

Max work items per work group or workgroup max size.

maxThreadsPerMultiProcessor#

Maximum resident threads per multi-processor.

memPitch#

Maximum pitch in bytes allowed by memory copies pitched memory

memoryBusWidth#

Global memory bus width in bits.

memoryClockRate#

Max global memory clock frequency in khz.

memoryPoolSupportedHandleTypes#

Bitmask of handle types support with mempool based IPC

memoryPoolsSupported#

Indicates if device supports hipMallocAsync and hipMemPool APIs

minor#

Minor compute capability. On HCC, this is an approximation and features may differ from CUDA CC. See the arch feature flags for portable ways to query feature caps.

multiGpuBoardGroupID#

Unique identifier for a group of devices on same multiboard GPU

multiProcessorCount#

Number of multi-processors (compute units).

name#

Device name.

pageableMemoryAccess#

Device supports coherently accessing pageable memory without calling hipHostRegister on it

pageableMemoryAccessUsesHostPageTables#

Device accesses pageable memory via the host’s page tables

pciBusID#

PCI Bus ID.

pciDeviceID#

PCI Device ID.

pciDomainID#

PCI Domain ID

persistingL2CacheMaxSize#

Device’s max L2 persisting lines in bytes

regsPerBlock#

Registers per block.

regsPerMultiprocessor#

registers available per multiprocessor

reserved#

CUDA Reserved.

reservedSharedMemPerBlock#

Shared memory reserved by driver per block

set_ECCEnabled(self, i, int value)#

Set value ECCEnabled of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_accessPolicyMaxWindowSize(self, i, int value)#

Set value accessPolicyMaxWindowSize of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_asicRevision(self, i, int value)#

Set value asicRevision of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_asyncEngineCount(self, i, int value)#

Set value asyncEngineCount of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_canMapHostMemory(self, i, int value)#

Set value canMapHostMemory of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_canUseHostPointerForRegisteredMem(self, i, int value)#

Set value canUseHostPointerForRegisteredMem of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_clockInstructionRate(self, i, int value)#

Set value clockInstructionRate of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_clockRate(self, i, int value)#

Set value clockRate of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_clusterLaunch(self, i, int value)#

Set value clusterLaunch of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_computeMode(self, i, int value)#

Set value computeMode of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_computePreemptionSupported(self, i, int value)#

Set value computePreemptionSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_concurrentKernels(self, i, int value)#

Set value concurrentKernels of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_concurrentManagedAccess(self, i, int value)#

Set value concurrentManagedAccess of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_cooperativeLaunch(self, i, int value)#

Set value cooperativeLaunch of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_cooperativeMultiDeviceLaunch(self, i, int value)#

Set value cooperativeMultiDeviceLaunch of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_cooperativeMultiDeviceUnmatchedBlockDim(self, i, int value)#

Set value cooperativeMultiDeviceUnmatchedBlockDim of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_cooperativeMultiDeviceUnmatchedFunc(self, i, int value)#

Set value cooperativeMultiDeviceUnmatchedFunc of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_cooperativeMultiDeviceUnmatchedGridDim(self, i, int value)#

Set value cooperativeMultiDeviceUnmatchedGridDim of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_cooperativeMultiDeviceUnmatchedSharedMem(self, i, int value)#

Set value cooperativeMultiDeviceUnmatchedSharedMem of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_deferredMappingHipArraySupported(self, i, int value)#

Set value deferredMappingHipArraySupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_deviceOverlap(self, i, int value)#

Set value deviceOverlap of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_directManagedMemAccessFromHost(self, i, int value)#

Set value directManagedMemAccessFromHost of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_globalL1CacheSupported(self, i, int value)#

Set value globalL1CacheSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_gpuDirectRDMAFlushWritesOptions(self, i, unsigned int value)#

Set value gpuDirectRDMAFlushWritesOptions of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_gpuDirectRDMASupported(self, i, int value)#

Set value gpuDirectRDMASupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_gpuDirectRDMAWritesOrdering(self, i, int value)#

Set value gpuDirectRDMAWritesOrdering of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_hdpMemFlushCntl(self, i, value)#

Set value hdpMemFlushCntl of (<chip.hipDeviceProp_t*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_hdpRegFlushCntl(self, i, value)#

Set value hdpRegFlushCntl of (<chip.hipDeviceProp_t*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_hostNativeAtomicSupported(self, i, int value)#

Set value hostNativeAtomicSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_hostRegisterReadOnlySupported(self, i, int value)#

Set value hostRegisterReadOnlySupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_hostRegisterSupported(self, i, int value)#

Set value hostRegisterSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_integrated(self, i, int value)#

Set value integrated of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_ipcEventSupported(self, i, int value)#

Set value ipcEventSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_isLargeBar(self, i, int value)#

Set value isLargeBar of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_isMultiGpuBoard(self, i, int value)#

Set value isMultiGpuBoard of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_kernelExecTimeoutEnabled(self, i, int value)#

Set value kernelExecTimeoutEnabled of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_l2CacheSize(self, i, int value)#

Set value l2CacheSize of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_localL1CacheSupported(self, i, int value)#

Set value localL1CacheSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_luidDeviceNodeMask(self, i, unsigned int value)#

Set value luidDeviceNodeMask of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_major(self, i, int value)#

Set value major of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_managedMemory(self, i, int value)#

Set value managedMemory of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxBlocksPerMultiProcessor(self, i, int value)#

Set value maxBlocksPerMultiProcessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxSharedMemoryPerMultiProcessor(self, i, unsigned long value)#

Set value maxSharedMemoryPerMultiProcessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxSurface1D(self, i, int value)#

Set value maxSurface1D of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxSurfaceCubemap(self, i, int value)#

Set value maxSurfaceCubemap of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxTexture1D(self, i, int value)#

Set value maxTexture1D of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxTexture1DLinear(self, i, int value)#

Set value maxTexture1DLinear of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxTexture1DMipmap(self, i, int value)#

Set value maxTexture1DMipmap of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxTextureCubemap(self, i, int value)#

Set value maxTextureCubemap of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxThreadsPerBlock(self, i, int value)#

Set value maxThreadsPerBlock of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_maxThreadsPerMultiProcessor(self, i, int value)#

Set value maxThreadsPerMultiProcessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_memPitch(self, i, unsigned long value)#

Set value memPitch of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_memoryBusWidth(self, i, int value)#

Set value memoryBusWidth of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_memoryClockRate(self, i, int value)#

Set value memoryClockRate of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_memoryPoolSupportedHandleTypes(self, i, unsigned int value)#

Set value memoryPoolSupportedHandleTypes of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_memoryPoolsSupported(self, i, int value)#

Set value memoryPoolsSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_minor(self, i, int value)#

Set value minor of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_multiGpuBoardGroupID(self, i, int value)#

Set value multiGpuBoardGroupID of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_multiProcessorCount(self, i, int value)#

Set value multiProcessorCount of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_pageableMemoryAccess(self, i, int value)#

Set value pageableMemoryAccess of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_pageableMemoryAccessUsesHostPageTables(self, i, int value)#

Set value pageableMemoryAccessUsesHostPageTables of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_pciBusID(self, i, int value)#

Set value pciBusID of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_pciDeviceID(self, i, int value)#

Set value pciDeviceID of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_pciDomainID(self, i, int value)#

Set value pciDomainID of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_persistingL2CacheMaxSize(self, i, int value)#

Set value persistingL2CacheMaxSize of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_regsPerBlock(self, i, int value)#

Set value regsPerBlock of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_regsPerMultiprocessor(self, i, int value)#

Set value regsPerMultiprocessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_reservedSharedMemPerBlock(self, i, unsigned long value)#

Set value reservedSharedMemPerBlock of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_sharedMemPerBlock(self, i, unsigned long value)#

Set value sharedMemPerBlock of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_sharedMemPerBlockOptin(self, i, unsigned long value)#

Set value sharedMemPerBlockOptin of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_sharedMemPerMultiprocessor(self, i, unsigned long value)#

Set value sharedMemPerMultiprocessor of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_singleToDoublePrecisionPerfRatio(self, i, int value)#

Set value singleToDoublePrecisionPerfRatio of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_sparseHipArraySupported(self, i, int value)#

Set value sparseHipArraySupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_streamPrioritiesSupported(self, i, int value)#

Set value streamPrioritiesSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_surfaceAlignment(self, i, unsigned long value)#

Set value surfaceAlignment of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_tccDriver(self, i, int value)#

Set value tccDriver of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_textureAlignment(self, i, unsigned long value)#

Set value textureAlignment of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_texturePitchAlignment(self, i, unsigned long value)#

Set value texturePitchAlignment of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_timelineSemaphoreInteropSupported(self, i, int value)#

Set value timelineSemaphoreInteropSupported of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_totalConstMem(self, i, unsigned long value)#

Set value totalConstMem of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_totalGlobalMem(self, i, unsigned long value)#

Set value totalGlobalMem of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_unifiedAddressing(self, i, int value)#

Set value unifiedAddressing of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_unifiedFunctionPointers(self, i, int value)#

Set value unifiedFunctionPointers of (<chip.hipDeviceProp_t*>self._ptr)[i].

set_warpSize(self, i, int value)#

Set value warpSize of (<chip.hipDeviceProp_t*>self._ptr)[i].

sharedMemPerBlock#

Size of shared memory region (in bytes).

sharedMemPerBlockOptin#

Per device m ax shared mem per block usable by special opt in

sharedMemPerMultiprocessor#

Amount of shared memory available per multiprocessor.

singleToDoublePrecisionPerfRatio#

Deprecated. CUDA only.

sparseHipArraySupported#

Indicates if device supports sparse hip arrays

streamPrioritiesSupported#

Device supports stream priority

surfaceAlignment#

Alignment requirement for surface

tccDriver#

1:If device is Tesla device using TCC driver, else 0

textureAlignment#

Alignment requirement for textures

texturePitchAlignment#

Pitch alignment requirement for texture references bound to

timelineSemaphoreInteropSupported#

Indicates external timeline semaphore support

totalConstMem#

Size of shared memory region (in bytes).

totalGlobalMem#

Size of global memory region (in bytes).

unifiedAddressing#

Does device and host share unified address space

unifiedFunctionPointers#

Indicates device supports unified function pointers

uuid#

UUID of a device

warpSize#

Warp size.

class hip.hip.hipMemoryType(for pointer attributes)#

Bases: _hipMemoryType__Base

Attributes:
hipMemoryTypeUnregistered:

Unregistered memory

hipMemoryTypeHost:

Memory is physically located on host

hipMemoryTypeDevice:

Memory is physically located on device. (see deviceId for specific device)

hipMemoryTypeManaged:

Managed memory, automaticallly managed by the unified memory system place holder for new values.

hipMemoryTypeArray:

Array memory, physically located on device. (see deviceId for specific device)

hipMemoryTypeUnified:

unified address space

hipMemoryTypeUnregistered = 0#
hipMemoryTypeHost = 1#
hipMemoryTypeDevice = 2#
hipMemoryTypeManaged = 3#
hipMemoryTypeArray = 10#
hipMemoryTypeUnified = 11#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipPointerAttribute_t(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipPointerAttribute_t.

Python wrapper for cdef class chip.hipPointerAttribute_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipPointerAttribute_t.

Constructor for type hipPointerAttribute_t.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

allocationFlags#

(undocumented)

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

device#

(undocumented)

devicePointer#

(undocumented) Note:

Setting this devicePointer can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static fromObj(pyobj)#

Creates a hipPointerAttribute_t from a Python object.

Derives a hipPointerAttribute_t from the given Python object pyobj. In case pyobj is itself an hipPointerAttribute_t reference, this method returns it directly. No new hipPointerAttribute_t is created in this case.

get_allocationFlags(self, i)#

Get value allocationFlags of (<chip.hipPointerAttribute_t*>self._ptr)[i].

get_device(self, i)#

Get value device of (<chip.hipPointerAttribute_t*>self._ptr)[i].

get_devicePointer(self, i)#

Get value devicePointer of (<chip.hipPointerAttribute_t*>self._ptr)[i].

get_hostPointer(self, i)#

Get value hostPointer of (<chip.hipPointerAttribute_t*>self._ptr)[i].

get_isManaged(self, i)#

Get value isManaged of (<chip.hipPointerAttribute_t*>self._ptr)[i].

get_type(self, i)#

Get value of type of (<chip.hipPointerAttribute_t*>self._ptr)[i].

hostPointer#

(undocumented) Note:

Setting this hostPointer can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

isManaged#

(undocumented)

is_ptr_null#

If data pointer is NULL.

set_allocationFlags(self, i, unsigned int value)#

Set value allocationFlags of (<chip.hipPointerAttribute_t*>self._ptr)[i].

set_device(self, i, int value)#

Set value device of (<chip.hipPointerAttribute_t*>self._ptr)[i].

set_devicePointer(self, i, value)#

Set value devicePointer of (<chip.hipPointerAttribute_t*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_hostPointer(self, i, value)#

Set value hostPointer of (<chip.hipPointerAttribute_t*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_isManaged(self, i, int value)#

Set value isManaged of (<chip.hipPointerAttribute_t*>self._ptr)[i].

set_type(self, i, value)#

Set value type of (<chip.hipPointerAttribute_t*>self._ptr)[i].

type#

(undocumented)

class hip.hip.hipError_t(value)#

Bases: _hipError_t__Base

HIP error type

Attributes:
hipSuccess:

Successful completion.

hipErrorInvalidValue:

One or more of the parameters passed to the API call is NULL or not in an acceptable range.

hipErrorOutOfMemory:

out of memory range.

hipErrorMemoryAllocation:

Memory allocation error.

hipErrorNotInitialized:

Invalid not initialized

hipErrorInitializationError:

(undocumented)

hipErrorDeinitialized:

Deinitialized

hipErrorProfilerDisabled:

(undocumented)

hipErrorProfilerNotInitialized:

(undocumented)

hipErrorProfilerAlreadyStarted:

(undocumented)

hipErrorProfilerAlreadyStopped:

(undocumented)

hipErrorInvalidConfiguration:

Invalide configuration

hipErrorInvalidPitchValue:

Invalid pitch value

hipErrorInvalidSymbol:

Invalid symbol

hipErrorInvalidDevicePointer:

Invalid Device Pointer

hipErrorInvalidMemcpyDirection:

Invalid memory copy direction

hipErrorInsufficientDriver:

(undocumented)

hipErrorMissingConfiguration:

(undocumented)

hipErrorPriorLaunchFailure:

(undocumented)

hipErrorInvalidDeviceFunction:

Invalid device function

hipErrorNoDevice:

Call to hipGetDeviceCount returned 0 devices

hipErrorInvalidDevice:

DeviceID must be in range from 0 to compute-devices.

hipErrorInvalidImage:

Invalid image

hipErrorInvalidContext:

Produced when input context is invalid.

hipErrorContextAlreadyCurrent:

(undocumented)

hipErrorMapFailed:

(undocumented)

hipErrorMapBufferObjectFailed:

Produced when the IPC memory attach failed from ROCr.

hipErrorUnmapFailed:

(undocumented)

hipErrorArrayIsMapped:

(undocumented)

hipErrorAlreadyMapped:

(undocumented)

hipErrorNoBinaryForGpu:

(undocumented)

hipErrorAlreadyAcquired:

(undocumented)

hipErrorNotMapped:

(undocumented)

hipErrorNotMappedAsArray:

(undocumented)

hipErrorNotMappedAsPointer:

(undocumented)

hipErrorECCNotCorrectable:

(undocumented)

hipErrorUnsupportedLimit:

Unsupported limit

hipErrorContextAlreadyInUse:

The context is already in use

hipErrorPeerAccessUnsupported:

(undocumented)

hipErrorInvalidKernelFile:

In CUDA DRV, it is CUDA_ERROR_INVALID_PTX

hipErrorInvalidGraphicsContext:

(undocumented)

hipErrorInvalidSource:

Invalid source.

hipErrorFileNotFound:

the file is not found.

hipErrorSharedObjectSymbolNotFound:

(undocumented)

hipErrorSharedObjectInitFailed:

Failed to initialize shared object.

hipErrorOperatingSystem:

Not the correct operating system

hipErrorInvalidHandle:

Invalide handle

hipErrorInvalidResourceHandle:

Resource handle (hipEvent_t or hipStream_t) invalid.

hipErrorIllegalState:

Resource required is not in a valid state to perform operation.

hipErrorNotFound:

Not found

hipErrorNotReady:

Indicates that asynchronous operations enqueued earlier are not ready. This is not actually an error, but is used to distinguish from hipSuccess (which indicates completion). APIs that return this error include hipEventQuery and hipStreamQuery.

hipErrorIllegalAddress:

(undocumented)

hipErrorLaunchOutOfResources:

Out of resources error.

hipErrorLaunchTimeOut:

Timeout for the launch.

hipErrorPeerAccessAlreadyEnabled:

(undocumented)

hipErrorPeerAccessNotEnabled:

(undocumented)

hipErrorSetOnActiveProcess:

The process is active.

hipErrorContextIsDestroyed:

The context is already destroyed

hipErrorAssert:

Produced when the kernel calls assert.

hipErrorHostMemoryAlreadyRegistered:

(undocumented)

hipErrorHostMemoryNotRegistered:

(undocumented)

hipErrorLaunchFailure:

(undocumented)

hipErrorCooperativeLaunchTooLarge:

(undocumented)

hipErrorNotSupported:

Produced when the hip API is not supported/implemented

hipErrorStreamCaptureUnsupported:

The operation is not permitted when the stream is capturing.

hipErrorStreamCaptureInvalidated:

The current capture sequence on the stream has been invalidated due to a previous error.

hipErrorStreamCaptureMerge:

The operation would have resulted in a merge of two independent capture sequences.

hipErrorStreamCaptureUnmatched:

The capture was not initiated in this stream.

hipErrorStreamCaptureUnjoined:

The capture sequence contains a fork that was not joined to the primary stream.

hipErrorStreamCaptureIsolation:

A dependency would have been created which crosses the capture sequence boundary. Only implicit in-stream ordering dependencies are allowed to cross the boundary

hipErrorStreamCaptureImplicit:

The operation would have resulted in a disallowed implicit dependency on a current capture sequence from hipStreamLegacy.

hipErrorCapturedEvent:

The operation is not permitted on an event which was last recorded in a capturing stream.

hipErrorStreamCaptureWrongThread:

A stream capture sequence not initiated with the hipStreamCaptureModeRelaxed argument to hipStreamBeginCapture was passed to hipStreamEndCapture in a different thread.

hipErrorGraphExecUpdateFailure:

This error indicates that the graph update not performed because it included changes which violated constraintsspecific to instantiated graph update.

hipErrorUnknown:

Unknown error.

hipErrorRuntimeMemory:

HSA runtime memory call returned error. Typically not seen in production systems.

hipErrorRuntimeOther:

HSA runtime call other than memory returned error. Typically not seen in production systems.

hipErrorTbd:

Marker that more error codes are needed.

hipSuccess = 0#
hipErrorInvalidValue = 1#
hipErrorOutOfMemory = 2#
hipErrorMemoryAllocation = 2#
hipErrorNotInitialized = 3#
hipErrorInitializationError = 3#
hipErrorDeinitialized = 4#
hipErrorProfilerDisabled = 5#
hipErrorProfilerNotInitialized = 6#
hipErrorProfilerAlreadyStarted = 7#
hipErrorProfilerAlreadyStopped = 8#
hipErrorInvalidConfiguration = 9#
hipErrorInvalidPitchValue = 12#
hipErrorInvalidSymbol = 13#
hipErrorInvalidDevicePointer = 17#
hipErrorInvalidMemcpyDirection = 21#
hipErrorInsufficientDriver = 35#
hipErrorMissingConfiguration = 52#
hipErrorPriorLaunchFailure = 53#
hipErrorInvalidDeviceFunction = 98#
hipErrorNoDevice = 100#
hipErrorInvalidDevice = 101#
hipErrorInvalidImage = 200#
hipErrorInvalidContext = 201#
hipErrorContextAlreadyCurrent = 202#
hipErrorMapFailed = 205#
hipErrorMapBufferObjectFailed = 205#
hipErrorUnmapFailed = 206#
hipErrorArrayIsMapped = 207#
hipErrorAlreadyMapped = 208#
hipErrorNoBinaryForGpu = 209#
hipErrorAlreadyAcquired = 210#
hipErrorNotMapped = 211#
hipErrorNotMappedAsArray = 212#
hipErrorNotMappedAsPointer = 213#
hipErrorECCNotCorrectable = 214#
hipErrorUnsupportedLimit = 215#
hipErrorContextAlreadyInUse = 216#
hipErrorPeerAccessUnsupported = 217#
hipErrorInvalidKernelFile = 218#
hipErrorInvalidGraphicsContext = 219#
hipErrorInvalidSource = 300#
hipErrorFileNotFound = 301#
hipErrorSharedObjectSymbolNotFound = 302#
hipErrorSharedObjectInitFailed = 303#
hipErrorOperatingSystem = 304#
hipErrorInvalidHandle = 400#
hipErrorInvalidResourceHandle = 400#
hipErrorIllegalState = 401#
hipErrorNotFound = 500#
hipErrorNotReady = 600#
hipErrorIllegalAddress = 700#
hipErrorLaunchOutOfResources = 701#
hipErrorLaunchTimeOut = 702#
hipErrorPeerAccessAlreadyEnabled = 704#
hipErrorPeerAccessNotEnabled = 705#
hipErrorSetOnActiveProcess = 708#
hipErrorContextIsDestroyed = 709#
hipErrorAssert = 710#
hipErrorHostMemoryAlreadyRegistered = 712#
hipErrorHostMemoryNotRegistered = 713#
hipErrorLaunchFailure = 719#
hipErrorCooperativeLaunchTooLarge = 720#
hipErrorNotSupported = 801#
hipErrorStreamCaptureUnsupported = 900#
hipErrorStreamCaptureInvalidated = 901#
hipErrorStreamCaptureMerge = 902#
hipErrorStreamCaptureUnmatched = 903#
hipErrorStreamCaptureUnjoined = 904#
hipErrorStreamCaptureIsolation = 905#
hipErrorStreamCaptureImplicit = 906#
hipErrorCapturedEvent = 907#
hipErrorStreamCaptureWrongThread = 908#
hipErrorGraphExecUpdateFailure = 910#
hipErrorUnknown = 999#
hipErrorRuntimeMemory = 1052#
hipErrorRuntimeOther = 1053#
hipErrorTbd = 1054#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipDeviceAttribute_t(value)#

Bases: _hipDeviceAttribute_t__Base

hipDeviceAttribute_t hipDeviceAttributeUnused number: 5

Attributes:
hipDeviceAttributeCudaCompatibleBegin:

(undocumented)

hipDeviceAttributeEccEnabled:

Whether ECC support is enabled.

hipDeviceAttributeAccessPolicyMaxWindowSize:

Cuda only. The maximum size of the window policy in bytes.

hipDeviceAttributeAsyncEngineCount:

Asynchronous engines number.

hipDeviceAttributeCanMapHostMemory:

Whether host memory can be mapped into device address space

hipDeviceAttributeCanUseHostPointerForRegisteredMem:

Device can access host registered memory at the same virtual address as the CPU

hipDeviceAttributeClockRate:

Peak clock frequency in kilohertz.

hipDeviceAttributeComputeMode:

Compute mode that device is currently in.

hipDeviceAttributeComputePreemptionSupported:

Device supports Compute Preemption.

hipDeviceAttributeConcurrentKernels:

Device can possibly execute multiple kernels concurrently.

hipDeviceAttributeConcurrentManagedAccess:

Device can coherently access managed memory concurrently with the CPU

hipDeviceAttributeCooperativeLaunch:

Support cooperative launch

hipDeviceAttributeCooperativeMultiDeviceLaunch:

Support cooperative launch on multiple devices

hipDeviceAttributeDeviceOverlap:

Device can concurrently copy memory and execute a kernel. Deprecated. Use instead asyncEngineCount.

hipDeviceAttributeDirectManagedMemAccessFromHost:

Host can directly access managed memory on the device without migration

hipDeviceAttributeGlobalL1CacheSupported:

Device supports caching globals in L1

hipDeviceAttributeHostNativeAtomicSupported:

Link between the device and the host supports native atomic operations

hipDeviceAttributeIntegrated:

Device is integrated GPU

hipDeviceAttributeIsMultiGpuBoard:

Multiple GPU devices.

hipDeviceAttributeKernelExecTimeout:

Run time limit for kernels executed on the device

hipDeviceAttributeL2CacheSize:

Size of L2 cache in bytes. 0 if the device doesn’t have L2 cache.

hipDeviceAttributeLocalL1CacheSupported:

caching locals in L1 is supported

hipDeviceAttributeLuid:

8-byte locally unique identifier in 8 bytes. Undefined on TCC and non-Windows platforms

hipDeviceAttributeLuidDeviceNodeMask:

Luid device node mask. Undefined on TCC and non-Windows platforms

hipDeviceAttributeComputeCapabilityMajor:

Major compute capability version number.

hipDeviceAttributeManagedMemory:

Device supports allocating managed memory on this system

hipDeviceAttributeMaxBlocksPerMultiProcessor:

Max block size per multiprocessor

hipDeviceAttributeMaxBlockDimX:

Max block size in width.

hipDeviceAttributeMaxBlockDimY:

Max block size in height.

hipDeviceAttributeMaxBlockDimZ:

Max block size in depth.

hipDeviceAttributeMaxGridDimX:

Max grid size in width.

hipDeviceAttributeMaxGridDimY:

Max grid size in height.

hipDeviceAttributeMaxGridDimZ:

Max grid size in depth.

hipDeviceAttributeMaxSurface1D:

Maximum size of 1D surface.

hipDeviceAttributeMaxSurface1DLayered:

Cuda only. Maximum dimensions of 1D layered surface.

hipDeviceAttributeMaxSurface2D:

Maximum dimension (width, height) of 2D surface.

hipDeviceAttributeMaxSurface2DLayered:

Cuda only. Maximum dimensions of 2D layered surface.

hipDeviceAttributeMaxSurface3D:

Maximum dimension (width, height, depth) of 3D surface.

hipDeviceAttributeMaxSurfaceCubemap:

Cuda only. Maximum dimensions of Cubemap surface.

hipDeviceAttributeMaxSurfaceCubemapLayered:

Cuda only. Maximum dimension of Cubemap layered surface.

hipDeviceAttributeMaxTexture1DWidth:

Maximum size of 1D texture.

hipDeviceAttributeMaxTexture1DLayered:

Maximum dimensions of 1D layered texture.

hipDeviceAttributeMaxTexture1DLinear:

Maximum number of elements allocatable in a 1D linear texture. Use cudaDeviceGetTexture1DLinearMaxWidth() instead on Cuda.

hipDeviceAttributeMaxTexture1DMipmap:

Maximum size of 1D mipmapped texture.

hipDeviceAttributeMaxTexture2DWidth:

Maximum dimension width of 2D texture.

hipDeviceAttributeMaxTexture2DHeight:

Maximum dimension hight of 2D texture.

hipDeviceAttributeMaxTexture2DGather:

Maximum dimensions of 2D texture if gather operations performed.

hipDeviceAttributeMaxTexture2DLayered:

Maximum dimensions of 2D layered texture.

hipDeviceAttributeMaxTexture2DLinear:

Maximum dimensions (width, height, pitch) of 2D textures bound to pitched memory.

hipDeviceAttributeMaxTexture2DMipmap:

Maximum dimensions of 2D mipmapped texture.

hipDeviceAttributeMaxTexture3DWidth:

Maximum dimension width of 3D texture.

hipDeviceAttributeMaxTexture3DHeight:

Maximum dimension height of 3D texture.

hipDeviceAttributeMaxTexture3DDepth:

Maximum dimension depth of 3D texture.

hipDeviceAttributeMaxTexture3DAlt:

Maximum dimensions of alternate 3D texture.

hipDeviceAttributeMaxTextureCubemap:

Maximum dimensions of Cubemap texture

hipDeviceAttributeMaxTextureCubemapLayered:

Maximum dimensions of Cubemap layered texture.

hipDeviceAttributeMaxThreadsDim:

Maximum dimension of a block

hipDeviceAttributeMaxThreadsPerBlock:

Maximum number of threads per block.

hipDeviceAttributeMaxThreadsPerMultiProcessor:

Maximum resident threads per multiprocessor.

hipDeviceAttributeMaxPitch:

Maximum pitch in bytes allowed by memory copies

hipDeviceAttributeMemoryBusWidth:

Global memory bus width in bits.

hipDeviceAttributeMemoryClockRate:

Peak memory clock frequency in kilohertz.

hipDeviceAttributeComputeCapabilityMinor:

Minor compute capability version number.

hipDeviceAttributeMultiGpuBoardGroupID:

Unique ID of device group on the same multi-GPU board

hipDeviceAttributeMultiprocessorCount:

Number of multiprocessors on the device.

hipDeviceAttributeUnused1:

Previously hipDeviceAttributeName

hipDeviceAttributePageableMemoryAccess:

Device supports coherently accessing pageable memory without calling hipHostRegister on it

hipDeviceAttributePageableMemoryAccessUsesHostPageTables:

Device accesses pageable memory via the host’s page tables

hipDeviceAttributePciBusId:

PCI Bus ID.

hipDeviceAttributePciDeviceId:

PCI Device ID.

hipDeviceAttributePciDomainID:

PCI Domain ID.

hipDeviceAttributePersistingL2CacheMaxSize:

Maximum l2 persisting lines capacity in bytes

hipDeviceAttributeMaxRegistersPerBlock:

32-bit registers available to a thread block. This number is shared by all thread blocks simultaneously resident on a multiprocessor.

hipDeviceAttributeMaxRegistersPerMultiprocessor:

32-bit registers available per block.

hipDeviceAttributeReservedSharedMemPerBlock:

Shared memory reserved by CUDA driver per block.

hipDeviceAttributeMaxSharedMemoryPerBlock:

Maximum shared memory available per block in bytes.

hipDeviceAttributeSharedMemPerBlockOptin:

Maximum shared memory per block usable by special opt in.

hipDeviceAttributeSharedMemPerMultiprocessor:

Shared memory available per multiprocessor.

hipDeviceAttributeSingleToDoublePrecisionPerfRatio:

Cuda only. Performance ratio of single precision to double precision.

hipDeviceAttributeStreamPrioritiesSupported:

Whether to support stream priorities.

hipDeviceAttributeSurfaceAlignment:

Alignment requirement for surfaces

hipDeviceAttributeTccDriver:

Cuda only. Whether device is a Tesla device using TCC driver

hipDeviceAttributeTextureAlignment:

Alignment requirement for textures

hipDeviceAttributeTexturePitchAlignment:

Pitch alignment requirement for 2D texture references bound to pitched memory;

hipDeviceAttributeTotalConstantMemory:

Constant memory size in bytes.

hipDeviceAttributeTotalGlobalMem:

Global memory available on devicice.

hipDeviceAttributeUnifiedAddressing:

Cuda only. An unified address space shared with the host.

hipDeviceAttributeUnused2:

Previously hipDeviceAttributeUuid

hipDeviceAttributeWarpSize:

Warp size in threads.

hipDeviceAttributeMemoryPoolsSupported:

Device supports HIP Stream Ordered Memory Allocator

hipDeviceAttributeVirtualMemoryManagementSupported:

Device supports HIP virtual memory management

hipDeviceAttributeHostRegisterSupported:

Can device support host memory registration via hipHostRegister

hipDeviceAttributeCudaCompatibleEnd:

(undocumented)

hipDeviceAttributeAmdSpecificBegin:

(undocumented)

hipDeviceAttributeClockInstructionRate:

Frequency in khz of the timer used by the device-side “clock*”

hipDeviceAttributeUnused3:

Previously hipDeviceAttributeArch

hipDeviceAttributeMaxSharedMemoryPerMultiprocessor:

Maximum Shared Memory PerMultiprocessor.

hipDeviceAttributeUnused4:

Previously hipDeviceAttributeGcnArch

hipDeviceAttributeUnused5:

Previously hipDeviceAttributeGcnArchName

hipDeviceAttributeHdpMemFlushCntl:

Address of the HDP_MEM_COHERENCY_FLUSH_CNTL register

hipDeviceAttributeHdpRegFlushCntl:

Address of the HDP_REG_COHERENCY_FLUSH_CNTL register

hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc:

Supports cooperative launch on multiple devices with unmatched functions

hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim:

Supports cooperative launch on multiple devices with unmatched grid dimensions

hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim:

Supports cooperative launch on multiple devices with unmatched block dimensions

hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem:

Supports cooperative launch on multiple devices with unmatched shared memories

hipDeviceAttributeIsLargeBar:

Whether it is LargeBar

hipDeviceAttributeAsicRevision:

Revision of the GPU in this device

hipDeviceAttributeCanUseStreamWaitValue:

‘1’ if Device supports hipStreamWaitValue32() and hipStreamWaitValue64(), ‘0’ otherwise.

hipDeviceAttributeImageSupport:

‘1’ if Device supports image, ‘0’ otherwise.

hipDeviceAttributePhysicalMultiProcessorCount:

All available physical compute units for the device

hipDeviceAttributeFineGrainSupport:

‘1’ if Device supports fine grain, ‘0’ otherwise

hipDeviceAttributeWallClockRate:

Constant frequency of wall clock in kilohertz.

hipDeviceAttributeAmdSpecificEnd:

(undocumented)

hipDeviceAttributeVendorSpecificBegin:

(undocumented)

hipDeviceAttributeCudaCompatibleBegin = 0#
hipDeviceAttributeEccEnabled = 0#
hipDeviceAttributeAccessPolicyMaxWindowSize = 1#
hipDeviceAttributeAsyncEngineCount = 2#
hipDeviceAttributeCanMapHostMemory = 3#
hipDeviceAttributeCanUseHostPointerForRegisteredMem = 4#
hipDeviceAttributeClockRate = 5#
hipDeviceAttributeComputeMode = 6#
hipDeviceAttributeComputePreemptionSupported = 7#
hipDeviceAttributeConcurrentKernels = 8#
hipDeviceAttributeConcurrentManagedAccess = 9#
hipDeviceAttributeCooperativeLaunch = 10#
hipDeviceAttributeCooperativeMultiDeviceLaunch = 11#
hipDeviceAttributeDeviceOverlap = 12#
hipDeviceAttributeDirectManagedMemAccessFromHost = 13#
hipDeviceAttributeGlobalL1CacheSupported = 14#
hipDeviceAttributeHostNativeAtomicSupported = 15#
hipDeviceAttributeIntegrated = 16#
hipDeviceAttributeIsMultiGpuBoard = 17#
hipDeviceAttributeKernelExecTimeout = 18#
hipDeviceAttributeL2CacheSize = 19#
hipDeviceAttributeLocalL1CacheSupported = 20#
hipDeviceAttributeLuid = 21#
hipDeviceAttributeLuidDeviceNodeMask = 22#
hipDeviceAttributeComputeCapabilityMajor = 23#
hipDeviceAttributeManagedMemory = 24#
hipDeviceAttributeMaxBlocksPerMultiProcessor = 25#
hipDeviceAttributeMaxBlockDimX = 26#
hipDeviceAttributeMaxBlockDimY = 27#
hipDeviceAttributeMaxBlockDimZ = 28#
hipDeviceAttributeMaxGridDimX = 29#
hipDeviceAttributeMaxGridDimY = 30#
hipDeviceAttributeMaxGridDimZ = 31#
hipDeviceAttributeMaxSurface1D = 32#
hipDeviceAttributeMaxSurface1DLayered = 33#
hipDeviceAttributeMaxSurface2D = 34#
hipDeviceAttributeMaxSurface2DLayered = 35#
hipDeviceAttributeMaxSurface3D = 36#
hipDeviceAttributeMaxSurfaceCubemap = 37#
hipDeviceAttributeMaxSurfaceCubemapLayered = 38#
hipDeviceAttributeMaxTexture1DWidth = 39#
hipDeviceAttributeMaxTexture1DLayered = 40#
hipDeviceAttributeMaxTexture1DLinear = 41#
hipDeviceAttributeMaxTexture1DMipmap = 42#
hipDeviceAttributeMaxTexture2DWidth = 43#
hipDeviceAttributeMaxTexture2DHeight = 44#
hipDeviceAttributeMaxTexture2DGather = 45#
hipDeviceAttributeMaxTexture2DLayered = 46#
hipDeviceAttributeMaxTexture2DLinear = 47#
hipDeviceAttributeMaxTexture2DMipmap = 48#
hipDeviceAttributeMaxTexture3DWidth = 49#
hipDeviceAttributeMaxTexture3DHeight = 50#
hipDeviceAttributeMaxTexture3DDepth = 51#
hipDeviceAttributeMaxTexture3DAlt = 52#
hipDeviceAttributeMaxTextureCubemap = 53#
hipDeviceAttributeMaxTextureCubemapLayered = 54#
hipDeviceAttributeMaxThreadsDim = 55#
hipDeviceAttributeMaxThreadsPerBlock = 56#
hipDeviceAttributeMaxThreadsPerMultiProcessor = 57#
hipDeviceAttributeMaxPitch = 58#
hipDeviceAttributeMemoryBusWidth = 59#
hipDeviceAttributeMemoryClockRate = 60#
hipDeviceAttributeComputeCapabilityMinor = 61#
hipDeviceAttributeMultiGpuBoardGroupID = 62#
hipDeviceAttributeMultiprocessorCount = 63#
hipDeviceAttributeUnused1 = 64#
hipDeviceAttributePageableMemoryAccess = 65#
hipDeviceAttributePageableMemoryAccessUsesHostPageTables = 66#
hipDeviceAttributePciBusId = 67#
hipDeviceAttributePciDeviceId = 68#
hipDeviceAttributePciDomainID = 69#
hipDeviceAttributePersistingL2CacheMaxSize = 70#
hipDeviceAttributeMaxRegistersPerBlock = 71#
hipDeviceAttributeMaxRegistersPerMultiprocessor = 72#
hipDeviceAttributeReservedSharedMemPerBlock = 73#
hipDeviceAttributeMaxSharedMemoryPerBlock = 74#
hipDeviceAttributeSharedMemPerBlockOptin = 75#
hipDeviceAttributeSharedMemPerMultiprocessor = 76#
hipDeviceAttributeSingleToDoublePrecisionPerfRatio = 77#
hipDeviceAttributeStreamPrioritiesSupported = 78#
hipDeviceAttributeSurfaceAlignment = 79#
hipDeviceAttributeTccDriver = 80#
hipDeviceAttributeTextureAlignment = 81#
hipDeviceAttributeTexturePitchAlignment = 82#
hipDeviceAttributeTotalConstantMemory = 83#
hipDeviceAttributeTotalGlobalMem = 84#
hipDeviceAttributeUnifiedAddressing = 85#
hipDeviceAttributeUnused2 = 86#
hipDeviceAttributeWarpSize = 87#
hipDeviceAttributeMemoryPoolsSupported = 88#
hipDeviceAttributeVirtualMemoryManagementSupported = 89#
hipDeviceAttributeHostRegisterSupported = 90#
hipDeviceAttributeCudaCompatibleEnd = 9999#
hipDeviceAttributeAmdSpecificBegin = 10000#
hipDeviceAttributeClockInstructionRate = 10000#
hipDeviceAttributeUnused3 = 10001#
hipDeviceAttributeMaxSharedMemoryPerMultiprocessor = 10002#
hipDeviceAttributeUnused4 = 10003#
hipDeviceAttributeUnused5 = 10004#
hipDeviceAttributeHdpMemFlushCntl = 10005#
hipDeviceAttributeHdpRegFlushCntl = 10006#
hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc = 10007#
hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim = 10008#
hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim = 10009#
hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem = 10010#
hipDeviceAttributeIsLargeBar = 10011#
hipDeviceAttributeAsicRevision = 10012#
hipDeviceAttributeCanUseStreamWaitValue = 10013#
hipDeviceAttributeImageSupport = 10014#
hipDeviceAttributePhysicalMultiProcessorCount = 10015#
hipDeviceAttributeFineGrainSupport = 10016#
hipDeviceAttributeWallClockRate = 10017#
hipDeviceAttributeAmdSpecificEnd = 19999#
hipDeviceAttributeVendorSpecificBegin = 20000#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipComputeMode(value)#

Bases: _hipComputeMode__Base

Attributes:
hipComputeModeDefault:

(undocumented)

hipComputeModeExclusive:

(undocumented)

hipComputeModeProhibited:

(undocumented)

hipComputeModeExclusiveProcess:

(undocumented)

hipComputeModeDefault = 0#
hipComputeModeExclusive = 1#
hipComputeModeProhibited = 2#
hipComputeModeExclusiveProcess = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipChannelFormatKind(value)#

Bases: _hipChannelFormatKind__Base

Attributes:
hipChannelFormatKindSigned:

(undocumented)

hipChannelFormatKindUnsigned:

(undocumented)

hipChannelFormatKindFloat:

(undocumented)

hipChannelFormatKindNone:

(undocumented)

hipChannelFormatKindSigned = 0#
hipChannelFormatKindUnsigned = 1#
hipChannelFormatKindFloat = 2#
hipChannelFormatKindNone = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipChannelFormatDesc(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipChannelFormatDesc.

Python wrapper for cdef class chip.hipChannelFormatDesc.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipChannelFormatDesc.

Constructor for type hipChannelFormatDesc.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

f#

(undocumented)

static fromObj(pyobj)#

Creates a hipChannelFormatDesc from a Python object.

Derives a hipChannelFormatDesc from the given Python object pyobj. In case pyobj is itself an hipChannelFormatDesc reference, this method returns it directly. No new hipChannelFormatDesc is created in this case.

get_f(self, i)#

Get value of f of (<chip.hipChannelFormatDesc*>self._ptr)[i].

get_w(self, i)#

Get value w of (<chip.hipChannelFormatDesc*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.hipChannelFormatDesc*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.hipChannelFormatDesc*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.hipChannelFormatDesc*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_f(self, i, value)#

Set value f of (<chip.hipChannelFormatDesc*>self._ptr)[i].

set_w(self, i, int value)#

Set value w of (<chip.hipChannelFormatDesc*>self._ptr)[i].

set_x(self, i, int value)#

Set value x of (<chip.hipChannelFormatDesc*>self._ptr)[i].

set_y(self, i, int value)#

Set value y of (<chip.hipChannelFormatDesc*>self._ptr)[i].

set_z(self, i, int value)#

Set value z of (<chip.hipChannelFormatDesc*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.hipArray#

Bases: Pointer

Python wrapper for cdef class chip.hipArray.

Python wrapper for cdef class chip.hipArray.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipArray from a Python object.

Derives a hipArray from the given Python object pyobj. In case pyobj is itself an hipArray reference, this method returns it directly. No new hipArray is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipArray_t#

alias of hipArray

hip.hip.hipArray_const_t#

alias of hipArray

class hip.hip.hipArray_Format(value)#

Bases: _hipArray_Format__Base

Attributes:
HIP_AD_FORMAT_UNSIGNED_INT8:

(undocumented)

HIP_AD_FORMAT_UNSIGNED_INT16:

(undocumented)

HIP_AD_FORMAT_UNSIGNED_INT32:

(undocumented)

HIP_AD_FORMAT_SIGNED_INT8:

(undocumented)

HIP_AD_FORMAT_SIGNED_INT16:

(undocumented)

HIP_AD_FORMAT_SIGNED_INT32:

(undocumented)

HIP_AD_FORMAT_HALF:

(undocumented)

HIP_AD_FORMAT_FLOAT:

(undocumented)

HIP_AD_FORMAT_UNSIGNED_INT8 = 1#
HIP_AD_FORMAT_UNSIGNED_INT16 = 2#
HIP_AD_FORMAT_UNSIGNED_INT32 = 3#
HIP_AD_FORMAT_SIGNED_INT8 = 8#
HIP_AD_FORMAT_SIGNED_INT16 = 9#
HIP_AD_FORMAT_SIGNED_INT32 = 10#
HIP_AD_FORMAT_HALF = 16#
HIP_AD_FORMAT_FLOAT = 32#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.HIP_ARRAY_DESCRIPTOR(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_ARRAY_DESCRIPTOR.

Python wrapper for cdef class chip.HIP_ARRAY_DESCRIPTOR.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

Format#

(undocumented)

Height#

(undocumented)

NumChannels#

(undocumented)

static PROPERTIES()#
Width#

(undocumented)

__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_ARRAY_DESCRIPTOR.

Constructor for type HIP_ARRAY_DESCRIPTOR.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a HIP_ARRAY_DESCRIPTOR from a Python object.

Derives a HIP_ARRAY_DESCRIPTOR from the given Python object pyobj. In case pyobj is itself an HIP_ARRAY_DESCRIPTOR reference, this method returns it directly. No new HIP_ARRAY_DESCRIPTOR is created in this case.

get_Format(self, i)#

Get value of Format of (<chip.HIP_ARRAY_DESCRIPTOR*>self._ptr)[i].

get_Height(self, i)#

Get value Height of (<chip.HIP_ARRAY_DESCRIPTOR*>self._ptr)[i].

get_NumChannels(self, i)#

Get value NumChannels of (<chip.HIP_ARRAY_DESCRIPTOR*>self._ptr)[i].

get_Width(self, i)#

Get value Width of (<chip.HIP_ARRAY_DESCRIPTOR*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_Format(self, i, value)#

Set value Format of (<chip.HIP_ARRAY_DESCRIPTOR*>self._ptr)[i].

set_Height(self, i, unsigned long value)#

Set value Height of (<chip.HIP_ARRAY_DESCRIPTOR*>self._ptr)[i].

set_NumChannels(self, i, unsigned int value)#

Set value NumChannels of (<chip.HIP_ARRAY_DESCRIPTOR*>self._ptr)[i].

set_Width(self, i, unsigned long value)#

Set value Width of (<chip.HIP_ARRAY_DESCRIPTOR*>self._ptr)[i].

class hip.hip.HIP_ARRAY3D_DESCRIPTOR(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_ARRAY3D_DESCRIPTOR.

Python wrapper for cdef class chip.HIP_ARRAY3D_DESCRIPTOR.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

Depth#

(undocumented)

Flags#

(undocumented)

Format#

(undocumented)

Height#

(undocumented)

NumChannels#

(undocumented)

static PROPERTIES()#
Width#

(undocumented)

__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_ARRAY3D_DESCRIPTOR.

Constructor for type HIP_ARRAY3D_DESCRIPTOR.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a HIP_ARRAY3D_DESCRIPTOR from a Python object.

Derives a HIP_ARRAY3D_DESCRIPTOR from the given Python object pyobj. In case pyobj is itself an HIP_ARRAY3D_DESCRIPTOR reference, this method returns it directly. No new HIP_ARRAY3D_DESCRIPTOR is created in this case.

get_Depth(self, i)#

Get value Depth of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

get_Flags(self, i)#

Get value Flags of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

get_Format(self, i)#

Get value of Format of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

get_Height(self, i)#

Get value Height of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

get_NumChannels(self, i)#

Get value NumChannels of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

get_Width(self, i)#

Get value Width of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_Depth(self, i, unsigned long value)#

Set value Depth of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

set_Flags(self, i, unsigned int value)#

Set value Flags of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

set_Format(self, i, value)#

Set value Format of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

set_Height(self, i, unsigned long value)#

Set value Height of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

set_NumChannels(self, i, unsigned int value)#

Set value NumChannels of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

set_Width(self, i, unsigned long value)#

Set value Width of (<chip.HIP_ARRAY3D_DESCRIPTOR*>self._ptr)[i].

class hip.hip.hip_Memcpy2D(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hip_Memcpy2D.

Python wrapper for cdef class chip.hip_Memcpy2D.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

Height#

(undocumented)

static PROPERTIES()#
WidthInBytes#

(undocumented)

__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hip_Memcpy2D.

Constructor for type hip_Memcpy2D.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

dstDevice#

(undocumented) Note:

Setting this dstDevice can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

dstHost#

(undocumented) Note:

Setting this dstHost can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

dstMemoryType#

(undocumented)

dstPitch#

(undocumented)

dstXInBytes#

(undocumented)

dstY#

(undocumented)

static fromObj(pyobj)#

Creates a hip_Memcpy2D from a Python object.

Derives a hip_Memcpy2D from the given Python object pyobj. In case pyobj is itself an hip_Memcpy2D reference, this method returns it directly. No new hip_Memcpy2D is created in this case.

get_Height(self, i)#

Get value Height of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_WidthInBytes(self, i)#

Get value WidthInBytes of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_dstDevice(self, i)#

Get value dstDevice of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_dstHost(self, i)#

Get value dstHost of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_dstMemoryType(self, i)#

Get value of dstMemoryType of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_dstPitch(self, i)#

Get value dstPitch of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_dstXInBytes(self, i)#

Get value dstXInBytes of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_dstY(self, i)#

Get value dstY of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_srcDevice(self, i)#

Get value srcDevice of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_srcHost(self, i)#

Get value srcHost of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_srcMemoryType(self, i)#

Get value of srcMemoryType of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_srcPitch(self, i)#

Get value srcPitch of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_srcXInBytes(self, i)#

Get value srcXInBytes of (<chip.hip_Memcpy2D*>self._ptr)[i].

get_srcY(self, i)#

Get value srcY of (<chip.hip_Memcpy2D*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_Height(self, i, unsigned long value)#

Set value Height of (<chip.hip_Memcpy2D*>self._ptr)[i].

set_WidthInBytes(self, i, unsigned long value)#

Set value WidthInBytes of (<chip.hip_Memcpy2D*>self._ptr)[i].

set_dstDevice(self, i, value)#

Set value dstDevice of (<chip.hip_Memcpy2D*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_dstHost(self, i, value)#

Set value dstHost of (<chip.hip_Memcpy2D*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_dstMemoryType(self, i, value)#

Set value dstMemoryType of (<chip.hip_Memcpy2D*>self._ptr)[i].

set_dstPitch(self, i, unsigned long value)#

Set value dstPitch of (<chip.hip_Memcpy2D*>self._ptr)[i].

set_dstXInBytes(self, i, unsigned long value)#

Set value dstXInBytes of (<chip.hip_Memcpy2D*>self._ptr)[i].

set_dstY(self, i, unsigned long value)#

Set value dstY of (<chip.hip_Memcpy2D*>self._ptr)[i].

set_srcDevice(self, i, value)#

Set value srcDevice of (<chip.hip_Memcpy2D*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_srcHost(self, i, value)#

Set value srcHost of (<chip.hip_Memcpy2D*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_srcMemoryType(self, i, value)#

Set value srcMemoryType of (<chip.hip_Memcpy2D*>self._ptr)[i].

set_srcPitch(self, i, unsigned long value)#

Set value srcPitch of (<chip.hip_Memcpy2D*>self._ptr)[i].

set_srcXInBytes(self, i, unsigned long value)#

Set value srcXInBytes of (<chip.hip_Memcpy2D*>self._ptr)[i].

set_srcY(self, i, unsigned long value)#

Set value srcY of (<chip.hip_Memcpy2D*>self._ptr)[i].

srcDevice#

(undocumented) Note:

Setting this srcDevice can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

srcHost#

(undocumented) Note:

Setting this srcHost can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

srcMemoryType#

(undocumented)

srcPitch#

(undocumented)

srcXInBytes#

(undocumented)

srcY#

(undocumented)

class hip.hip.hipMipmappedArray(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMipmappedArray.

Python wrapper for cdef class chip.hipMipmappedArray.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMipmappedArray.

Constructor for type hipMipmappedArray.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

data#

(undocumented) Note:

Setting this data can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

depth#

(undocumented)

desc#

(undocumented)

flags#

(undocumented)

format#

(undocumented)

static fromObj(pyobj)#

Creates a hipMipmappedArray from a Python object.

Derives a hipMipmappedArray from the given Python object pyobj. In case pyobj is itself an hipMipmappedArray reference, this method returns it directly. No new hipMipmappedArray is created in this case.

get_data(self, i)#

Get value data of (<chip.hipMipmappedArray*>self._ptr)[i].

get_depth(self, i)#

Get value depth of (<chip.hipMipmappedArray*>self._ptr)[i].

get_desc(self, i)#

Get value of desc of (<chip.hipMipmappedArray*>self._ptr)[i].

get_flags(self, i)#

Get value flags of (<chip.hipMipmappedArray*>self._ptr)[i].

get_format(self, i)#

Get value of format of (<chip.hipMipmappedArray*>self._ptr)[i].

get_height(self, i)#

Get value height of (<chip.hipMipmappedArray*>self._ptr)[i].

get_max_mipmap_level(self, i)#

Get value max_mipmap_level of (<chip.hipMipmappedArray*>self._ptr)[i].

get_min_mipmap_level(self, i)#

Get value min_mipmap_level of (<chip.hipMipmappedArray*>self._ptr)[i].

get_num_channels(self, i)#

Get value num_channels of (<chip.hipMipmappedArray*>self._ptr)[i].

get_type(self, i)#

Get value type of (<chip.hipMipmappedArray*>self._ptr)[i].

get_width(self, i)#

Get value width of (<chip.hipMipmappedArray*>self._ptr)[i].

height#

(undocumented)

is_ptr_null#

If data pointer is NULL.

max_mipmap_level#

(undocumented)

min_mipmap_level#

(undocumented)

num_channels#

(undocumented)

set_data(self, i, value)#

Set value data of (<chip.hipMipmappedArray*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_depth(self, i, unsigned int value)#

Set value depth of (<chip.hipMipmappedArray*>self._ptr)[i].

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.hipMipmappedArray*>self._ptr)[i].

set_format(self, i, value)#

Set value format of (<chip.hipMipmappedArray*>self._ptr)[i].

set_height(self, i, unsigned int value)#

Set value height of (<chip.hipMipmappedArray*>self._ptr)[i].

set_max_mipmap_level(self, i, unsigned int value)#

Set value max_mipmap_level of (<chip.hipMipmappedArray*>self._ptr)[i].

set_min_mipmap_level(self, i, unsigned int value)#

Set value min_mipmap_level of (<chip.hipMipmappedArray*>self._ptr)[i].

set_num_channels(self, i, unsigned int value)#

Set value num_channels of (<chip.hipMipmappedArray*>self._ptr)[i].

set_type(self, i, unsigned int value)#

Set value type of (<chip.hipMipmappedArray*>self._ptr)[i].

set_width(self, i, unsigned int value)#

Set value width of (<chip.hipMipmappedArray*>self._ptr)[i].

type#

(undocumented)

width#

(undocumented)

hip.hip.hipMipmappedArray_t#

alias of hipMipmappedArray

hip.hip.hipMipmappedArray_const_t#

alias of hipMipmappedArray

class hip.hip.hipResourceType(value)#

Bases: _hipResourceType__Base

hip resource types

Attributes:
hipResourceTypeArray:

(undocumented)

hipResourceTypeMipmappedArray:

(undocumented)

hipResourceTypeLinear:

(undocumented)

hipResourceTypePitch2D:

(undocumented)

hipResourceTypeArray = 0#
hipResourceTypeMipmappedArray = 1#
hipResourceTypeLinear = 2#
hipResourceTypePitch2D = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.HIPresourcetype_enum(value)#

Bases: _HIPresourcetype_enum__Base

Attributes:
HIP_RESOURCE_TYPE_ARRAY:

Array resoure

HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY:

Mipmapped array resource

HIP_RESOURCE_TYPE_LINEAR:

Linear resource

HIP_RESOURCE_TYPE_PITCH2D:

Pitch 2D resource

HIP_RESOURCE_TYPE_ARRAY = 0#
HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1#
HIP_RESOURCE_TYPE_LINEAR = 2#
HIP_RESOURCE_TYPE_PITCH2D = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

hip.hip.HIPresourcetype#

alias of HIPresourcetype_enum

hip.hip.hipResourcetype#

alias of HIPresourcetype_enum

class hip.hip.HIPaddress_mode_enum(value)#

Bases: _HIPaddress_mode_enum__Base

hip address modes

Attributes:
HIP_TR_ADDRESS_MODE_WRAP:

(undocumented)

HIP_TR_ADDRESS_MODE_CLAMP:

(undocumented)

HIP_TR_ADDRESS_MODE_MIRROR:

(undocumented)

HIP_TR_ADDRESS_MODE_BORDER:

(undocumented)

HIP_TR_ADDRESS_MODE_WRAP = 0#
HIP_TR_ADDRESS_MODE_CLAMP = 1#
HIP_TR_ADDRESS_MODE_MIRROR = 2#
HIP_TR_ADDRESS_MODE_BORDER = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

hip.hip.HIPaddress_mode#

alias of HIPaddress_mode_enum

class hip.hip.HIPfilter_mode_enum(value)#

Bases: _HIPfilter_mode_enum__Base

hip filter modes

Attributes:
HIP_TR_FILTER_MODE_POINT:

(undocumented)

HIP_TR_FILTER_MODE_LINEAR:

(undocumented)

HIP_TR_FILTER_MODE_POINT = 0#
HIP_TR_FILTER_MODE_LINEAR = 1#
static ctypes_type()#

The type of the enum constants as ctypes type.

hip.hip.HIPfilter_mode#

alias of HIPfilter_mode_enum

class hip.hip.HIP_TEXTURE_DESC_st(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_TEXTURE_DESC_st.

Python wrapper for cdef class chip.HIP_TEXTURE_DESC_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_TEXTURE_DESC_st.

Constructor for type HIP_TEXTURE_DESC_st.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

borderColor#

Border Color

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

filterMode#

Filter mode

flags#

Flags

static fromObj(pyobj)#

Creates a HIP_TEXTURE_DESC_st from a Python object.

Derives a HIP_TEXTURE_DESC_st from the given Python object pyobj. In case pyobj is itself an HIP_TEXTURE_DESC_st reference, this method returns it directly. No new HIP_TEXTURE_DESC_st is created in this case.

get_borderColor(self, i)#

Get value of borderColor of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

get_filterMode(self, i)#

Get value of filterMode of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

get_flags(self, i)#

Get value flags of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

get_maxAnisotropy(self, i)#

Get value maxAnisotropy of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

get_maxMipmapLevelClamp(self, i)#

Get value maxMipmapLevelClamp of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

get_minMipmapLevelClamp(self, i)#

Get value minMipmapLevelClamp of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

get_mipmapFilterMode(self, i)#

Get value of mipmapFilterMode of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

get_mipmapLevelBias(self, i)#

Get value mipmapLevelBias of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

maxAnisotropy#

Maximum anisotropy ratio

maxMipmapLevelClamp#

Mipmap maximum level clamp

minMipmapLevelClamp#

Mipmap minimum level clamp

mipmapFilterMode#

Mipmap filter mode

mipmapLevelBias#

Mipmap level bias

reserved#

(undocumented)

set_filterMode(self, i, value)#

Set value filterMode of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

set_maxAnisotropy(self, i, unsigned int value)#

Set value maxAnisotropy of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

set_maxMipmapLevelClamp(self, i, float value)#

Set value maxMipmapLevelClamp of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

set_minMipmapLevelClamp(self, i, float value)#

Set value minMipmapLevelClamp of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

set_mipmapFilterMode(self, i, value)#

Set value mipmapFilterMode of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

set_mipmapLevelBias(self, i, float value)#

Set value mipmapLevelBias of (<chip.HIP_TEXTURE_DESC_st*>self._ptr)[i].

hip.hip.HIP_TEXTURE_DESC#

alias of HIP_TEXTURE_DESC_st

class hip.hip.hipResourceViewFormat(value)#

Bases: _hipResourceViewFormat__Base

hip texture resource view formats

Attributes:
hipResViewFormatNone:

(undocumented)

hipResViewFormatUnsignedChar1:

(undocumented)

hipResViewFormatUnsignedChar2:

(undocumented)

hipResViewFormatUnsignedChar4:

(undocumented)

hipResViewFormatSignedChar1:

(undocumented)

hipResViewFormatSignedChar2:

(undocumented)

hipResViewFormatSignedChar4:

(undocumented)

hipResViewFormatUnsignedShort1:

(undocumented)

hipResViewFormatUnsignedShort2:

(undocumented)

hipResViewFormatUnsignedShort4:

(undocumented)

hipResViewFormatSignedShort1:

(undocumented)

hipResViewFormatSignedShort2:

(undocumented)

hipResViewFormatSignedShort4:

(undocumented)

hipResViewFormatUnsignedInt1:

(undocumented)

hipResViewFormatUnsignedInt2:

(undocumented)

hipResViewFormatUnsignedInt4:

(undocumented)

hipResViewFormatSignedInt1:

(undocumented)

hipResViewFormatSignedInt2:

(undocumented)

hipResViewFormatSignedInt4:

(undocumented)

hipResViewFormatHalf1:

(undocumented)

hipResViewFormatHalf2:

(undocumented)

hipResViewFormatHalf4:

(undocumented)

hipResViewFormatFloat1:

(undocumented)

hipResViewFormatFloat2:

(undocumented)

hipResViewFormatFloat4:

(undocumented)

hipResViewFormatUnsignedBlockCompressed1:

(undocumented)

hipResViewFormatUnsignedBlockCompressed2:

(undocumented)

hipResViewFormatUnsignedBlockCompressed3:

(undocumented)

hipResViewFormatUnsignedBlockCompressed4:

(undocumented)

hipResViewFormatSignedBlockCompressed4:

(undocumented)

hipResViewFormatUnsignedBlockCompressed5:

(undocumented)

hipResViewFormatSignedBlockCompressed5:

(undocumented)

hipResViewFormatUnsignedBlockCompressed6H:

(undocumented)

hipResViewFormatSignedBlockCompressed6H:

(undocumented)

hipResViewFormatUnsignedBlockCompressed7:

(undocumented)

hipResViewFormatNone = 0#
hipResViewFormatUnsignedChar1 = 1#
hipResViewFormatUnsignedChar2 = 2#
hipResViewFormatUnsignedChar4 = 3#
hipResViewFormatSignedChar1 = 4#
hipResViewFormatSignedChar2 = 5#
hipResViewFormatSignedChar4 = 6#
hipResViewFormatUnsignedShort1 = 7#
hipResViewFormatUnsignedShort2 = 8#
hipResViewFormatUnsignedShort4 = 9#
hipResViewFormatSignedShort1 = 10#
hipResViewFormatSignedShort2 = 11#
hipResViewFormatSignedShort4 = 12#
hipResViewFormatUnsignedInt1 = 13#
hipResViewFormatUnsignedInt2 = 14#
hipResViewFormatUnsignedInt4 = 15#
hipResViewFormatSignedInt1 = 16#
hipResViewFormatSignedInt2 = 17#
hipResViewFormatSignedInt4 = 18#
hipResViewFormatHalf1 = 19#
hipResViewFormatHalf2 = 20#
hipResViewFormatHalf4 = 21#
hipResViewFormatFloat1 = 22#
hipResViewFormatFloat2 = 23#
hipResViewFormatFloat4 = 24#
hipResViewFormatUnsignedBlockCompressed1 = 25#
hipResViewFormatUnsignedBlockCompressed2 = 26#
hipResViewFormatUnsignedBlockCompressed3 = 27#
hipResViewFormatUnsignedBlockCompressed4 = 28#
hipResViewFormatSignedBlockCompressed4 = 29#
hipResViewFormatUnsignedBlockCompressed5 = 30#
hipResViewFormatSignedBlockCompressed5 = 31#
hipResViewFormatUnsignedBlockCompressed6H = 32#
hipResViewFormatSignedBlockCompressed6H = 33#
hipResViewFormatUnsignedBlockCompressed7 = 34#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.HIPresourceViewFormat_enum(value)#

Bases: _HIPresourceViewFormat_enum__Base

Attributes:
HIP_RES_VIEW_FORMAT_NONE:

No resource view format (use underlying resource format)

HIP_RES_VIEW_FORMAT_UINT_1X8:

1 channel unsigned 8-bit integers

HIP_RES_VIEW_FORMAT_UINT_2X8:

2 channel unsigned 8-bit integers

HIP_RES_VIEW_FORMAT_UINT_4X8:

4 channel unsigned 8-bit integers

HIP_RES_VIEW_FORMAT_SINT_1X8:

1 channel signed 8-bit integers

HIP_RES_VIEW_FORMAT_SINT_2X8:

2 channel signed 8-bit integers

HIP_RES_VIEW_FORMAT_SINT_4X8:

4 channel signed 8-bit integers

HIP_RES_VIEW_FORMAT_UINT_1X16:

1 channel unsigned 16-bit integers

HIP_RES_VIEW_FORMAT_UINT_2X16:

2 channel unsigned 16-bit integers

HIP_RES_VIEW_FORMAT_UINT_4X16:

4 channel unsigned 16-bit integers

HIP_RES_VIEW_FORMAT_SINT_1X16:

1 channel signed 16-bit integers

HIP_RES_VIEW_FORMAT_SINT_2X16:

2 channel signed 16-bit integers

HIP_RES_VIEW_FORMAT_SINT_4X16:

4 channel signed 16-bit integers

HIP_RES_VIEW_FORMAT_UINT_1X32:

1 channel unsigned 32-bit integers

HIP_RES_VIEW_FORMAT_UINT_2X32:

2 channel unsigned 32-bit integers

HIP_RES_VIEW_FORMAT_UINT_4X32:

4 channel unsigned 32-bit integers

HIP_RES_VIEW_FORMAT_SINT_1X32:

1 channel signed 32-bit integers

HIP_RES_VIEW_FORMAT_SINT_2X32:

2 channel signed 32-bit integers

HIP_RES_VIEW_FORMAT_SINT_4X32:

4 channel signed 32-bit integers

HIP_RES_VIEW_FORMAT_FLOAT_1X16:

1 channel 16-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_2X16:

2 channel 16-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_4X16:

4 channel 16-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_1X32:

1 channel 32-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_2X32:

2 channel 32-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_4X32:

4 channel 32-bit floating point

HIP_RES_VIEW_FORMAT_UNSIGNED_BC1:

Block compressed 1

HIP_RES_VIEW_FORMAT_UNSIGNED_BC2:

Block compressed 2

HIP_RES_VIEW_FORMAT_UNSIGNED_BC3:

Block compressed 3

HIP_RES_VIEW_FORMAT_UNSIGNED_BC4:

Block compressed 4 unsigned

HIP_RES_VIEW_FORMAT_SIGNED_BC4:

Block compressed 4 signed

HIP_RES_VIEW_FORMAT_UNSIGNED_BC5:

Block compressed 5 unsigned

HIP_RES_VIEW_FORMAT_SIGNED_BC5:

Block compressed 5 signed

HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H:

Block compressed 6 unsigned half-float

HIP_RES_VIEW_FORMAT_SIGNED_BC6H:

Block compressed 6 signed half-float

HIP_RES_VIEW_FORMAT_UNSIGNED_BC7:

Block compressed 7

HIP_RES_VIEW_FORMAT_NONE = 0#
HIP_RES_VIEW_FORMAT_UINT_1X8 = 1#
HIP_RES_VIEW_FORMAT_UINT_2X8 = 2#
HIP_RES_VIEW_FORMAT_UINT_4X8 = 3#
HIP_RES_VIEW_FORMAT_SINT_1X8 = 4#
HIP_RES_VIEW_FORMAT_SINT_2X8 = 5#
HIP_RES_VIEW_FORMAT_SINT_4X8 = 6#
HIP_RES_VIEW_FORMAT_UINT_1X16 = 7#
HIP_RES_VIEW_FORMAT_UINT_2X16 = 8#
HIP_RES_VIEW_FORMAT_UINT_4X16 = 9#
HIP_RES_VIEW_FORMAT_SINT_1X16 = 10#
HIP_RES_VIEW_FORMAT_SINT_2X16 = 11#
HIP_RES_VIEW_FORMAT_SINT_4X16 = 12#
HIP_RES_VIEW_FORMAT_UINT_1X32 = 13#
HIP_RES_VIEW_FORMAT_UINT_2X32 = 14#
HIP_RES_VIEW_FORMAT_UINT_4X32 = 15#
HIP_RES_VIEW_FORMAT_SINT_1X32 = 16#
HIP_RES_VIEW_FORMAT_SINT_2X32 = 17#
HIP_RES_VIEW_FORMAT_SINT_4X32 = 18#
HIP_RES_VIEW_FORMAT_FLOAT_1X16 = 19#
HIP_RES_VIEW_FORMAT_FLOAT_2X16 = 20#
HIP_RES_VIEW_FORMAT_FLOAT_4X16 = 21#
HIP_RES_VIEW_FORMAT_FLOAT_1X32 = 22#
HIP_RES_VIEW_FORMAT_FLOAT_2X32 = 23#
HIP_RES_VIEW_FORMAT_FLOAT_4X32 = 24#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 = 25#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 = 26#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 = 27#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 = 28#
HIP_RES_VIEW_FORMAT_SIGNED_BC4 = 29#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 = 30#
HIP_RES_VIEW_FORMAT_SIGNED_BC5 = 31#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H = 32#
HIP_RES_VIEW_FORMAT_SIGNED_BC6H = 33#
HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34#
static ctypes_type()#

The type of the enum constants as ctypes type.

hip.hip.HIPresourceViewFormat#

alias of HIPresourceViewFormat_enum

class hip.hip.hipResourceDesc_union_0_struct_0(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipResourceDesc_union_0_struct_0.

Python wrapper for cdef class chip.hipResourceDesc_union_0_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipResourceDesc_union_0_struct_0.

Constructor for type hipResourceDesc_union_0_struct_0.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipResourceDesc_union_0_struct_0 from a Python object.

Derives a hipResourceDesc_union_0_struct_0 from the given Python object pyobj. In case pyobj is itself an hipResourceDesc_union_0_struct_0 reference, this method returns it directly. No new hipResourceDesc_union_0_struct_0 is created in this case.

is_ptr_null#

If data pointer is NULL.

class hip.hip.hipResourceDesc_union_0_struct_1(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipResourceDesc_union_0_struct_1.

Python wrapper for cdef class chip.hipResourceDesc_union_0_struct_1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipResourceDesc_union_0_struct_1.

Constructor for type hipResourceDesc_union_0_struct_1.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipResourceDesc_union_0_struct_1 from a Python object.

Derives a hipResourceDesc_union_0_struct_1 from the given Python object pyobj. In case pyobj is itself an hipResourceDesc_union_0_struct_1 reference, this method returns it directly. No new hipResourceDesc_union_0_struct_1 is created in this case.

is_ptr_null#

If data pointer is NULL.

class hip.hip.hipResourceDesc_union_0_struct_2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipResourceDesc_union_0_struct_2.

Python wrapper for cdef class chip.hipResourceDesc_union_0_struct_2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipResourceDesc_union_0_struct_2.

Constructor for type hipResourceDesc_union_0_struct_2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

desc#

(undocumented)

devPtr#

(undocumented) Note:

Setting this devPtr can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static fromObj(pyobj)#

Creates a hipResourceDesc_union_0_struct_2 from a Python object.

Derives a hipResourceDesc_union_0_struct_2 from the given Python object pyobj. In case pyobj is itself an hipResourceDesc_union_0_struct_2 reference, this method returns it directly. No new hipResourceDesc_union_0_struct_2 is created in this case.

get_desc(self, i)#

Get value of desc of (<chip.hipResourceDesc_union_0_struct_2*>self._ptr)[i].

get_devPtr(self, i)#

Get value devPtr of (<chip.hipResourceDesc_union_0_struct_2*>self._ptr)[i].

get_sizeInBytes(self, i)#

Get value sizeInBytes of (<chip.hipResourceDesc_union_0_struct_2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_devPtr(self, i, value)#

Set value devPtr of (<chip.hipResourceDesc_union_0_struct_2*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_sizeInBytes(self, i, unsigned long value)#

Set value sizeInBytes of (<chip.hipResourceDesc_union_0_struct_2*>self._ptr)[i].

sizeInBytes#

(undocumented)

class hip.hip.hipResourceDesc_union_0_struct_3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipResourceDesc_union_0_struct_3.

Python wrapper for cdef class chip.hipResourceDesc_union_0_struct_3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipResourceDesc_union_0_struct_3.

Constructor for type hipResourceDesc_union_0_struct_3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

desc#

(undocumented)

devPtr#

(undocumented) Note:

Setting this devPtr can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static fromObj(pyobj)#

Creates a hipResourceDesc_union_0_struct_3 from a Python object.

Derives a hipResourceDesc_union_0_struct_3 from the given Python object pyobj. In case pyobj is itself an hipResourceDesc_union_0_struct_3 reference, this method returns it directly. No new hipResourceDesc_union_0_struct_3 is created in this case.

get_desc(self, i)#

Get value of desc of (<chip.hipResourceDesc_union_0_struct_3*>self._ptr)[i].

get_devPtr(self, i)#

Get value devPtr of (<chip.hipResourceDesc_union_0_struct_3*>self._ptr)[i].

get_height(self, i)#

Get value height of (<chip.hipResourceDesc_union_0_struct_3*>self._ptr)[i].

get_pitchInBytes(self, i)#

Get value pitchInBytes of (<chip.hipResourceDesc_union_0_struct_3*>self._ptr)[i].

get_width(self, i)#

Get value width of (<chip.hipResourceDesc_union_0_struct_3*>self._ptr)[i].

height#

(undocumented)

is_ptr_null#

If data pointer is NULL.

pitchInBytes#

(undocumented)

set_devPtr(self, i, value)#

Set value devPtr of (<chip.hipResourceDesc_union_0_struct_3*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_height(self, i, unsigned long value)#

Set value height of (<chip.hipResourceDesc_union_0_struct_3*>self._ptr)[i].

set_pitchInBytes(self, i, unsigned long value)#

Set value pitchInBytes of (<chip.hipResourceDesc_union_0_struct_3*>self._ptr)[i].

set_width(self, i, unsigned long value)#

Set value width of (<chip.hipResourceDesc_union_0_struct_3*>self._ptr)[i].

width#

(undocumented)

class hip.hip.hipResourceDesc_union_0(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipResourceDesc_union_0.

Python wrapper for cdef class chip.hipResourceDesc_union_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type hipResourceDesc_union_0.

Constructor for type hipResourceDesc_union_0.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

array#

(undocumented)

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipResourceDesc_union_0 from a Python object.

Derives a hipResourceDesc_union_0 from the given Python object pyobj. In case pyobj is itself an hipResourceDesc_union_0 reference, this method returns it directly. No new hipResourceDesc_union_0 is created in this case.

get_array(self, i)#

Get value of array of (<chip.hipResourceDesc_union_0*>self._ptr)[i].

get_linear(self, i)#

Get value of linear of (<chip.hipResourceDesc_union_0*>self._ptr)[i].

get_mipmap(self, i)#

Get value of mipmap of (<chip.hipResourceDesc_union_0*>self._ptr)[i].

get_pitch2D(self, i)#

Get value of pitch2D of (<chip.hipResourceDesc_union_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

linear#

(undocumented)

mipmap#

(undocumented)

pitch2D#

(undocumented)

class hip.hip.hipResourceDesc(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipResourceDesc.

Python wrapper for cdef class chip.hipResourceDesc.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipResourceDesc.

Constructor for type hipResourceDesc.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipResourceDesc from a Python object.

Derives a hipResourceDesc from the given Python object pyobj. In case pyobj is itself an hipResourceDesc reference, this method returns it directly. No new hipResourceDesc is created in this case.

get_res(self, i)#

Get value of res of (<chip.hipResourceDesc*>self._ptr)[i].

get_resType(self, i)#

Get value of resType of (<chip.hipResourceDesc*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

res#

(undocumented)

resType#

(undocumented)

set_resType(self, i, value)#

Set value resType of (<chip.hipResourceDesc*>self._ptr)[i].

class hip.hip.HIP_RESOURCE_DESC_st_union_0_struct_0(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_0.

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_RESOURCE_DESC_st_union_0_struct_0.

Constructor for type HIP_RESOURCE_DESC_st_union_0_struct_0.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a HIP_RESOURCE_DESC_st_union_0_struct_0 from a Python object.

Derives a HIP_RESOURCE_DESC_st_union_0_struct_0 from the given Python object pyobj. In case pyobj is itself an HIP_RESOURCE_DESC_st_union_0_struct_0 reference, this method returns it directly. No new HIP_RESOURCE_DESC_st_union_0_struct_0 is created in this case.

is_ptr_null#

If data pointer is NULL.

class hip.hip.HIP_RESOURCE_DESC_st_union_0_struct_1(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_1.

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_RESOURCE_DESC_st_union_0_struct_1.

Constructor for type HIP_RESOURCE_DESC_st_union_0_struct_1.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a HIP_RESOURCE_DESC_st_union_0_struct_1 from a Python object.

Derives a HIP_RESOURCE_DESC_st_union_0_struct_1 from the given Python object pyobj. In case pyobj is itself an HIP_RESOURCE_DESC_st_union_0_struct_1 reference, this method returns it directly. No new HIP_RESOURCE_DESC_st_union_0_struct_1 is created in this case.

is_ptr_null#

If data pointer is NULL.

class hip.hip.HIP_RESOURCE_DESC_st_union_0_struct_2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_2.

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_RESOURCE_DESC_st_union_0_struct_2.

Constructor for type HIP_RESOURCE_DESC_st_union_0_struct_2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

devPtr#

Device pointer Note:

Setting this devPtr can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

format#

Array format

static fromObj(pyobj)#

Creates a HIP_RESOURCE_DESC_st_union_0_struct_2 from a Python object.

Derives a HIP_RESOURCE_DESC_st_union_0_struct_2 from the given Python object pyobj. In case pyobj is itself an HIP_RESOURCE_DESC_st_union_0_struct_2 reference, this method returns it directly. No new HIP_RESOURCE_DESC_st_union_0_struct_2 is created in this case.

get_devPtr(self, i)#

Get value devPtr of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_2*>self._ptr)[i].

get_format(self, i)#

Get value of format of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_2*>self._ptr)[i].

get_numChannels(self, i)#

Get value numChannels of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_2*>self._ptr)[i].

get_sizeInBytes(self, i)#

Get value sizeInBytes of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

numChannels#

Channels per array element

set_devPtr(self, i, value)#

Set value devPtr of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_2*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_format(self, i, value)#

Set value format of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_2*>self._ptr)[i].

set_numChannels(self, i, unsigned int value)#

Set value numChannels of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_2*>self._ptr)[i].

set_sizeInBytes(self, i, unsigned long value)#

Set value sizeInBytes of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_2*>self._ptr)[i].

sizeInBytes#

Size in bytes

class hip.hip.HIP_RESOURCE_DESC_st_union_0_struct_3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_3.

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_RESOURCE_DESC_st_union_0_struct_3.

Constructor for type HIP_RESOURCE_DESC_st_union_0_struct_3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

devPtr#

Device pointer Note:

Setting this devPtr can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

format#

Array format

static fromObj(pyobj)#

Creates a HIP_RESOURCE_DESC_st_union_0_struct_3 from a Python object.

Derives a HIP_RESOURCE_DESC_st_union_0_struct_3 from the given Python object pyobj. In case pyobj is itself an HIP_RESOURCE_DESC_st_union_0_struct_3 reference, this method returns it directly. No new HIP_RESOURCE_DESC_st_union_0_struct_3 is created in this case.

get_devPtr(self, i)#

Get value devPtr of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

get_format(self, i)#

Get value of format of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

get_height(self, i)#

Get value height of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

get_numChannels(self, i)#

Get value numChannels of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

get_pitchInBytes(self, i)#

Get value pitchInBytes of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

get_width(self, i)#

Get value width of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

height#

Height of the array in elements

is_ptr_null#

If data pointer is NULL.

numChannels#

Channels per array element

pitchInBytes#

Pitch between two rows in bytes

set_devPtr(self, i, value)#

Set value devPtr of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_format(self, i, value)#

Set value format of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

set_height(self, i, unsigned long value)#

Set value height of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

set_numChannels(self, i, unsigned int value)#

Set value numChannels of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

set_pitchInBytes(self, i, unsigned long value)#

Set value pitchInBytes of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

set_width(self, i, unsigned long value)#

Set value width of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_3*>self._ptr)[i].

width#

Width of the array in elements

class hip.hip.HIP_RESOURCE_DESC_st_union_0_struct_4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_4.

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0_struct_4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_RESOURCE_DESC_st_union_0_struct_4.

Constructor for type HIP_RESOURCE_DESC_st_union_0_struct_4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a HIP_RESOURCE_DESC_st_union_0_struct_4 from a Python object.

Derives a HIP_RESOURCE_DESC_st_union_0_struct_4 from the given Python object pyobj. In case pyobj is itself an HIP_RESOURCE_DESC_st_union_0_struct_4 reference, this method returns it directly. No new HIP_RESOURCE_DESC_st_union_0_struct_4 is created in this case.

get_reserved(self, i)#

Get value of reserved of (<chip.HIP_RESOURCE_DESC_st_union_0_struct_4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

reserved#

(undocumented)

class hip.hip.HIP_RESOURCE_DESC_st_union_0(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0.

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st_union_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type HIP_RESOURCE_DESC_st_union_0.

Constructor for type HIP_RESOURCE_DESC_st_union_0.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

array#

(undocumented)

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a HIP_RESOURCE_DESC_st_union_0 from a Python object.

Derives a HIP_RESOURCE_DESC_st_union_0 from the given Python object pyobj. In case pyobj is itself an HIP_RESOURCE_DESC_st_union_0 reference, this method returns it directly. No new HIP_RESOURCE_DESC_st_union_0 is created in this case.

get_array(self, i)#

Get value of array of (<chip.HIP_RESOURCE_DESC_st_union_0*>self._ptr)[i].

get_linear(self, i)#

Get value of linear of (<chip.HIP_RESOURCE_DESC_st_union_0*>self._ptr)[i].

get_mipmap(self, i)#

Get value of mipmap of (<chip.HIP_RESOURCE_DESC_st_union_0*>self._ptr)[i].

get_pitch2D(self, i)#

Get value of pitch2D of (<chip.HIP_RESOURCE_DESC_st_union_0*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.HIP_RESOURCE_DESC_st_union_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

linear#

(undocumented)

mipmap#

(undocumented)

pitch2D#

(undocumented)

reserved#

(undocumented)

class hip.hip.HIP_RESOURCE_DESC_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st.

Python wrapper for cdef class chip.HIP_RESOURCE_DESC_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_RESOURCE_DESC_st.

Constructor for type HIP_RESOURCE_DESC_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

flags#

Flags (must be zero)

static fromObj(pyobj)#

Creates a HIP_RESOURCE_DESC_st from a Python object.

Derives a HIP_RESOURCE_DESC_st from the given Python object pyobj. In case pyobj is itself an HIP_RESOURCE_DESC_st reference, this method returns it directly. No new HIP_RESOURCE_DESC_st is created in this case.

get_flags(self, i)#

Get value flags of (<chip.HIP_RESOURCE_DESC_st*>self._ptr)[i].

get_res(self, i)#

Get value of res of (<chip.HIP_RESOURCE_DESC_st*>self._ptr)[i].

get_resType(self, i)#

Get value of resType of (<chip.HIP_RESOURCE_DESC_st*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

res#

(undocumented)

resType#

Resource type

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.HIP_RESOURCE_DESC_st*>self._ptr)[i].

set_resType(self, i, value)#

Set value resType of (<chip.HIP_RESOURCE_DESC_st*>self._ptr)[i].

hip.hip.HIP_RESOURCE_DESC#

alias of HIP_RESOURCE_DESC_st

class hip.hip.hipResourceViewDesc(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipResourceViewDesc.

Python wrapper for cdef class chip.hipResourceViewDesc.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipResourceViewDesc.

Constructor for type hipResourceViewDesc.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

depth#

(undocumented)

firstLayer#

(undocumented)

firstMipmapLevel#

(undocumented)

format#

(undocumented)

static fromObj(pyobj)#

Creates a hipResourceViewDesc from a Python object.

Derives a hipResourceViewDesc from the given Python object pyobj. In case pyobj is itself an hipResourceViewDesc reference, this method returns it directly. No new hipResourceViewDesc is created in this case.

get_depth(self, i)#

Get value depth of (<chip.hipResourceViewDesc*>self._ptr)[i].

get_firstLayer(self, i)#

Get value firstLayer of (<chip.hipResourceViewDesc*>self._ptr)[i].

get_firstMipmapLevel(self, i)#

Get value firstMipmapLevel of (<chip.hipResourceViewDesc*>self._ptr)[i].

get_format(self, i)#

Get value of format of (<chip.hipResourceViewDesc*>self._ptr)[i].

get_height(self, i)#

Get value height of (<chip.hipResourceViewDesc*>self._ptr)[i].

get_lastLayer(self, i)#

Get value lastLayer of (<chip.hipResourceViewDesc*>self._ptr)[i].

get_lastMipmapLevel(self, i)#

Get value lastMipmapLevel of (<chip.hipResourceViewDesc*>self._ptr)[i].

get_width(self, i)#

Get value width of (<chip.hipResourceViewDesc*>self._ptr)[i].

height#

(undocumented)

is_ptr_null#

If data pointer is NULL.

lastLayer#

(undocumented)

lastMipmapLevel#

(undocumented)

set_depth(self, i, unsigned long value)#

Set value depth of (<chip.hipResourceViewDesc*>self._ptr)[i].

set_firstLayer(self, i, unsigned int value)#

Set value firstLayer of (<chip.hipResourceViewDesc*>self._ptr)[i].

set_firstMipmapLevel(self, i, unsigned int value)#

Set value firstMipmapLevel of (<chip.hipResourceViewDesc*>self._ptr)[i].

set_format(self, i, value)#

Set value format of (<chip.hipResourceViewDesc*>self._ptr)[i].

set_height(self, i, unsigned long value)#

Set value height of (<chip.hipResourceViewDesc*>self._ptr)[i].

set_lastLayer(self, i, unsigned int value)#

Set value lastLayer of (<chip.hipResourceViewDesc*>self._ptr)[i].

set_lastMipmapLevel(self, i, unsigned int value)#

Set value lastMipmapLevel of (<chip.hipResourceViewDesc*>self._ptr)[i].

set_width(self, i, unsigned long value)#

Set value width of (<chip.hipResourceViewDesc*>self._ptr)[i].

width#

(undocumented)

class hip.hip.HIP_RESOURCE_VIEW_DESC_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_RESOURCE_VIEW_DESC_st.

Python wrapper for cdef class chip.HIP_RESOURCE_VIEW_DESC_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_RESOURCE_VIEW_DESC_st.

Constructor for type HIP_RESOURCE_VIEW_DESC_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

depth#

Depth of the resource view

firstLayer#

First layer index

firstMipmapLevel#

First defined mipmap level

format#

Resource view format

static fromObj(pyobj)#

Creates a HIP_RESOURCE_VIEW_DESC_st from a Python object.

Derives a HIP_RESOURCE_VIEW_DESC_st from the given Python object pyobj. In case pyobj is itself an HIP_RESOURCE_VIEW_DESC_st reference, this method returns it directly. No new HIP_RESOURCE_VIEW_DESC_st is created in this case.

get_depth(self, i)#

Get value depth of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

get_firstLayer(self, i)#

Get value firstLayer of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

get_firstMipmapLevel(self, i)#

Get value firstMipmapLevel of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

get_format(self, i)#

Get value of format of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

get_height(self, i)#

Get value height of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

get_lastLayer(self, i)#

Get value lastLayer of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

get_lastMipmapLevel(self, i)#

Get value lastMipmapLevel of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

get_width(self, i)#

Get value width of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

height#

Height of the resource view

is_ptr_null#

If data pointer is NULL.

lastLayer#

Last layer index

lastMipmapLevel#

Last defined mipmap level

reserved#

(undocumented)

set_depth(self, i, unsigned long value)#

Set value depth of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

set_firstLayer(self, i, unsigned int value)#

Set value firstLayer of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

set_firstMipmapLevel(self, i, unsigned int value)#

Set value firstMipmapLevel of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

set_format(self, i, value)#

Set value format of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

set_height(self, i, unsigned long value)#

Set value height of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

set_lastLayer(self, i, unsigned int value)#

Set value lastLayer of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

set_lastMipmapLevel(self, i, unsigned int value)#

Set value lastMipmapLevel of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

set_width(self, i, unsigned long value)#

Set value width of (<chip.HIP_RESOURCE_VIEW_DESC_st*>self._ptr)[i].

width#

Width of the resource view

hip.hip.HIP_RESOURCE_VIEW_DESC#

alias of HIP_RESOURCE_VIEW_DESC_st

class hip.hip.hipMemcpyKind(value)#

Bases: _hipMemcpyKind__Base

Attributes:
hipMemcpyHostToHost:

Host-to-Host Copy

hipMemcpyHostToDevice:

Host-to-Device Copy

hipMemcpyDeviceToHost:

Device-to-Host Copy

hipMemcpyDeviceToDevice:

Device-to-Device Copy

hipMemcpyDefault:

(undocumented)

hipMemcpyHostToHost = 0#
hipMemcpyHostToDevice = 1#
hipMemcpyDeviceToHost = 2#
hipMemcpyDeviceToDevice = 3#
hipMemcpyDefault = 4#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipPitchedPtr(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipPitchedPtr.

Python wrapper for cdef class chip.hipPitchedPtr.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipPitchedPtr.

Constructor for type hipPitchedPtr.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipPitchedPtr from a Python object.

Derives a hipPitchedPtr from the given Python object pyobj. In case pyobj is itself an hipPitchedPtr reference, this method returns it directly. No new hipPitchedPtr is created in this case.

get_pitch(self, i)#

Get value pitch of (<chip.hipPitchedPtr*>self._ptr)[i].

get_ptr(self, i)#

Get value ptr of (<chip.hipPitchedPtr*>self._ptr)[i].

get_xsize(self, i)#

Get value xsize of (<chip.hipPitchedPtr*>self._ptr)[i].

get_ysize(self, i)#

Get value ysize of (<chip.hipPitchedPtr*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

pitch#

(undocumented)

ptr#

(undocumented) Note:

Setting this ptr can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

set_pitch(self, i, unsigned long value)#

Set value pitch of (<chip.hipPitchedPtr*>self._ptr)[i].

set_ptr(self, i, value)#

Set value ptr of (<chip.hipPitchedPtr*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_xsize(self, i, unsigned long value)#

Set value xsize of (<chip.hipPitchedPtr*>self._ptr)[i].

set_ysize(self, i, unsigned long value)#

Set value ysize of (<chip.hipPitchedPtr*>self._ptr)[i].

xsize#

(undocumented)

ysize#

(undocumented)

class hip.hip.hipExtent(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExtent.

Python wrapper for cdef class chip.hipExtent.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExtent.

Constructor for type hipExtent.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

depth#

(undocumented)

static fromObj(pyobj)#

Creates a hipExtent from a Python object.

Derives a hipExtent from the given Python object pyobj. In case pyobj is itself an hipExtent reference, this method returns it directly. No new hipExtent is created in this case.

get_depth(self, i)#

Get value depth of (<chip.hipExtent*>self._ptr)[i].

get_height(self, i)#

Get value height of (<chip.hipExtent*>self._ptr)[i].

get_width(self, i)#

Get value width of (<chip.hipExtent*>self._ptr)[i].

height#

(undocumented)

is_ptr_null#

If data pointer is NULL.

set_depth(self, i, unsigned long value)#

Set value depth of (<chip.hipExtent*>self._ptr)[i].

set_height(self, i, unsigned long value)#

Set value height of (<chip.hipExtent*>self._ptr)[i].

set_width(self, i, unsigned long value)#

Set value width of (<chip.hipExtent*>self._ptr)[i].

width#

(undocumented)

class hip.hip.hipPos(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipPos.

Python wrapper for cdef class chip.hipPos.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipPos.

Constructor for type hipPos.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipPos from a Python object.

Derives a hipPos from the given Python object pyobj. In case pyobj is itself an hipPos reference, this method returns it directly. No new hipPos is created in this case.

get_x(self, i)#

Get value x of (<chip.hipPos*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.hipPos*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.hipPos*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned long value)#

Set value x of (<chip.hipPos*>self._ptr)[i].

set_y(self, i, unsigned long value)#

Set value y of (<chip.hipPos*>self._ptr)[i].

set_z(self, i, unsigned long value)#

Set value z of (<chip.hipPos*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.hipMemcpy3DParms(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMemcpy3DParms.

Python wrapper for cdef class chip.hipMemcpy3DParms.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMemcpy3DParms.

Constructor for type hipMemcpy3DParms.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

dstPos#

(undocumented)

dstPtr#

(undocumented)

extent#

(undocumented)

static fromObj(pyobj)#

Creates a hipMemcpy3DParms from a Python object.

Derives a hipMemcpy3DParms from the given Python object pyobj. In case pyobj is itself an hipMemcpy3DParms reference, this method returns it directly. No new hipMemcpy3DParms is created in this case.

get_dstPos(self, i)#

Get value of dstPos of (<chip.hipMemcpy3DParms*>self._ptr)[i].

get_dstPtr(self, i)#

Get value of dstPtr of (<chip.hipMemcpy3DParms*>self._ptr)[i].

get_extent(self, i)#

Get value of extent of (<chip.hipMemcpy3DParms*>self._ptr)[i].

get_kind(self, i)#

Get value of kind of (<chip.hipMemcpy3DParms*>self._ptr)[i].

get_srcPos(self, i)#

Get value of srcPos of (<chip.hipMemcpy3DParms*>self._ptr)[i].

get_srcPtr(self, i)#

Get value of srcPtr of (<chip.hipMemcpy3DParms*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

kind#

(undocumented)

set_kind(self, i, value)#

Set value kind of (<chip.hipMemcpy3DParms*>self._ptr)[i].

srcPos#

(undocumented)

srcPtr#

(undocumented)

class hip.hip.HIP_MEMCPY3D(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.HIP_MEMCPY3D.

Python wrapper for cdef class chip.HIP_MEMCPY3D.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

Depth#

(undocumented)

Height#

(undocumented)

static PROPERTIES()#
WidthInBytes#

(undocumented)

__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type HIP_MEMCPY3D.

Constructor for type HIP_MEMCPY3D.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

dstDevice#

(undocumented) Note:

Setting this dstDevice can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

dstHeight#

(undocumented)

dstHost#

(undocumented) Note:

Setting this dstHost can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

dstLOD#

(undocumented)

dstMemoryType#

(undocumented)

dstPitch#

(undocumented)

dstXInBytes#

(undocumented)

dstY#

(undocumented)

dstZ#

(undocumented)

static fromObj(pyobj)#

Creates a HIP_MEMCPY3D from a Python object.

Derives a HIP_MEMCPY3D from the given Python object pyobj. In case pyobj is itself an HIP_MEMCPY3D reference, this method returns it directly. No new HIP_MEMCPY3D is created in this case.

get_Depth(self, i)#

Get value Depth of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_Height(self, i)#

Get value Height of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_WidthInBytes(self, i)#

Get value WidthInBytes of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_dstDevice(self, i)#

Get value dstDevice of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_dstHeight(self, i)#

Get value dstHeight of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_dstHost(self, i)#

Get value dstHost of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_dstLOD(self, i)#

Get value dstLOD of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_dstMemoryType(self, i)#

Get value of dstMemoryType of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_dstPitch(self, i)#

Get value dstPitch of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_dstXInBytes(self, i)#

Get value dstXInBytes of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_dstY(self, i)#

Get value dstY of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_dstZ(self, i)#

Get value dstZ of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_srcDevice(self, i)#

Get value srcDevice of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_srcHeight(self, i)#

Get value srcHeight of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_srcHost(self, i)#

Get value srcHost of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_srcLOD(self, i)#

Get value srcLOD of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_srcMemoryType(self, i)#

Get value of srcMemoryType of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_srcPitch(self, i)#

Get value srcPitch of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_srcXInBytes(self, i)#

Get value srcXInBytes of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_srcY(self, i)#

Get value srcY of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

get_srcZ(self, i)#

Get value srcZ of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_Depth(self, i, unsigned long value)#

Set value Depth of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_Height(self, i, unsigned long value)#

Set value Height of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_WidthInBytes(self, i, unsigned long value)#

Set value WidthInBytes of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_dstDevice(self, i, value)#

Set value dstDevice of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_dstHeight(self, i, unsigned long value)#

Set value dstHeight of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_dstHost(self, i, value)#

Set value dstHost of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_dstLOD(self, i, unsigned long value)#

Set value dstLOD of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_dstMemoryType(self, i, value)#

Set value dstMemoryType of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_dstPitch(self, i, unsigned long value)#

Set value dstPitch of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_dstXInBytes(self, i, unsigned long value)#

Set value dstXInBytes of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_dstY(self, i, unsigned long value)#

Set value dstY of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_dstZ(self, i, unsigned long value)#

Set value dstZ of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_srcDevice(self, i, value)#

Set value srcDevice of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_srcHeight(self, i, unsigned long value)#

Set value srcHeight of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_srcHost(self, i, value)#

Set value srcHost of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_srcLOD(self, i, unsigned long value)#

Set value srcLOD of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_srcMemoryType(self, i, value)#

Set value srcMemoryType of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_srcPitch(self, i, unsigned long value)#

Set value srcPitch of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_srcXInBytes(self, i, unsigned long value)#

Set value srcXInBytes of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_srcY(self, i, unsigned long value)#

Set value srcY of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

set_srcZ(self, i, unsigned long value)#

Set value srcZ of (<chip.HIP_MEMCPY3D*>self._ptr)[i].

srcDevice#

(undocumented) Note:

Setting this srcDevice can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

srcHeight#

(undocumented)

srcHost#

(undocumented) Note:

Setting this srcHost can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

srcLOD#

(undocumented)

srcMemoryType#

(undocumented)

srcPitch#

(undocumented)

srcXInBytes#

(undocumented)

srcY#

(undocumented)

srcZ#

(undocumented)

class hip.hip.hipFunction_attribute(value)#

Bases: _hipFunction_attribute__Base

Attributes:
HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK:

(undocumented)

HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES:

(undocumented)

HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES:

(undocumented)

HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES:

(undocumented)

HIP_FUNC_ATTRIBUTE_NUM_REGS:

(undocumented)

HIP_FUNC_ATTRIBUTE_PTX_VERSION:

(undocumented)

HIP_FUNC_ATTRIBUTE_BINARY_VERSION:

(undocumented)

HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA:

(undocumented)

HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES:

(undocumented)

HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT:

(undocumented)

HIP_FUNC_ATTRIBUTE_MAX:

(undocumented)

HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0#
HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1#
HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2#
HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3#
HIP_FUNC_ATTRIBUTE_NUM_REGS = 4#
HIP_FUNC_ATTRIBUTE_PTX_VERSION = 5#
HIP_FUNC_ATTRIBUTE_BINARY_VERSION = 6#
HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7#
HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8#
HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9#
HIP_FUNC_ATTRIBUTE_MAX = 10#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipPointer_attribute(value)#

Bases: _hipPointer_attribute__Base

Attributes:
HIP_POINTER_ATTRIBUTE_CONTEXT:

The context on which a pointer was allocated

HIP_POINTER_ATTRIBUTE_MEMORY_TYPE:

memory type describing location of a pointer

HIP_POINTER_ATTRIBUTE_DEVICE_POINTER:

address at which the pointer is allocated on device

HIP_POINTER_ATTRIBUTE_HOST_POINTER:

address at which the pointer is allocated on host

HIP_POINTER_ATTRIBUTE_P2P_TOKENS:

A pair of tokens for use with linux kernel interface

HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS:

Synchronize every synchronous memory operation initiated on this region

HIP_POINTER_ATTRIBUTE_BUFFER_ID:

Unique ID for an allocated memory region

HIP_POINTER_ATTRIBUTE_IS_MANAGED:

Indicates if the pointer points to managed memory

HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL:

device ordinal of a device on which a pointer was allocated or registered

HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE:

if this pointer maps to an allocation that is suitable for hipIpcGetMemHandle

HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR:

Starting address for this requested pointer

HIP_POINTER_ATTRIBUTE_RANGE_SIZE:

Size of the address range for this requested pointer

HIP_POINTER_ATTRIBUTE_MAPPED:

tells if this pointer is in a valid address range that is mapped to a backing allocation

HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES:

Bitmask of allowed hipmemAllocationHandleType for this allocation

HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE:

returns if the memory referenced by this pointer can be used with the GPUDirect RDMA API

HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS:

Returns the access flags the device associated with for the corresponding memory referenced by the ptr

HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE:

Returns the mempool handle for the allocation if it was allocated from a mempool

HIP_POINTER_ATTRIBUTE_CONTEXT = 1#
HIP_POINTER_ATTRIBUTE_MEMORY_TYPE = 2#
HIP_POINTER_ATTRIBUTE_DEVICE_POINTER = 3#
HIP_POINTER_ATTRIBUTE_HOST_POINTER = 4#
HIP_POINTER_ATTRIBUTE_P2P_TOKENS = 5#
HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6#
HIP_POINTER_ATTRIBUTE_BUFFER_ID = 7#
HIP_POINTER_ATTRIBUTE_IS_MANAGED = 8#
HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9#
HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE = 10#
HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11#
HIP_POINTER_ATTRIBUTE_RANGE_SIZE = 12#
HIP_POINTER_ATTRIBUTE_MAPPED = 13#
HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14#
HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15#
HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS = 16#
HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.uchar1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.uchar1.

Python wrapper for cdef class chip.uchar1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type uchar1.

Constructor for type uchar1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a uchar1 from a Python object.

Derives a uchar1 from the given Python object pyobj. In case pyobj is itself an uchar1 reference, this method returns it directly. No new uchar1 is created in this case.

get_x(self, i)#

Get value x of (<chip.uchar1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned char value)#

Set value x of (<chip.uchar1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.uchar2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.uchar2.

Python wrapper for cdef class chip.uchar2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type uchar2.

Constructor for type uchar2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a uchar2 from a Python object.

Derives a uchar2 from the given Python object pyobj. In case pyobj is itself an uchar2 reference, this method returns it directly. No new uchar2 is created in this case.

get_x(self, i)#

Get value x of (<chip.uchar2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.uchar2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned char value)#

Set value x of (<chip.uchar2*>self._ptr)[i].

set_y(self, i, unsigned char value)#

Set value y of (<chip.uchar2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.uchar3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.uchar3.

Python wrapper for cdef class chip.uchar3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type uchar3.

Constructor for type uchar3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a uchar3 from a Python object.

Derives a uchar3 from the given Python object pyobj. In case pyobj is itself an uchar3 reference, this method returns it directly. No new uchar3 is created in this case.

get_x(self, i)#

Get value x of (<chip.uchar3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.uchar3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.uchar3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned char value)#

Set value x of (<chip.uchar3*>self._ptr)[i].

set_y(self, i, unsigned char value)#

Set value y of (<chip.uchar3*>self._ptr)[i].

set_z(self, i, unsigned char value)#

Set value z of (<chip.uchar3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.uchar4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.uchar4.

Python wrapper for cdef class chip.uchar4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type uchar4.

Constructor for type uchar4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a uchar4 from a Python object.

Derives a uchar4 from the given Python object pyobj. In case pyobj is itself an uchar4 reference, this method returns it directly. No new uchar4 is created in this case.

get_w(self, i)#

Get value w of (<chip.uchar4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.uchar4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.uchar4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.uchar4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, unsigned char value)#

Set value w of (<chip.uchar4*>self._ptr)[i].

set_x(self, i, unsigned char value)#

Set value x of (<chip.uchar4*>self._ptr)[i].

set_y(self, i, unsigned char value)#

Set value y of (<chip.uchar4*>self._ptr)[i].

set_z(self, i, unsigned char value)#

Set value z of (<chip.uchar4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.char1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.char1.

Python wrapper for cdef class chip.char1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type char1.

Constructor for type char1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a char1 from a Python object.

Derives a char1 from the given Python object pyobj. In case pyobj is itself an char1 reference, this method returns it directly. No new char1 is created in this case.

get_x(self, i)#

Get value x of (<chip.char1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, char value)#

Set value x of (<chip.char1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.char2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.char2.

Python wrapper for cdef class chip.char2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type char2.

Constructor for type char2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a char2 from a Python object.

Derives a char2 from the given Python object pyobj. In case pyobj is itself an char2 reference, this method returns it directly. No new char2 is created in this case.

get_x(self, i)#

Get value x of (<chip.char2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.char2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, char value)#

Set value x of (<chip.char2*>self._ptr)[i].

set_y(self, i, char value)#

Set value y of (<chip.char2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.char3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.char3.

Python wrapper for cdef class chip.char3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type char3.

Constructor for type char3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a char3 from a Python object.

Derives a char3 from the given Python object pyobj. In case pyobj is itself an char3 reference, this method returns it directly. No new char3 is created in this case.

get_x(self, i)#

Get value x of (<chip.char3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.char3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.char3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, char value)#

Set value x of (<chip.char3*>self._ptr)[i].

set_y(self, i, char value)#

Set value y of (<chip.char3*>self._ptr)[i].

set_z(self, i, char value)#

Set value z of (<chip.char3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.char4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.char4.

Python wrapper for cdef class chip.char4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type char4.

Constructor for type char4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a char4 from a Python object.

Derives a char4 from the given Python object pyobj. In case pyobj is itself an char4 reference, this method returns it directly. No new char4 is created in this case.

get_w(self, i)#

Get value w of (<chip.char4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.char4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.char4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.char4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, char value)#

Set value w of (<chip.char4*>self._ptr)[i].

set_x(self, i, char value)#

Set value x of (<chip.char4*>self._ptr)[i].

set_y(self, i, char value)#

Set value y of (<chip.char4*>self._ptr)[i].

set_z(self, i, char value)#

Set value z of (<chip.char4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.ushort1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ushort1.

Python wrapper for cdef class chip.ushort1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ushort1.

Constructor for type ushort1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ushort1 from a Python object.

Derives a ushort1 from the given Python object pyobj. In case pyobj is itself an ushort1 reference, this method returns it directly. No new ushort1 is created in this case.

get_x(self, i)#

Get value x of (<chip.ushort1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned short value)#

Set value x of (<chip.ushort1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.ushort2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ushort2.

Python wrapper for cdef class chip.ushort2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ushort2.

Constructor for type ushort2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ushort2 from a Python object.

Derives a ushort2 from the given Python object pyobj. In case pyobj is itself an ushort2 reference, this method returns it directly. No new ushort2 is created in this case.

get_x(self, i)#

Get value x of (<chip.ushort2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.ushort2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned short value)#

Set value x of (<chip.ushort2*>self._ptr)[i].

set_y(self, i, unsigned short value)#

Set value y of (<chip.ushort2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.ushort3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ushort3.

Python wrapper for cdef class chip.ushort3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ushort3.

Constructor for type ushort3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ushort3 from a Python object.

Derives a ushort3 from the given Python object pyobj. In case pyobj is itself an ushort3 reference, this method returns it directly. No new ushort3 is created in this case.

get_x(self, i)#

Get value x of (<chip.ushort3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.ushort3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.ushort3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned short value)#

Set value x of (<chip.ushort3*>self._ptr)[i].

set_y(self, i, unsigned short value)#

Set value y of (<chip.ushort3*>self._ptr)[i].

set_z(self, i, unsigned short value)#

Set value z of (<chip.ushort3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.ushort4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ushort4.

Python wrapper for cdef class chip.ushort4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ushort4.

Constructor for type ushort4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ushort4 from a Python object.

Derives a ushort4 from the given Python object pyobj. In case pyobj is itself an ushort4 reference, this method returns it directly. No new ushort4 is created in this case.

get_w(self, i)#

Get value w of (<chip.ushort4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.ushort4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.ushort4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.ushort4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, unsigned short value)#

Set value w of (<chip.ushort4*>self._ptr)[i].

set_x(self, i, unsigned short value)#

Set value x of (<chip.ushort4*>self._ptr)[i].

set_y(self, i, unsigned short value)#

Set value y of (<chip.ushort4*>self._ptr)[i].

set_z(self, i, unsigned short value)#

Set value z of (<chip.ushort4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.short1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.short1.

Python wrapper for cdef class chip.short1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type short1.

Constructor for type short1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a short1 from a Python object.

Derives a short1 from the given Python object pyobj. In case pyobj is itself an short1 reference, this method returns it directly. No new short1 is created in this case.

get_x(self, i)#

Get value x of (<chip.short1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, short value)#

Set value x of (<chip.short1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.short2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.short2.

Python wrapper for cdef class chip.short2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type short2.

Constructor for type short2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a short2 from a Python object.

Derives a short2 from the given Python object pyobj. In case pyobj is itself an short2 reference, this method returns it directly. No new short2 is created in this case.

get_x(self, i)#

Get value x of (<chip.short2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.short2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, short value)#

Set value x of (<chip.short2*>self._ptr)[i].

set_y(self, i, short value)#

Set value y of (<chip.short2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.short3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.short3.

Python wrapper for cdef class chip.short3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type short3.

Constructor for type short3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a short3 from a Python object.

Derives a short3 from the given Python object pyobj. In case pyobj is itself an short3 reference, this method returns it directly. No new short3 is created in this case.

get_x(self, i)#

Get value x of (<chip.short3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.short3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.short3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, short value)#

Set value x of (<chip.short3*>self._ptr)[i].

set_y(self, i, short value)#

Set value y of (<chip.short3*>self._ptr)[i].

set_z(self, i, short value)#

Set value z of (<chip.short3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.short4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.short4.

Python wrapper for cdef class chip.short4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type short4.

Constructor for type short4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a short4 from a Python object.

Derives a short4 from the given Python object pyobj. In case pyobj is itself an short4 reference, this method returns it directly. No new short4 is created in this case.

get_w(self, i)#

Get value w of (<chip.short4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.short4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.short4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.short4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, short value)#

Set value w of (<chip.short4*>self._ptr)[i].

set_x(self, i, short value)#

Set value x of (<chip.short4*>self._ptr)[i].

set_y(self, i, short value)#

Set value y of (<chip.short4*>self._ptr)[i].

set_z(self, i, short value)#

Set value z of (<chip.short4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.uint1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.uint1.

Python wrapper for cdef class chip.uint1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type uint1.

Constructor for type uint1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a uint1 from a Python object.

Derives a uint1 from the given Python object pyobj. In case pyobj is itself an uint1 reference, this method returns it directly. No new uint1 is created in this case.

get_x(self, i)#

Get value x of (<chip.uint1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned int value)#

Set value x of (<chip.uint1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.uint2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.uint2.

Python wrapper for cdef class chip.uint2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type uint2.

Constructor for type uint2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a uint2 from a Python object.

Derives a uint2 from the given Python object pyobj. In case pyobj is itself an uint2 reference, this method returns it directly. No new uint2 is created in this case.

get_x(self, i)#

Get value x of (<chip.uint2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.uint2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned int value)#

Set value x of (<chip.uint2*>self._ptr)[i].

set_y(self, i, unsigned int value)#

Set value y of (<chip.uint2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.uint3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.uint3.

Python wrapper for cdef class chip.uint3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type uint3.

Constructor for type uint3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a uint3 from a Python object.

Derives a uint3 from the given Python object pyobj. In case pyobj is itself an uint3 reference, this method returns it directly. No new uint3 is created in this case.

get_x(self, i)#

Get value x of (<chip.uint3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.uint3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.uint3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned int value)#

Set value x of (<chip.uint3*>self._ptr)[i].

set_y(self, i, unsigned int value)#

Set value y of (<chip.uint3*>self._ptr)[i].

set_z(self, i, unsigned int value)#

Set value z of (<chip.uint3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.uint4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.uint4.

Python wrapper for cdef class chip.uint4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type uint4.

Constructor for type uint4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a uint4 from a Python object.

Derives a uint4 from the given Python object pyobj. In case pyobj is itself an uint4 reference, this method returns it directly. No new uint4 is created in this case.

get_w(self, i)#

Get value w of (<chip.uint4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.uint4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.uint4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.uint4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, unsigned int value)#

Set value w of (<chip.uint4*>self._ptr)[i].

set_x(self, i, unsigned int value)#

Set value x of (<chip.uint4*>self._ptr)[i].

set_y(self, i, unsigned int value)#

Set value y of (<chip.uint4*>self._ptr)[i].

set_z(self, i, unsigned int value)#

Set value z of (<chip.uint4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.int1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.int1.

Python wrapper for cdef class chip.int1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type int1.

Constructor for type int1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a int1 from a Python object.

Derives a int1 from the given Python object pyobj. In case pyobj is itself an int1 reference, this method returns it directly. No new int1 is created in this case.

get_x(self, i)#

Get value x of (<chip.int1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, int value)#

Set value x of (<chip.int1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.int2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.int2.

Python wrapper for cdef class chip.int2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type int2.

Constructor for type int2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a int2 from a Python object.

Derives a int2 from the given Python object pyobj. In case pyobj is itself an int2 reference, this method returns it directly. No new int2 is created in this case.

get_x(self, i)#

Get value x of (<chip.int2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.int2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, int value)#

Set value x of (<chip.int2*>self._ptr)[i].

set_y(self, i, int value)#

Set value y of (<chip.int2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.int3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.int3.

Python wrapper for cdef class chip.int3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type int3.

Constructor for type int3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a int3 from a Python object.

Derives a int3 from the given Python object pyobj. In case pyobj is itself an int3 reference, this method returns it directly. No new int3 is created in this case.

get_x(self, i)#

Get value x of (<chip.int3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.int3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.int3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, int value)#

Set value x of (<chip.int3*>self._ptr)[i].

set_y(self, i, int value)#

Set value y of (<chip.int3*>self._ptr)[i].

set_z(self, i, int value)#

Set value z of (<chip.int3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.int4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.int4.

Python wrapper for cdef class chip.int4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type int4.

Constructor for type int4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a int4 from a Python object.

Derives a int4 from the given Python object pyobj. In case pyobj is itself an int4 reference, this method returns it directly. No new int4 is created in this case.

get_w(self, i)#

Get value w of (<chip.int4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.int4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.int4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.int4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, int value)#

Set value w of (<chip.int4*>self._ptr)[i].

set_x(self, i, int value)#

Set value x of (<chip.int4*>self._ptr)[i].

set_y(self, i, int value)#

Set value y of (<chip.int4*>self._ptr)[i].

set_z(self, i, int value)#

Set value z of (<chip.int4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.ulong1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ulong1.

Python wrapper for cdef class chip.ulong1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ulong1.

Constructor for type ulong1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ulong1 from a Python object.

Derives a ulong1 from the given Python object pyobj. In case pyobj is itself an ulong1 reference, this method returns it directly. No new ulong1 is created in this case.

get_x(self, i)#

Get value x of (<chip.ulong1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned long value)#

Set value x of (<chip.ulong1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.ulong2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ulong2.

Python wrapper for cdef class chip.ulong2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ulong2.

Constructor for type ulong2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ulong2 from a Python object.

Derives a ulong2 from the given Python object pyobj. In case pyobj is itself an ulong2 reference, this method returns it directly. No new ulong2 is created in this case.

get_x(self, i)#

Get value x of (<chip.ulong2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.ulong2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned long value)#

Set value x of (<chip.ulong2*>self._ptr)[i].

set_y(self, i, unsigned long value)#

Set value y of (<chip.ulong2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.ulong3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ulong3.

Python wrapper for cdef class chip.ulong3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ulong3.

Constructor for type ulong3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ulong3 from a Python object.

Derives a ulong3 from the given Python object pyobj. In case pyobj is itself an ulong3 reference, this method returns it directly. No new ulong3 is created in this case.

get_x(self, i)#

Get value x of (<chip.ulong3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.ulong3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.ulong3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned long value)#

Set value x of (<chip.ulong3*>self._ptr)[i].

set_y(self, i, unsigned long value)#

Set value y of (<chip.ulong3*>self._ptr)[i].

set_z(self, i, unsigned long value)#

Set value z of (<chip.ulong3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.ulong4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ulong4.

Python wrapper for cdef class chip.ulong4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ulong4.

Constructor for type ulong4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ulong4 from a Python object.

Derives a ulong4 from the given Python object pyobj. In case pyobj is itself an ulong4 reference, this method returns it directly. No new ulong4 is created in this case.

get_w(self, i)#

Get value w of (<chip.ulong4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.ulong4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.ulong4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.ulong4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, unsigned long value)#

Set value w of (<chip.ulong4*>self._ptr)[i].

set_x(self, i, unsigned long value)#

Set value x of (<chip.ulong4*>self._ptr)[i].

set_y(self, i, unsigned long value)#

Set value y of (<chip.ulong4*>self._ptr)[i].

set_z(self, i, unsigned long value)#

Set value z of (<chip.ulong4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.long1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.long1.

Python wrapper for cdef class chip.long1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type long1.

Constructor for type long1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a long1 from a Python object.

Derives a long1 from the given Python object pyobj. In case pyobj is itself an long1 reference, this method returns it directly. No new long1 is created in this case.

get_x(self, i)#

Get value x of (<chip.long1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, long value)#

Set value x of (<chip.long1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.long2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.long2.

Python wrapper for cdef class chip.long2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type long2.

Constructor for type long2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a long2 from a Python object.

Derives a long2 from the given Python object pyobj. In case pyobj is itself an long2 reference, this method returns it directly. No new long2 is created in this case.

get_x(self, i)#

Get value x of (<chip.long2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.long2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, long value)#

Set value x of (<chip.long2*>self._ptr)[i].

set_y(self, i, long value)#

Set value y of (<chip.long2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.long3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.long3.

Python wrapper for cdef class chip.long3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type long3.

Constructor for type long3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a long3 from a Python object.

Derives a long3 from the given Python object pyobj. In case pyobj is itself an long3 reference, this method returns it directly. No new long3 is created in this case.

get_x(self, i)#

Get value x of (<chip.long3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.long3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.long3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, long value)#

Set value x of (<chip.long3*>self._ptr)[i].

set_y(self, i, long value)#

Set value y of (<chip.long3*>self._ptr)[i].

set_z(self, i, long value)#

Set value z of (<chip.long3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.long4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.long4.

Python wrapper for cdef class chip.long4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type long4.

Constructor for type long4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a long4 from a Python object.

Derives a long4 from the given Python object pyobj. In case pyobj is itself an long4 reference, this method returns it directly. No new long4 is created in this case.

get_w(self, i)#

Get value w of (<chip.long4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.long4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.long4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.long4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, long value)#

Set value w of (<chip.long4*>self._ptr)[i].

set_x(self, i, long value)#

Set value x of (<chip.long4*>self._ptr)[i].

set_y(self, i, long value)#

Set value y of (<chip.long4*>self._ptr)[i].

set_z(self, i, long value)#

Set value z of (<chip.long4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.ulonglong1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ulonglong1.

Python wrapper for cdef class chip.ulonglong1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ulonglong1.

Constructor for type ulonglong1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ulonglong1 from a Python object.

Derives a ulonglong1 from the given Python object pyobj. In case pyobj is itself an ulonglong1 reference, this method returns it directly. No new ulonglong1 is created in this case.

get_x(self, i)#

Get value x of (<chip.ulonglong1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned long long value)#

Set value x of (<chip.ulonglong1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.ulonglong2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ulonglong2.

Python wrapper for cdef class chip.ulonglong2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ulonglong2.

Constructor for type ulonglong2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ulonglong2 from a Python object.

Derives a ulonglong2 from the given Python object pyobj. In case pyobj is itself an ulonglong2 reference, this method returns it directly. No new ulonglong2 is created in this case.

get_x(self, i)#

Get value x of (<chip.ulonglong2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.ulonglong2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned long long value)#

Set value x of (<chip.ulonglong2*>self._ptr)[i].

set_y(self, i, unsigned long long value)#

Set value y of (<chip.ulonglong2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.ulonglong3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ulonglong3.

Python wrapper for cdef class chip.ulonglong3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ulonglong3.

Constructor for type ulonglong3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ulonglong3 from a Python object.

Derives a ulonglong3 from the given Python object pyobj. In case pyobj is itself an ulonglong3 reference, this method returns it directly. No new ulonglong3 is created in this case.

get_x(self, i)#

Get value x of (<chip.ulonglong3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.ulonglong3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.ulonglong3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned long long value)#

Set value x of (<chip.ulonglong3*>self._ptr)[i].

set_y(self, i, unsigned long long value)#

Set value y of (<chip.ulonglong3*>self._ptr)[i].

set_z(self, i, unsigned long long value)#

Set value z of (<chip.ulonglong3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.ulonglong4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.ulonglong4.

Python wrapper for cdef class chip.ulonglong4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type ulonglong4.

Constructor for type ulonglong4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ulonglong4 from a Python object.

Derives a ulonglong4 from the given Python object pyobj. In case pyobj is itself an ulonglong4 reference, this method returns it directly. No new ulonglong4 is created in this case.

get_w(self, i)#

Get value w of (<chip.ulonglong4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.ulonglong4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.ulonglong4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.ulonglong4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, unsigned long long value)#

Set value w of (<chip.ulonglong4*>self._ptr)[i].

set_x(self, i, unsigned long long value)#

Set value x of (<chip.ulonglong4*>self._ptr)[i].

set_y(self, i, unsigned long long value)#

Set value y of (<chip.ulonglong4*>self._ptr)[i].

set_z(self, i, unsigned long long value)#

Set value z of (<chip.ulonglong4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.longlong1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.longlong1.

Python wrapper for cdef class chip.longlong1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type longlong1.

Constructor for type longlong1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a longlong1 from a Python object.

Derives a longlong1 from the given Python object pyobj. In case pyobj is itself an longlong1 reference, this method returns it directly. No new longlong1 is created in this case.

get_x(self, i)#

Get value x of (<chip.longlong1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, long long value)#

Set value x of (<chip.longlong1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.longlong2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.longlong2.

Python wrapper for cdef class chip.longlong2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type longlong2.

Constructor for type longlong2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a longlong2 from a Python object.

Derives a longlong2 from the given Python object pyobj. In case pyobj is itself an longlong2 reference, this method returns it directly. No new longlong2 is created in this case.

get_x(self, i)#

Get value x of (<chip.longlong2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.longlong2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, long long value)#

Set value x of (<chip.longlong2*>self._ptr)[i].

set_y(self, i, long long value)#

Set value y of (<chip.longlong2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.longlong3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.longlong3.

Python wrapper for cdef class chip.longlong3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type longlong3.

Constructor for type longlong3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a longlong3 from a Python object.

Derives a longlong3 from the given Python object pyobj. In case pyobj is itself an longlong3 reference, this method returns it directly. No new longlong3 is created in this case.

get_x(self, i)#

Get value x of (<chip.longlong3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.longlong3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.longlong3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, long long value)#

Set value x of (<chip.longlong3*>self._ptr)[i].

set_y(self, i, long long value)#

Set value y of (<chip.longlong3*>self._ptr)[i].

set_z(self, i, long long value)#

Set value z of (<chip.longlong3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.longlong4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.longlong4.

Python wrapper for cdef class chip.longlong4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type longlong4.

Constructor for type longlong4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a longlong4 from a Python object.

Derives a longlong4 from the given Python object pyobj. In case pyobj is itself an longlong4 reference, this method returns it directly. No new longlong4 is created in this case.

get_w(self, i)#

Get value w of (<chip.longlong4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.longlong4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.longlong4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.longlong4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, long long value)#

Set value w of (<chip.longlong4*>self._ptr)[i].

set_x(self, i, long long value)#

Set value x of (<chip.longlong4*>self._ptr)[i].

set_y(self, i, long long value)#

Set value y of (<chip.longlong4*>self._ptr)[i].

set_z(self, i, long long value)#

Set value z of (<chip.longlong4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.float1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.float1.

Python wrapper for cdef class chip.float1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type float1.

Constructor for type float1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a float1 from a Python object.

Derives a float1 from the given Python object pyobj. In case pyobj is itself an float1 reference, this method returns it directly. No new float1 is created in this case.

get_x(self, i)#

Get value x of (<chip.float1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, float value)#

Set value x of (<chip.float1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.float2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.float2.

Python wrapper for cdef class chip.float2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type float2.

Constructor for type float2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a float2 from a Python object.

Derives a float2 from the given Python object pyobj. In case pyobj is itself an float2 reference, this method returns it directly. No new float2 is created in this case.

get_x(self, i)#

Get value x of (<chip.float2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.float2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, float value)#

Set value x of (<chip.float2*>self._ptr)[i].

set_y(self, i, float value)#

Set value y of (<chip.float2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.float3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.float3.

Python wrapper for cdef class chip.float3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type float3.

Constructor for type float3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a float3 from a Python object.

Derives a float3 from the given Python object pyobj. In case pyobj is itself an float3 reference, this method returns it directly. No new float3 is created in this case.

get_x(self, i)#

Get value x of (<chip.float3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.float3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.float3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, float value)#

Set value x of (<chip.float3*>self._ptr)[i].

set_y(self, i, float value)#

Set value y of (<chip.float3*>self._ptr)[i].

set_z(self, i, float value)#

Set value z of (<chip.float3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.float4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.float4.

Python wrapper for cdef class chip.float4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type float4.

Constructor for type float4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a float4 from a Python object.

Derives a float4 from the given Python object pyobj. In case pyobj is itself an float4 reference, this method returns it directly. No new float4 is created in this case.

get_w(self, i)#

Get value w of (<chip.float4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.float4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.float4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.float4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, float value)#

Set value w of (<chip.float4*>self._ptr)[i].

set_x(self, i, float value)#

Set value x of (<chip.float4*>self._ptr)[i].

set_y(self, i, float value)#

Set value y of (<chip.float4*>self._ptr)[i].

set_z(self, i, float value)#

Set value z of (<chip.float4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.double1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.double1.

Python wrapper for cdef class chip.double1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type double1.

Constructor for type double1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a double1 from a Python object.

Derives a double1 from the given Python object pyobj. In case pyobj is itself an double1 reference, this method returns it directly. No new double1 is created in this case.

get_x(self, i)#

Get value x of (<chip.double1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, double value)#

Set value x of (<chip.double1*>self._ptr)[i].

x#

(undocumented)

class hip.hip.double2(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.double2.

Python wrapper for cdef class chip.double2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type double2.

Constructor for type double2.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a double2 from a Python object.

Derives a double2 from the given Python object pyobj. In case pyobj is itself an double2 reference, this method returns it directly. No new double2 is created in this case.

get_x(self, i)#

Get value x of (<chip.double2*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.double2*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, double value)#

Set value x of (<chip.double2*>self._ptr)[i].

set_y(self, i, double value)#

Set value y of (<chip.double2*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

class hip.hip.double3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.double3.

Python wrapper for cdef class chip.double3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type double3.

Constructor for type double3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a double3 from a Python object.

Derives a double3 from the given Python object pyobj. In case pyobj is itself an double3 reference, this method returns it directly. No new double3 is created in this case.

get_x(self, i)#

Get value x of (<chip.double3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.double3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.double3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, double value)#

Set value x of (<chip.double3*>self._ptr)[i].

set_y(self, i, double value)#

Set value y of (<chip.double3*>self._ptr)[i].

set_z(self, i, double value)#

Set value z of (<chip.double3*>self._ptr)[i].

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

class hip.hip.double4(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.double4.

Python wrapper for cdef class chip.double4.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type double4.

Constructor for type double4.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a double4 from a Python object.

Derives a double4 from the given Python object pyobj. In case pyobj is itself an double4 reference, this method returns it directly. No new double4 is created in this case.

get_w(self, i)#

Get value w of (<chip.double4*>self._ptr)[i].

get_x(self, i)#

Get value x of (<chip.double4*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.double4*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.double4*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_w(self, i, double value)#

Set value w of (<chip.double4*>self._ptr)[i].

set_x(self, i, double value)#

Set value x of (<chip.double4*>self._ptr)[i].

set_y(self, i, double value)#

Set value y of (<chip.double4*>self._ptr)[i].

set_z(self, i, double value)#

Set value z of (<chip.double4*>self._ptr)[i].

w#

(undocumented)

x#

(undocumented)

y#

(undocumented)

z#

(undocumented)

hip.hip.hipCreateChannelDesc(int x, int y, int z, int w, f)#

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

Args:
x (int):

(undocumented)

y (int):

(undocumented)

z (int):

(undocumented)

w (int):

(undocumented)

f (hipChannelFormatKind):

(undocumented)

Returns:

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

hip.hip.hipTextureObject_t#

alias of __hip_texture

class hip.hip.hipTextureAddressMode(value)#

Bases: _hipTextureAddressMode__Base

hip texture address modes

Attributes:
hipAddressModeWrap:

(undocumented)

hipAddressModeClamp:

(undocumented)

hipAddressModeMirror:

(undocumented)

hipAddressModeBorder:

(undocumented)

hipAddressModeWrap = 0#
hipAddressModeClamp = 1#
hipAddressModeMirror = 2#
hipAddressModeBorder = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipTextureFilterMode(value)#

Bases: _hipTextureFilterMode__Base

hip texture filter modes

Attributes:
hipFilterModePoint:

(undocumented)

hipFilterModeLinear:

(undocumented)

hipFilterModePoint = 0#
hipFilterModeLinear = 1#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipTextureReadMode(value)#

Bases: _hipTextureReadMode__Base

hip texture read modes

Attributes:
hipReadModeElementType:

(undocumented)

hipReadModeNormalizedFloat:

(undocumented)

hipReadModeElementType = 0#
hipReadModeNormalizedFloat = 1#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.textureReference(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.textureReference.

Python wrapper for cdef class chip.textureReference.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type textureReference.

Constructor for type textureReference.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

channelDesc#

(undocumented)

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

filterMode#

(undocumented)

format#

(undocumented)

static fromObj(pyobj)#

Creates a textureReference from a Python object.

Derives a textureReference from the given Python object pyobj. In case pyobj is itself an textureReference reference, this method returns it directly. No new textureReference is created in this case.

get_channelDesc(self, i)#

Get value of channelDesc of (<chip.textureReference*>self._ptr)[i].

get_filterMode(self, i)#

Get value of filterMode of (<chip.textureReference*>self._ptr)[i].

get_format(self, i)#

Get value of format of (<chip.textureReference*>self._ptr)[i].

get_maxAnisotropy(self, i)#

Get value maxAnisotropy of (<chip.textureReference*>self._ptr)[i].

get_maxMipmapLevelClamp(self, i)#

Get value maxMipmapLevelClamp of (<chip.textureReference*>self._ptr)[i].

get_minMipmapLevelClamp(self, i)#

Get value minMipmapLevelClamp of (<chip.textureReference*>self._ptr)[i].

get_mipmapFilterMode(self, i)#

Get value of mipmapFilterMode of (<chip.textureReference*>self._ptr)[i].

get_mipmapLevelBias(self, i)#

Get value mipmapLevelBias of (<chip.textureReference*>self._ptr)[i].

get_normalized(self, i)#

Get value normalized of (<chip.textureReference*>self._ptr)[i].

get_numChannels(self, i)#

Get value numChannels of (<chip.textureReference*>self._ptr)[i].

get_readMode(self, i)#

Get value of readMode of (<chip.textureReference*>self._ptr)[i].

get_sRGB(self, i)#

Get value sRGB of (<chip.textureReference*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

maxAnisotropy#

(undocumented)

maxMipmapLevelClamp#

(undocumented)

minMipmapLevelClamp#

(undocumented)

mipmapFilterMode#

(undocumented)

mipmapLevelBias#

(undocumented)

normalized#

(undocumented)

numChannels#

(undocumented)

readMode#

(undocumented)

sRGB#

(undocumented)

set_filterMode(self, i, value)#

Set value filterMode of (<chip.textureReference*>self._ptr)[i].

set_format(self, i, value)#

Set value format of (<chip.textureReference*>self._ptr)[i].

set_maxAnisotropy(self, i, unsigned int value)#

Set value maxAnisotropy of (<chip.textureReference*>self._ptr)[i].

set_maxMipmapLevelClamp(self, i, float value)#

Set value maxMipmapLevelClamp of (<chip.textureReference*>self._ptr)[i].

set_minMipmapLevelClamp(self, i, float value)#

Set value minMipmapLevelClamp of (<chip.textureReference*>self._ptr)[i].

set_mipmapFilterMode(self, i, value)#

Set value mipmapFilterMode of (<chip.textureReference*>self._ptr)[i].

set_mipmapLevelBias(self, i, float value)#

Set value mipmapLevelBias of (<chip.textureReference*>self._ptr)[i].

set_normalized(self, i, int value)#

Set value normalized of (<chip.textureReference*>self._ptr)[i].

set_numChannels(self, i, int value)#

Set value numChannels of (<chip.textureReference*>self._ptr)[i].

set_readMode(self, i, value)#

Set value readMode of (<chip.textureReference*>self._ptr)[i].

set_sRGB(self, i, int value)#

Set value sRGB of (<chip.textureReference*>self._ptr)[i].

class hip.hip.hipTextureDesc(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipTextureDesc.

Python wrapper for cdef class chip.hipTextureDesc.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipTextureDesc.

Constructor for type hipTextureDesc.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

borderColor#

(undocumented)

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

filterMode#

(undocumented)

static fromObj(pyobj)#

Creates a hipTextureDesc from a Python object.

Derives a hipTextureDesc from the given Python object pyobj. In case pyobj is itself an hipTextureDesc reference, this method returns it directly. No new hipTextureDesc is created in this case.

get_borderColor(self, i)#

Get value of borderColor of (<chip.hipTextureDesc*>self._ptr)[i].

get_filterMode(self, i)#

Get value of filterMode of (<chip.hipTextureDesc*>self._ptr)[i].

get_maxAnisotropy(self, i)#

Get value maxAnisotropy of (<chip.hipTextureDesc*>self._ptr)[i].

get_maxMipmapLevelClamp(self, i)#

Get value maxMipmapLevelClamp of (<chip.hipTextureDesc*>self._ptr)[i].

get_minMipmapLevelClamp(self, i)#

Get value minMipmapLevelClamp of (<chip.hipTextureDesc*>self._ptr)[i].

get_mipmapFilterMode(self, i)#

Get value of mipmapFilterMode of (<chip.hipTextureDesc*>self._ptr)[i].

get_mipmapLevelBias(self, i)#

Get value mipmapLevelBias of (<chip.hipTextureDesc*>self._ptr)[i].

get_normalizedCoords(self, i)#

Get value normalizedCoords of (<chip.hipTextureDesc*>self._ptr)[i].

get_readMode(self, i)#

Get value of readMode of (<chip.hipTextureDesc*>self._ptr)[i].

get_sRGB(self, i)#

Get value sRGB of (<chip.hipTextureDesc*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

maxAnisotropy#

(undocumented)

maxMipmapLevelClamp#

(undocumented)

minMipmapLevelClamp#

(undocumented)

mipmapFilterMode#

(undocumented)

mipmapLevelBias#

(undocumented)

normalizedCoords#

(undocumented)

readMode#

(undocumented)

sRGB#

(undocumented)

set_filterMode(self, i, value)#

Set value filterMode of (<chip.hipTextureDesc*>self._ptr)[i].

set_maxAnisotropy(self, i, unsigned int value)#

Set value maxAnisotropy of (<chip.hipTextureDesc*>self._ptr)[i].

set_maxMipmapLevelClamp(self, i, float value)#

Set value maxMipmapLevelClamp of (<chip.hipTextureDesc*>self._ptr)[i].

set_minMipmapLevelClamp(self, i, float value)#

Set value minMipmapLevelClamp of (<chip.hipTextureDesc*>self._ptr)[i].

set_mipmapFilterMode(self, i, value)#

Set value mipmapFilterMode of (<chip.hipTextureDesc*>self._ptr)[i].

set_mipmapLevelBias(self, i, float value)#

Set value mipmapLevelBias of (<chip.hipTextureDesc*>self._ptr)[i].

set_normalizedCoords(self, i, int value)#

Set value normalizedCoords of (<chip.hipTextureDesc*>self._ptr)[i].

set_readMode(self, i, value)#

Set value readMode of (<chip.hipTextureDesc*>self._ptr)[i].

set_sRGB(self, i, int value)#

Set value sRGB of (<chip.hipTextureDesc*>self._ptr)[i].

hip.hip.hipSurfaceObject_t#

alias of __hip_surface

class hip.hip.surfaceReference(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.surfaceReference.

Python wrapper for cdef class chip.surfaceReference.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type surfaceReference.

Constructor for type surfaceReference.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a surfaceReference from a Python object.

Derives a surfaceReference from the given Python object pyobj. In case pyobj is itself an surfaceReference reference, this method returns it directly. No new surfaceReference is created in this case.

is_ptr_null#

If data pointer is NULL.

class hip.hip.hipSurfaceBoundaryMode(value)#

Bases: _hipSurfaceBoundaryMode__Base

hip surface boundary modes

Attributes:
hipBoundaryModeZero:

(undocumented)

hipBoundaryModeTrap:

(undocumented)

hipBoundaryModeClamp:

(undocumented)

hipBoundaryModeZero = 0#
hipBoundaryModeTrap = 1#
hipBoundaryModeClamp = 2#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.ihipCtx_t#

Bases: Pointer

Python wrapper for cdef class chip.ihipCtx_t.

Python wrapper for cdef class chip.ihipCtx_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ihipCtx_t from a Python object.

Derives a ihipCtx_t from the given Python object pyobj. In case pyobj is itself an ihipCtx_t reference, this method returns it directly. No new ihipCtx_t is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipCtx_t#

alias of ihipCtx_t

class hip.hip.hipDeviceP2PAttr(value)#

Bases: _hipDeviceP2PAttr__Base

Attributes:
hipDevP2PAttrPerformanceRank:

(undocumented)

hipDevP2PAttrAccessSupported:

(undocumented)

hipDevP2PAttrNativeAtomicSupported:

(undocumented)

hipDevP2PAttrHipArrayAccessSupported:

(undocumented)

hipDevP2PAttrPerformanceRank = 0#
hipDevP2PAttrAccessSupported = 1#
hipDevP2PAttrNativeAtomicSupported = 2#
hipDevP2PAttrHipArrayAccessSupported = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.ihipStream_t#

Bases: Pointer

Python wrapper for cdef class chip.ihipStream_t.

Python wrapper for cdef class chip.ihipStream_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ihipStream_t from a Python object.

Derives a ihipStream_t from the given Python object pyobj. In case pyobj is itself an ihipStream_t reference, this method returns it directly. No new ihipStream_t is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipStream_t#

alias of ihipStream_t

class hip.hip.hipIpcMemHandle_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipIpcMemHandle_st.

Python wrapper for cdef class chip.hipIpcMemHandle_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipIpcMemHandle_st.

Constructor for type hipIpcMemHandle_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipIpcMemHandle_st from a Python object.

Derives a hipIpcMemHandle_st from the given Python object pyobj. In case pyobj is itself an hipIpcMemHandle_st reference, this method returns it directly. No new hipIpcMemHandle_st is created in this case.

get_reserved(self, i)#

Get value of reserved of (<chip.hipIpcMemHandle_st*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

reserved#

(undocumented)

hip.hip.hipIpcMemHandle_t#

alias of hipIpcMemHandle_st

class hip.hip.hipIpcEventHandle_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipIpcEventHandle_st.

Python wrapper for cdef class chip.hipIpcEventHandle_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipIpcEventHandle_st.

Constructor for type hipIpcEventHandle_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipIpcEventHandle_st from a Python object.

Derives a hipIpcEventHandle_st from the given Python object pyobj. In case pyobj is itself an hipIpcEventHandle_st reference, this method returns it directly. No new hipIpcEventHandle_st is created in this case.

get_reserved(self, i)#

Get value of reserved of (<chip.hipIpcEventHandle_st*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

reserved#

(undocumented)

hip.hip.hipIpcEventHandle_t#

alias of hipIpcEventHandle_st

class hip.hip.ihipModule_t#

Bases: Pointer

Python wrapper for cdef class chip.ihipModule_t.

Python wrapper for cdef class chip.ihipModule_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ihipModule_t from a Python object.

Derives a ihipModule_t from the given Python object pyobj. In case pyobj is itself an ihipModule_t reference, this method returns it directly. No new ihipModule_t is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipModule_t#

alias of ihipModule_t

class hip.hip.ihipModuleSymbol_t#

Bases: Pointer

Python wrapper for cdef class chip.ihipModuleSymbol_t.

Python wrapper for cdef class chip.ihipModuleSymbol_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ihipModuleSymbol_t from a Python object.

Derives a ihipModuleSymbol_t from the given Python object pyobj. In case pyobj is itself an ihipModuleSymbol_t reference, this method returns it directly. No new ihipModuleSymbol_t is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipFunction_t#

alias of ihipModuleSymbol_t

class hip.hip.ihipMemPoolHandle_t#

Bases: Pointer

Python wrapper for cdef class chip.ihipMemPoolHandle_t.

Python wrapper for cdef class chip.ihipMemPoolHandle_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ihipMemPoolHandle_t from a Python object.

Derives a ihipMemPoolHandle_t from the given Python object pyobj. In case pyobj is itself an ihipMemPoolHandle_t reference, this method returns it directly. No new ihipMemPoolHandle_t is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipMemPool_t#

alias of ihipMemPoolHandle_t

class hip.hip.hipFuncAttributes(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipFuncAttributes.

Python wrapper for cdef class chip.hipFuncAttributes.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipFuncAttributes.

Constructor for type hipFuncAttributes.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

binaryVersion#

(undocumented)

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

cacheModeCA#

(undocumented)

constSizeBytes#

(undocumented)

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipFuncAttributes from a Python object.

Derives a hipFuncAttributes from the given Python object pyobj. In case pyobj is itself an hipFuncAttributes reference, this method returns it directly. No new hipFuncAttributes is created in this case.

get_binaryVersion(self, i)#

Get value binaryVersion of (<chip.hipFuncAttributes*>self._ptr)[i].

get_cacheModeCA(self, i)#

Get value cacheModeCA of (<chip.hipFuncAttributes*>self._ptr)[i].

get_constSizeBytes(self, i)#

Get value constSizeBytes of (<chip.hipFuncAttributes*>self._ptr)[i].

get_localSizeBytes(self, i)#

Get value localSizeBytes of (<chip.hipFuncAttributes*>self._ptr)[i].

get_maxDynamicSharedSizeBytes(self, i)#

Get value maxDynamicSharedSizeBytes of (<chip.hipFuncAttributes*>self._ptr)[i].

get_maxThreadsPerBlock(self, i)#

Get value maxThreadsPerBlock of (<chip.hipFuncAttributes*>self._ptr)[i].

get_numRegs(self, i)#

Get value numRegs of (<chip.hipFuncAttributes*>self._ptr)[i].

get_preferredShmemCarveout(self, i)#

Get value preferredShmemCarveout of (<chip.hipFuncAttributes*>self._ptr)[i].

get_ptxVersion(self, i)#

Get value ptxVersion of (<chip.hipFuncAttributes*>self._ptr)[i].

get_sharedSizeBytes(self, i)#

Get value sharedSizeBytes of (<chip.hipFuncAttributes*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

localSizeBytes#

(undocumented)

maxDynamicSharedSizeBytes#

(undocumented)

maxThreadsPerBlock#

(undocumented)

numRegs#

(undocumented)

preferredShmemCarveout#

(undocumented)

ptxVersion#

(undocumented)

set_binaryVersion(self, i, int value)#

Set value binaryVersion of (<chip.hipFuncAttributes*>self._ptr)[i].

set_cacheModeCA(self, i, int value)#

Set value cacheModeCA of (<chip.hipFuncAttributes*>self._ptr)[i].

set_constSizeBytes(self, i, unsigned long value)#

Set value constSizeBytes of (<chip.hipFuncAttributes*>self._ptr)[i].

set_localSizeBytes(self, i, unsigned long value)#

Set value localSizeBytes of (<chip.hipFuncAttributes*>self._ptr)[i].

set_maxDynamicSharedSizeBytes(self, i, int value)#

Set value maxDynamicSharedSizeBytes of (<chip.hipFuncAttributes*>self._ptr)[i].

set_maxThreadsPerBlock(self, i, int value)#

Set value maxThreadsPerBlock of (<chip.hipFuncAttributes*>self._ptr)[i].

set_numRegs(self, i, int value)#

Set value numRegs of (<chip.hipFuncAttributes*>self._ptr)[i].

set_preferredShmemCarveout(self, i, int value)#

Set value preferredShmemCarveout of (<chip.hipFuncAttributes*>self._ptr)[i].

set_ptxVersion(self, i, int value)#

Set value ptxVersion of (<chip.hipFuncAttributes*>self._ptr)[i].

set_sharedSizeBytes(self, i, unsigned long value)#

Set value sharedSizeBytes of (<chip.hipFuncAttributes*>self._ptr)[i].

sharedSizeBytes#

(undocumented)

class hip.hip.ihipEvent_t#

Bases: Pointer

Python wrapper for cdef class chip.ihipEvent_t.

Python wrapper for cdef class chip.ihipEvent_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ihipEvent_t from a Python object.

Derives a ihipEvent_t from the given Python object pyobj. In case pyobj is itself an ihipEvent_t reference, this method returns it directly. No new ihipEvent_t is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipEvent_t#

alias of ihipEvent_t

class hip.hip.hipLimit_t(value)#

Bases: _hipLimit_t__Base

hipLimit

Attributes:
hipLimitStackSize:

Limit of stack size in bytes on the current device, per thread. The size is in units of 256 dwords, up to the limit of (128K - 16)

hipLimitPrintfFifoSize:

Size limit in bytes of fifo used by printf call on the device. Currently not supported

hipLimitMallocHeapSize:

Limit of heap size in bytes on the current device, should be less than the global memory size on the device

hipLimitRange:

Supported limit range

hipLimitStackSize = 0#
hipLimitPrintfFifoSize = 1#
hipLimitMallocHeapSize = 2#
hipLimitRange = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemoryAdvise(value)#

Bases: _hipMemoryAdvise__Base

HIP Memory Advise values

Attributes:
hipMemAdviseSetReadMostly:

Data will mostly be read and only occassionally be written to

hipMemAdviseUnsetReadMostly:

Undo the effect of hipMemAdviseSetReadMostly

hipMemAdviseSetPreferredLocation:

Set the preferred location for the data as the specified device

hipMemAdviseUnsetPreferredLocation:

Clear the preferred location for the data

hipMemAdviseSetAccessedBy:

Data will be accessed by the specified device so prevent page faults as much as possible

hipMemAdviseUnsetAccessedBy:

Let HIP to decide on the page faulting policy for the specified device

hipMemAdviseSetCoarseGrain:

The default memory model is fine-grain. That allows coherent operations between host and device, while executing kernels. The coarse-grain can be used for data that only needs to be coherent at dispatch boundaries for better performance

hipMemAdviseUnsetCoarseGrain:

Restores cache coherency policy back to fine-grain

hipMemAdviseSetReadMostly = 1#
hipMemAdviseUnsetReadMostly = 2#
hipMemAdviseSetPreferredLocation = 3#
hipMemAdviseUnsetPreferredLocation = 4#
hipMemAdviseSetAccessedBy = 5#
hipMemAdviseUnsetAccessedBy = 6#
hipMemAdviseSetCoarseGrain = 100#
hipMemAdviseUnsetCoarseGrain = 101#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemRangeCoherencyMode(value)#

Bases: _hipMemRangeCoherencyMode__Base

HIP Coherency Mode

Attributes:
hipMemRangeCoherencyModeFineGrain:

Updates to memory with this attribute can be done coherently from all devices

hipMemRangeCoherencyModeCoarseGrain:

Writes to memory with this attribute can be performed by a single device at a time

hipMemRangeCoherencyModeIndeterminate:

Memory region queried contains subregions with both hipMemRangeCoherencyModeFineGrain and hipMemRangeCoherencyModeCoarseGrain attributes

hipMemRangeCoherencyModeFineGrain = 0#
hipMemRangeCoherencyModeCoarseGrain = 1#
hipMemRangeCoherencyModeIndeterminate = 2#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemRangeAttribute(value)#

Bases: _hipMemRangeAttribute__Base

HIP range attributes

Attributes:
hipMemRangeAttributeReadMostly:

Whether the range will mostly be read and only occassionally be written to

hipMemRangeAttributePreferredLocation:

The preferred location of the range

hipMemRangeAttributeAccessedBy:

Memory range has hipMemAdviseSetAccessedBy set for the specified device

hipMemRangeAttributeLastPrefetchLocation:

The last location to where the range was prefetched

hipMemRangeAttributeCoherencyMode:

Returns coherency mode hipMemRangeCoherencyMode for the range

hipMemRangeAttributeReadMostly = 1#
hipMemRangeAttributePreferredLocation = 2#
hipMemRangeAttributeAccessedBy = 3#
hipMemRangeAttributeLastPrefetchLocation = 4#
hipMemRangeAttributeCoherencyMode = 100#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemPoolAttr(value)#

Bases: _hipMemPoolAttr__Base

HIP memory pool attributes

Attributes:
hipMemPoolReuseFollowEventDependencies:

(value type = int) Allow hipMemAllocAsync to use memory asynchronously freed in another streams 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 hipMemAllocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by cuFreeAsync (default enabled).

hipMemPoolAttrReleaseThreshold:

(value type = uint64_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)

hipMemPoolAttrReservedMemCurrent:

(value type = uint64_t) Amount of backing memory currently allocated for the mempool.

hipMemPoolAttrReservedMemHigh:

(value type = uint64_t) High watermark of backing memory allocated for the mempool since the last time it was reset. High watermark can only be reset to zero.

hipMemPoolAttrUsedMemCurrent:

(value type = uint64_t) Amount of memory from the pool that is currently in use by the application.

hipMemPoolAttrUsedMemHigh:

(value type = uint64_t) High watermark of the amount of memory from the pool that was in use by the application since the last time it was reset. High watermark can only be reset to zero.

hipMemPoolReuseFollowEventDependencies = 1#
hipMemPoolReuseAllowOpportunistic = 2#
hipMemPoolReuseAllowInternalDependencies = 3#
hipMemPoolAttrReleaseThreshold = 4#
hipMemPoolAttrReservedMemCurrent = 5#
hipMemPoolAttrReservedMemHigh = 6#
hipMemPoolAttrUsedMemCurrent = 7#
hipMemPoolAttrUsedMemHigh = 8#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemLocationType(value)#

Bases: _hipMemLocationType__Base

Specifies the type of location

Attributes:
hipMemLocationTypeInvalid:

(undocumented)

hipMemLocationTypeDevice:

Device location, thus it’s HIP device ID

hipMemLocationTypeInvalid = 0#
hipMemLocationTypeDevice = 1#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemLocation(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMemLocation.

Python wrapper for cdef class chip.hipMemLocation.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMemLocation.

Constructor for type hipMemLocation.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipMemLocation from a Python object.

Derives a hipMemLocation from the given Python object pyobj. In case pyobj is itself an hipMemLocation reference, this method returns it directly. No new hipMemLocation is created in this case.

get_id(self, i)#

Get value id of (<chip.hipMemLocation*>self._ptr)[i].

get_type(self, i)#

Get value of type of (<chip.hipMemLocation*>self._ptr)[i].

id#

Identifier for the provided location type hipMemLocationType

is_ptr_null#

If data pointer is NULL.

set_id(self, i, int value)#

Set value id of (<chip.hipMemLocation*>self._ptr)[i].

set_type(self, i, value)#

Set value type of (<chip.hipMemLocation*>self._ptr)[i].

type#

Specifies the location type, which describes the meaning of id

class hip.hip.hipMemAccessFlags(value)#

Bases: _hipMemAccessFlags__Base

Specifies the memory protection flags for mapping

Attributes:
hipMemAccessFlagsProtNone:

Default, make the address range not accessible

hipMemAccessFlagsProtRead:

Set the address range read accessible

hipMemAccessFlagsProtReadWrite:

Set the address range read-write accessible

hipMemAccessFlagsProtNone = 0#
hipMemAccessFlagsProtRead = 1#
hipMemAccessFlagsProtReadWrite = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemAccessDesc(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMemAccessDesc.

Python wrapper for cdef class chip.hipMemAccessDesc.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMemAccessDesc.

Constructor for type hipMemAccessDesc.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

flags#

Accessibility flags to set

static fromObj(pyobj)#

Creates a hipMemAccessDesc from a Python object.

Derives a hipMemAccessDesc from the given Python object pyobj. In case pyobj is itself an hipMemAccessDesc reference, this method returns it directly. No new hipMemAccessDesc is created in this case.

get_flags(self, i)#

Get value of flags of (<chip.hipMemAccessDesc*>self._ptr)[i].

get_location(self, i)#

Get value of location of (<chip.hipMemAccessDesc*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

location#

Location on which the accessibility has to change

set_flags(self, i, value)#

Set value flags of (<chip.hipMemAccessDesc*>self._ptr)[i].

class hip.hip.hipMemAllocationType(value)#

Bases: _hipMemAllocationType__Base

Defines the allocation types

Attributes:
hipMemAllocationTypeInvalid:

(undocumented)

hipMemAllocationTypePinned:

This allocation type is ‘pinned’, i.e. cannot migrate from its current location while the application is actively using it

hipMemAllocationTypeMax:

This allocation type is ‘pinned’, i.e. cannot migrate from its current location while the application is actively using it

hipMemAllocationTypeInvalid = 0#
hipMemAllocationTypePinned = 1#
hipMemAllocationTypeMax = 2147483647#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemAllocationHandleType(value)#

Bases: _hipMemAllocationHandleType__Base

Flags for specifying handle types for memory pool allocations

Attributes:
hipMemHandleTypeNone:

Does not allow any export mechanism

hipMemHandleTypePosixFileDescriptor:

Allows a file descriptor for exporting. Permitted only on POSIX systems

hipMemHandleTypeWin32:

Allows a Win32 NT handle for exporting. (HANDLE)

hipMemHandleTypeWin32Kmt:

Allows a Win32 KMT handle for exporting. (D3DKMT_HANDLE)

hipMemHandleTypeNone = 0#
hipMemHandleTypePosixFileDescriptor = 1#
hipMemHandleTypeWin32 = 2#
hipMemHandleTypeWin32Kmt = 4#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemPoolProps(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMemPoolProps.

Python wrapper for cdef class chip.hipMemPoolProps.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMemPoolProps.

Constructor for type hipMemPoolProps.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

allocType#

Allocation type. Currently must be specified as hipMemAllocationTypePinned

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipMemPoolProps from a Python object.

Derives a hipMemPoolProps from the given Python object pyobj. In case pyobj is itself an hipMemPoolProps reference, this method returns it directly. No new hipMemPoolProps is created in this case.

get_allocType(self, i)#

Get value of allocType of (<chip.hipMemPoolProps*>self._ptr)[i].

get_handleTypes(self, i)#

Get value of handleTypes of (<chip.hipMemPoolProps*>self._ptr)[i].

get_location(self, i)#

Get value of location of (<chip.hipMemPoolProps*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipMemPoolProps*>self._ptr)[i].

get_win32SecurityAttributes(self, i)#

Get value win32SecurityAttributes of (<chip.hipMemPoolProps*>self._ptr)[i].

handleTypes#

Handle types that will be supported by allocations from the pool

is_ptr_null#

If data pointer is NULL.

location#

Location where allocations should reside

reserved#

Reserved for future use, must be 0

set_allocType(self, i, value)#

Set value allocType of (<chip.hipMemPoolProps*>self._ptr)[i].

set_handleTypes(self, i, value)#

Set value handleTypes of (<chip.hipMemPoolProps*>self._ptr)[i].

set_win32SecurityAttributes(self, i, value)#

Set value win32SecurityAttributes of (<chip.hipMemPoolProps*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

win32SecurityAttributes#

Windows-specific LPSECURITYATTRIBUTES required when hipMemHandleTypeWin32 is specified Note:

Setting this win32SecurityAttributes can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

class hip.hip.hipMemPoolPtrExportData(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMemPoolPtrExportData.

Python wrapper for cdef class chip.hipMemPoolPtrExportData.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMemPoolPtrExportData.

Constructor for type hipMemPoolPtrExportData.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipMemPoolPtrExportData from a Python object.

Derives a hipMemPoolPtrExportData from the given Python object pyobj. In case pyobj is itself an hipMemPoolPtrExportData reference, this method returns it directly. No new hipMemPoolPtrExportData is created in this case.

get_reserved(self, i)#

Get value of reserved of (<chip.hipMemPoolPtrExportData*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

reserved#

(undocumented)

class hip.hip.hipJitOption(value)#

Bases: _hipJitOption__Base

Attributes:
hipJitOptionMaxRegisters:

(undocumented)

hipJitOptionThreadsPerBlock:

(undocumented)

hipJitOptionWallTime:

(undocumented)

hipJitOptionInfoLogBuffer:

(undocumented)

hipJitOptionInfoLogBufferSizeBytes:

(undocumented)

hipJitOptionErrorLogBuffer:

(undocumented)

hipJitOptionErrorLogBufferSizeBytes:

(undocumented)

hipJitOptionOptimizationLevel:

(undocumented)

hipJitOptionTargetFromContext:

(undocumented)

hipJitOptionTarget:

(undocumented)

hipJitOptionFallbackStrategy:

(undocumented)

hipJitOptionGenerateDebugInfo:

(undocumented)

hipJitOptionLogVerbose:

(undocumented)

hipJitOptionGenerateLineInfo:

(undocumented)

hipJitOptionCacheMode:

(undocumented)

hipJitOptionSm3xOpt:

(undocumented)

hipJitOptionFastCompile:

(undocumented)

hipJitOptionNumOptions:

(undocumented)

hipJitOptionMaxRegisters = 0#
hipJitOptionThreadsPerBlock = 1#
hipJitOptionWallTime = 2#
hipJitOptionInfoLogBuffer = 3#
hipJitOptionInfoLogBufferSizeBytes = 4#
hipJitOptionErrorLogBuffer = 5#
hipJitOptionErrorLogBufferSizeBytes = 6#
hipJitOptionOptimizationLevel = 7#
hipJitOptionTargetFromContext = 8#
hipJitOptionTarget = 9#
hipJitOptionFallbackStrategy = 10#
hipJitOptionGenerateDebugInfo = 11#
hipJitOptionLogVerbose = 12#
hipJitOptionGenerateLineInfo = 13#
hipJitOptionCacheMode = 14#
hipJitOptionSm3xOpt = 15#
hipJitOptionFastCompile = 16#
hipJitOptionNumOptions = 17#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipFuncAttribute(value)#

Bases: _hipFuncAttribute__Base

Attributes:
hipFuncAttributeMaxDynamicSharedMemorySize:

(undocumented)

hipFuncAttributePreferredSharedMemoryCarveout:

(undocumented)

hipFuncAttributeMax:

(undocumented)

hipFuncAttributeMaxDynamicSharedMemorySize = 8#
hipFuncAttributePreferredSharedMemoryCarveout = 9#
hipFuncAttributeMax = 10#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipFuncCache_t(value)#

Bases: _hipFuncCache_t__Base

Attributes:
hipFuncCachePreferNone:

no preference for shared memory or L1 (default)

hipFuncCachePreferShared:

prefer larger shared memory and smaller L1 cache

hipFuncCachePreferL1:

prefer larger L1 cache and smaller shared memory

hipFuncCachePreferEqual:

prefer equal size L1 cache and shared memory

hipFuncCachePreferNone = 0#
hipFuncCachePreferShared = 1#
hipFuncCachePreferL1 = 2#
hipFuncCachePreferEqual = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipSharedMemConfig(value)#

Bases: _hipSharedMemConfig__Base

Attributes:
hipSharedMemBankSizeDefault:

The compiler selects a device-specific value for the banking.

hipSharedMemBankSizeFourByte:

Shared mem is banked at 4-bytes intervals and performs best when adjacent threads access data 4 bytes apart.

hipSharedMemBankSizeEightByte:

Shared mem is banked at 8-byte intervals and performs best when adjacent threads access data 4 bytes apart.

hipSharedMemBankSizeDefault = 0#
hipSharedMemBankSizeFourByte = 1#
hipSharedMemBankSizeEightByte = 2#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.dim3(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.dim3.

Python wrapper for cdef class chip.dim3.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type dim3.

Constructor for type dim3.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a dim3 from a Python object.

Derives a dim3 from the given Python object pyobj. In case pyobj is itself an dim3 reference, this method returns it directly. No new dim3 is created in this case.

get_x(self, i)#

Get value x of (<chip.dim3*>self._ptr)[i].

get_y(self, i)#

Get value y of (<chip.dim3*>self._ptr)[i].

get_z(self, i)#

Get value z of (<chip.dim3*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_x(self, i, unsigned int value)#

Set value x of (<chip.dim3*>self._ptr)[i].

set_y(self, i, unsigned int value)#

Set value y of (<chip.dim3*>self._ptr)[i].

set_z(self, i, unsigned int value)#

Set value z of (<chip.dim3*>self._ptr)[i].

x#
y#
z#
class hip.hip.hipLaunchParams_t(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipLaunchParams_t.

Python wrapper for cdef class chip.hipLaunchParams_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipLaunchParams_t.

Constructor for type hipLaunchParams_t.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

args#

Arguments Note:

Setting this args can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

blockDim#

Block dimentions

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipLaunchParams_t from a Python object.

Derives a hipLaunchParams_t from the given Python object pyobj. In case pyobj is itself an hipLaunchParams_t reference, this method returns it directly. No new hipLaunchParams_t is created in this case.

func#

Device function symbol Note:

Setting this func can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

get_args(self, i)#

Get value args of (<chip.hipLaunchParams_t*>self._ptr)[i].

get_blockDim(self, i)#

Get value of blockDim of (<chip.hipLaunchParams_t*>self._ptr)[i].

get_func(self, i)#

Get value func of (<chip.hipLaunchParams_t*>self._ptr)[i].

get_gridDim(self, i)#

Get value of gridDim of (<chip.hipLaunchParams_t*>self._ptr)[i].

get_sharedMem(self, i)#

Get value sharedMem of (<chip.hipLaunchParams_t*>self._ptr)[i].

gridDim#

Grid dimentions

is_ptr_null#

If data pointer is NULL.

set_args(self, i, value)#

Set value args of (<chip.hipLaunchParams_t*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_func(self, i, value)#

Set value func of (<chip.hipLaunchParams_t*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_sharedMem(self, i, unsigned long value)#

Set value sharedMem of (<chip.hipLaunchParams_t*>self._ptr)[i].

sharedMem#

Shared memory

hip.hip.hipLaunchParams#

alias of hipLaunchParams_t

class hip.hip.hipFunctionLaunchParams_t(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipFunctionLaunchParams_t.

Python wrapper for cdef class chip.hipFunctionLaunchParams_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipFunctionLaunchParams_t.

Constructor for type hipFunctionLaunchParams_t.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

blockDimX#

X dimension of each thread block

blockDimY#

Y dimension of each thread block

blockDimZ#

Z dimension of each thread block

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipFunctionLaunchParams_t from a Python object.

Derives a hipFunctionLaunchParams_t from the given Python object pyobj. In case pyobj is itself an hipFunctionLaunchParams_t reference, this method returns it directly. No new hipFunctionLaunchParams_t is created in this case.

get_blockDimX(self, i)#

Get value blockDimX of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

get_blockDimY(self, i)#

Get value blockDimY of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

get_blockDimZ(self, i)#

Get value blockDimZ of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

get_gridDimX(self, i)#

Get value gridDimX of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

get_gridDimY(self, i)#

Get value gridDimY of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

get_gridDimZ(self, i)#

Get value gridDimZ of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

get_kernelParams(self, i)#

Get value kernelParams of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

get_sharedMemBytes(self, i)#

Get value sharedMemBytes of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

gridDimX#

Width(X) of grid in blocks

gridDimY#

Height(Y) of grid in blocks

gridDimZ#

Depth(Z) of grid in blocks

is_ptr_null#

If data pointer is NULL.

kernelParams#

Kernel parameters Note:

Setting this kernelParams can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

set_blockDimX(self, i, unsigned int value)#

Set value blockDimX of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

set_blockDimY(self, i, unsigned int value)#

Set value blockDimY of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

set_blockDimZ(self, i, unsigned int value)#

Set value blockDimZ of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

set_gridDimX(self, i, unsigned int value)#

Set value gridDimX of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

set_gridDimY(self, i, unsigned int value)#

Set value gridDimY of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

set_gridDimZ(self, i, unsigned int value)#

Set value gridDimZ of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

set_kernelParams(self, i, value)#

Set value kernelParams of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_sharedMemBytes(self, i, unsigned int value)#

Set value sharedMemBytes of (<chip.hipFunctionLaunchParams_t*>self._ptr)[i].

sharedMemBytes#

Shared memory

hip.hip.hipFunctionLaunchParams#

alias of hipFunctionLaunchParams_t

class hip.hip.hipExternalMemoryHandleType_enum(value)#

Bases: _hipExternalMemoryHandleType_enum__Base

Attributes:
hipExternalMemoryHandleTypeOpaqueFd:

(undocumented)

hipExternalMemoryHandleTypeOpaqueWin32:

(undocumented)

hipExternalMemoryHandleTypeOpaqueWin32Kmt:

(undocumented)

hipExternalMemoryHandleTypeD3D12Heap:

(undocumented)

hipExternalMemoryHandleTypeD3D12Resource:

(undocumented)

hipExternalMemoryHandleTypeD3D11Resource:

(undocumented)

hipExternalMemoryHandleTypeD3D11ResourceKmt:

(undocumented)

hipExternalMemoryHandleTypeNvSciBuf:

(undocumented)

hipExternalMemoryHandleTypeOpaqueFd = 1#
hipExternalMemoryHandleTypeOpaqueWin32 = 2#
hipExternalMemoryHandleTypeOpaqueWin32Kmt = 3#
hipExternalMemoryHandleTypeD3D12Heap = 4#
hipExternalMemoryHandleTypeD3D12Resource = 5#
hipExternalMemoryHandleTypeD3D11Resource = 6#
hipExternalMemoryHandleTypeD3D11ResourceKmt = 7#
hipExternalMemoryHandleTypeNvSciBuf = 8#
static ctypes_type()#

The type of the enum constants as ctypes type.

hip.hip.hipExternalMemoryHandleType#

alias of hipExternalMemoryHandleType_enum

class hip.hip.hipExternalMemoryHandleDesc_st_union_0_struct_0(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalMemoryHandleDesc_st_union_0_struct_0.

Python wrapper for cdef class chip.hipExternalMemoryHandleDesc_st_union_0_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalMemoryHandleDesc_st_union_0_struct_0.

Constructor for type hipExternalMemoryHandleDesc_st_union_0_struct_0.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipExternalMemoryHandleDesc_st_union_0_struct_0 from a Python object.

Derives a hipExternalMemoryHandleDesc_st_union_0_struct_0 from the given Python object pyobj. In case pyobj is itself an hipExternalMemoryHandleDesc_st_union_0_struct_0 reference, this method returns it directly. No new hipExternalMemoryHandleDesc_st_union_0_struct_0 is created in this case.

get_handle(self, i)#

Get value handle of (<chip.hipExternalMemoryHandleDesc_st_union_0_struct_0*>self._ptr)[i].

get_name(self, i)#

Get value name of (<chip.hipExternalMemoryHandleDesc_st_union_0_struct_0*>self._ptr)[i].

handle#

(undocumented) Note:

Setting this handle can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

is_ptr_null#

If data pointer is NULL.

name#

(undocumented) Note:

Setting this name can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

set_handle(self, i, value)#

Set value handle of (<chip.hipExternalMemoryHandleDesc_st_union_0_struct_0*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_name(self, i, value)#

Set value name of (<chip.hipExternalMemoryHandleDesc_st_union_0_struct_0*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

class hip.hip.hipExternalMemoryHandleDesc_st_union_0(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalMemoryHandleDesc_st_union_0.

Python wrapper for cdef class chip.hipExternalMemoryHandleDesc_st_union_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type hipExternalMemoryHandleDesc_st_union_0.

Constructor for type hipExternalMemoryHandleDesc_st_union_0.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

fd#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalMemoryHandleDesc_st_union_0 from a Python object.

Derives a hipExternalMemoryHandleDesc_st_union_0 from the given Python object pyobj. In case pyobj is itself an hipExternalMemoryHandleDesc_st_union_0 reference, this method returns it directly. No new hipExternalMemoryHandleDesc_st_union_0 is created in this case.

get_fd(self, i)#

Get value fd of (<chip.hipExternalMemoryHandleDesc_st_union_0*>self._ptr)[i].

get_nvSciBufObject(self, i)#

Get value nvSciBufObject of (<chip.hipExternalMemoryHandleDesc_st_union_0*>self._ptr)[i].

get_win32(self, i)#

Get value of win32 of (<chip.hipExternalMemoryHandleDesc_st_union_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

nvSciBufObject#

(undocumented) Note:

Setting this nvSciBufObject can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

set_fd(self, i, int value)#

Set value fd of (<chip.hipExternalMemoryHandleDesc_st_union_0*>self._ptr)[i].

set_nvSciBufObject(self, i, value)#

Set value nvSciBufObject of (<chip.hipExternalMemoryHandleDesc_st_union_0*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

win32#

(undocumented)

class hip.hip.hipExternalMemoryHandleDesc_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalMemoryHandleDesc_st.

Python wrapper for cdef class chip.hipExternalMemoryHandleDesc_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalMemoryHandleDesc_st.

Constructor for type hipExternalMemoryHandleDesc_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

flags#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalMemoryHandleDesc_st from a Python object.

Derives a hipExternalMemoryHandleDesc_st from the given Python object pyobj. In case pyobj is itself an hipExternalMemoryHandleDesc_st reference, this method returns it directly. No new hipExternalMemoryHandleDesc_st is created in this case.

get_flags(self, i)#

Get value flags of (<chip.hipExternalMemoryHandleDesc_st*>self._ptr)[i].

get_handle(self, i)#

Get value of handle of (<chip.hipExternalMemoryHandleDesc_st*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipExternalMemoryHandleDesc_st*>self._ptr)[i].

get_size(self, i)#

Get value size of (<chip.hipExternalMemoryHandleDesc_st*>self._ptr)[i].

get_type(self, i)#

Get value of type of (<chip.hipExternalMemoryHandleDesc_st*>self._ptr)[i].

handle#

(undocumented)

is_ptr_null#

If data pointer is NULL.

reserved#

(undocumented)

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.hipExternalMemoryHandleDesc_st*>self._ptr)[i].

set_size(self, i, unsigned long long value)#

Set value size of (<chip.hipExternalMemoryHandleDesc_st*>self._ptr)[i].

set_type(self, i, value)#

Set value type of (<chip.hipExternalMemoryHandleDesc_st*>self._ptr)[i].

size#

(undocumented)

type#

(undocumented)

hip.hip.hipExternalMemoryHandleDesc#

alias of hipExternalMemoryHandleDesc_st

class hip.hip.hipExternalMemoryBufferDesc_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalMemoryBufferDesc_st.

Python wrapper for cdef class chip.hipExternalMemoryBufferDesc_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalMemoryBufferDesc_st.

Constructor for type hipExternalMemoryBufferDesc_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

flags#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalMemoryBufferDesc_st from a Python object.

Derives a hipExternalMemoryBufferDesc_st from the given Python object pyobj. In case pyobj is itself an hipExternalMemoryBufferDesc_st reference, this method returns it directly. No new hipExternalMemoryBufferDesc_st is created in this case.

get_flags(self, i)#

Get value flags of (<chip.hipExternalMemoryBufferDesc_st*>self._ptr)[i].

get_offset(self, i)#

Get value offset of (<chip.hipExternalMemoryBufferDesc_st*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipExternalMemoryBufferDesc_st*>self._ptr)[i].

get_size(self, i)#

Get value size of (<chip.hipExternalMemoryBufferDesc_st*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

offset#

(undocumented)

reserved#

(undocumented)

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.hipExternalMemoryBufferDesc_st*>self._ptr)[i].

set_offset(self, i, unsigned long long value)#

Set value offset of (<chip.hipExternalMemoryBufferDesc_st*>self._ptr)[i].

set_size(self, i, unsigned long long value)#

Set value size of (<chip.hipExternalMemoryBufferDesc_st*>self._ptr)[i].

size#

(undocumented)

hip.hip.hipExternalMemoryBufferDesc#

alias of hipExternalMemoryBufferDesc_st

class hip.hip.hipExternalMemoryMipmappedArrayDesc_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalMemoryMipmappedArrayDesc_st.

Python wrapper for cdef class chip.hipExternalMemoryMipmappedArrayDesc_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalMemoryMipmappedArrayDesc_st.

Constructor for type hipExternalMemoryMipmappedArrayDesc_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

extent#

(undocumented)

flags#

(undocumented)

formatDesc#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalMemoryMipmappedArrayDesc_st from a Python object.

Derives a hipExternalMemoryMipmappedArrayDesc_st from the given Python object pyobj. In case pyobj is itself an hipExternalMemoryMipmappedArrayDesc_st reference, this method returns it directly. No new hipExternalMemoryMipmappedArrayDesc_st is created in this case.

get_extent(self, i)#

Get value of extent of (<chip.hipExternalMemoryMipmappedArrayDesc_st*>self._ptr)[i].

get_flags(self, i)#

Get value flags of (<chip.hipExternalMemoryMipmappedArrayDesc_st*>self._ptr)[i].

get_formatDesc(self, i)#

Get value of formatDesc of (<chip.hipExternalMemoryMipmappedArrayDesc_st*>self._ptr)[i].

get_numLevels(self, i)#

Get value numLevels of (<chip.hipExternalMemoryMipmappedArrayDesc_st*>self._ptr)[i].

get_offset(self, i)#

Get value offset of (<chip.hipExternalMemoryMipmappedArrayDesc_st*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

numLevels#

(undocumented)

offset#

(undocumented)

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.hipExternalMemoryMipmappedArrayDesc_st*>self._ptr)[i].

set_numLevels(self, i, unsigned int value)#

Set value numLevels of (<chip.hipExternalMemoryMipmappedArrayDesc_st*>self._ptr)[i].

set_offset(self, i, unsigned long long value)#

Set value offset of (<chip.hipExternalMemoryMipmappedArrayDesc_st*>self._ptr)[i].

hip.hip.hipExternalMemoryMipmappedArrayDesc#

alias of hipExternalMemoryMipmappedArrayDesc_st

class hip.hip.hipExternalSemaphoreHandleType_enum(value)#

Bases: _hipExternalSemaphoreHandleType_enum__Base

Attributes:
hipExternalSemaphoreHandleTypeOpaqueFd:

(undocumented)

hipExternalSemaphoreHandleTypeOpaqueWin32:

(undocumented)

hipExternalSemaphoreHandleTypeOpaqueWin32Kmt:

(undocumented)

hipExternalSemaphoreHandleTypeD3D12Fence:

(undocumented)

hipExternalSemaphoreHandleTypeD3D11Fence:

(undocumented)

hipExternalSemaphoreHandleTypeNvSciSync:

(undocumented)

hipExternalSemaphoreHandleTypeKeyedMutex:

(undocumented)

hipExternalSemaphoreHandleTypeKeyedMutexKmt:

(undocumented)

hipExternalSemaphoreHandleTypeTimelineSemaphoreFd:

(undocumented)

hipExternalSemaphoreHandleTypeTimelineSemaphoreWin32:

(undocumented)

hipExternalSemaphoreHandleTypeOpaqueFd = 1#
hipExternalSemaphoreHandleTypeOpaqueWin32 = 2#
hipExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3#
hipExternalSemaphoreHandleTypeD3D12Fence = 4#
hipExternalSemaphoreHandleTypeD3D11Fence = 5#
hipExternalSemaphoreHandleTypeNvSciSync = 6#
hipExternalSemaphoreHandleTypeKeyedMutex = 7#
hipExternalSemaphoreHandleTypeKeyedMutexKmt = 8#
hipExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9#
hipExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10#
static ctypes_type()#

The type of the enum constants as ctypes type.

hip.hip.hipExternalSemaphoreHandleType#

alias of hipExternalSemaphoreHandleType_enum

class hip.hip.hipExternalSemaphoreHandleDesc_st_union_0_struct_0(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreHandleDesc_st_union_0_struct_0.

Python wrapper for cdef class chip.hipExternalSemaphoreHandleDesc_st_union_0_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreHandleDesc_st_union_0_struct_0.

Constructor for type hipExternalSemaphoreHandleDesc_st_union_0_struct_0.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipExternalSemaphoreHandleDesc_st_union_0_struct_0 from a Python object.

Derives a hipExternalSemaphoreHandleDesc_st_union_0_struct_0 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreHandleDesc_st_union_0_struct_0 reference, this method returns it directly. No new hipExternalSemaphoreHandleDesc_st_union_0_struct_0 is created in this case.

get_handle(self, i)#

Get value handle of (<chip.hipExternalSemaphoreHandleDesc_st_union_0_struct_0*>self._ptr)[i].

get_name(self, i)#

Get value name of (<chip.hipExternalSemaphoreHandleDesc_st_union_0_struct_0*>self._ptr)[i].

handle#

(undocumented) Note:

Setting this handle can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

is_ptr_null#

If data pointer is NULL.

name#

(undocumented) Note:

Setting this name can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

set_handle(self, i, value)#

Set value handle of (<chip.hipExternalSemaphoreHandleDesc_st_union_0_struct_0*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_name(self, i, value)#

Set value name of (<chip.hipExternalSemaphoreHandleDesc_st_union_0_struct_0*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

class hip.hip.hipExternalSemaphoreHandleDesc_st_union_0(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreHandleDesc_st_union_0.

Python wrapper for cdef class chip.hipExternalSemaphoreHandleDesc_st_union_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

NvSciSyncObj#

(undocumented) Note:

Setting this NvSciSyncObj can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type hipExternalSemaphoreHandleDesc_st_union_0.

Constructor for type hipExternalSemaphoreHandleDesc_st_union_0.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

fd#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalSemaphoreHandleDesc_st_union_0 from a Python object.

Derives a hipExternalSemaphoreHandleDesc_st_union_0 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreHandleDesc_st_union_0 reference, this method returns it directly. No new hipExternalSemaphoreHandleDesc_st_union_0 is created in this case.

get_NvSciSyncObj(self, i)#

Get value NvSciSyncObj of (<chip.hipExternalSemaphoreHandleDesc_st_union_0*>self._ptr)[i].

get_fd(self, i)#

Get value fd of (<chip.hipExternalSemaphoreHandleDesc_st_union_0*>self._ptr)[i].

get_win32(self, i)#

Get value of win32 of (<chip.hipExternalSemaphoreHandleDesc_st_union_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_NvSciSyncObj(self, i, value)#

Set value NvSciSyncObj of (<chip.hipExternalSemaphoreHandleDesc_st_union_0*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_fd(self, i, int value)#

Set value fd of (<chip.hipExternalSemaphoreHandleDesc_st_union_0*>self._ptr)[i].

win32#

(undocumented)

class hip.hip.hipExternalSemaphoreHandleDesc_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreHandleDesc_st.

Python wrapper for cdef class chip.hipExternalSemaphoreHandleDesc_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreHandleDesc_st.

Constructor for type hipExternalSemaphoreHandleDesc_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

flags#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalSemaphoreHandleDesc_st from a Python object.

Derives a hipExternalSemaphoreHandleDesc_st from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreHandleDesc_st reference, this method returns it directly. No new hipExternalSemaphoreHandleDesc_st is created in this case.

get_flags(self, i)#

Get value flags of (<chip.hipExternalSemaphoreHandleDesc_st*>self._ptr)[i].

get_handle(self, i)#

Get value of handle of (<chip.hipExternalSemaphoreHandleDesc_st*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipExternalSemaphoreHandleDesc_st*>self._ptr)[i].

get_type(self, i)#

Get value of type of (<chip.hipExternalSemaphoreHandleDesc_st*>self._ptr)[i].

handle#

(undocumented)

is_ptr_null#

If data pointer is NULL.

reserved#

(undocumented)

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.hipExternalSemaphoreHandleDesc_st*>self._ptr)[i].

set_type(self, i, value)#

Set value type of (<chip.hipExternalSemaphoreHandleDesc_st*>self._ptr)[i].

type#

(undocumented)

hip.hip.hipExternalSemaphoreHandleDesc#

alias of hipExternalSemaphoreHandleDesc_st

class hip.hip.hipExternalSemaphoreSignalParams_st_struct_0_struct_0(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st_struct_0_struct_0.

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st_struct_0_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreSignalParams_st_struct_0_struct_0.

Constructor for type hipExternalSemaphoreSignalParams_st_struct_0_struct_0.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipExternalSemaphoreSignalParams_st_struct_0_struct_0 from a Python object.

Derives a hipExternalSemaphoreSignalParams_st_struct_0_struct_0 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreSignalParams_st_struct_0_struct_0 reference, this method returns it directly. No new hipExternalSemaphoreSignalParams_st_struct_0_struct_0 is created in this case.

get_value(self, i)#

Get value value of (<chip.hipExternalSemaphoreSignalParams_st_struct_0_struct_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_value(self, i, unsigned long long value)#

Set value value of (<chip.hipExternalSemaphoreSignalParams_st_struct_0_struct_0*>self._ptr)[i].

value#

(undocumented)

class hip.hip.hipExternalSemaphoreSignalParams_st_struct_0_union_0(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st_struct_0_union_0.

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st_struct_0_union_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type hipExternalSemaphoreSignalParams_st_struct_0_union_0.

Constructor for type hipExternalSemaphoreSignalParams_st_struct_0_union_0.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

fence#

(undocumented) Note:

Setting this fence can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static fromObj(pyobj)#

Creates a hipExternalSemaphoreSignalParams_st_struct_0_union_0 from a Python object.

Derives a hipExternalSemaphoreSignalParams_st_struct_0_union_0 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreSignalParams_st_struct_0_union_0 reference, this method returns it directly. No new hipExternalSemaphoreSignalParams_st_struct_0_union_0 is created in this case.

get_fence(self, i)#

Get value fence of (<chip.hipExternalSemaphoreSignalParams_st_struct_0_union_0*>self._ptr)[i].

get_reserved(self, i)#

Get value reserved of (<chip.hipExternalSemaphoreSignalParams_st_struct_0_union_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

reserved#

(undocumented)

set_fence(self, i, value)#

Set value fence of (<chip.hipExternalSemaphoreSignalParams_st_struct_0_union_0*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_reserved(self, i, unsigned long long value)#

Set value reserved of (<chip.hipExternalSemaphoreSignalParams_st_struct_0_union_0*>self._ptr)[i].

class hip.hip.hipExternalSemaphoreSignalParams_st_struct_0_struct_1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st_struct_0_struct_1.

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st_struct_0_struct_1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreSignalParams_st_struct_0_struct_1.

Constructor for type hipExternalSemaphoreSignalParams_st_struct_0_struct_1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipExternalSemaphoreSignalParams_st_struct_0_struct_1 from a Python object.

Derives a hipExternalSemaphoreSignalParams_st_struct_0_struct_1 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreSignalParams_st_struct_0_struct_1 reference, this method returns it directly. No new hipExternalSemaphoreSignalParams_st_struct_0_struct_1 is created in this case.

get_key(self, i)#

Get value key of (<chip.hipExternalSemaphoreSignalParams_st_struct_0_struct_1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

key#

(undocumented)

set_key(self, i, unsigned long long value)#

Set value key of (<chip.hipExternalSemaphoreSignalParams_st_struct_0_struct_1*>self._ptr)[i].

class hip.hip.hipExternalSemaphoreSignalParams_st_struct_0(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st_struct_0.

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreSignalParams_st_struct_0.

Constructor for type hipExternalSemaphoreSignalParams_st_struct_0.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

fence#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalSemaphoreSignalParams_st_struct_0 from a Python object.

Derives a hipExternalSemaphoreSignalParams_st_struct_0 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreSignalParams_st_struct_0 reference, this method returns it directly. No new hipExternalSemaphoreSignalParams_st_struct_0 is created in this case.

get_fence(self, i)#

Get value of fence of (<chip.hipExternalSemaphoreSignalParams_st_struct_0*>self._ptr)[i].

get_keyedMutex(self, i)#

Get value of keyedMutex of (<chip.hipExternalSemaphoreSignalParams_st_struct_0*>self._ptr)[i].

get_nvSciSync(self, i)#

Get value of nvSciSync of (<chip.hipExternalSemaphoreSignalParams_st_struct_0*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipExternalSemaphoreSignalParams_st_struct_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

keyedMutex#

(undocumented)

nvSciSync#

(undocumented)

reserved#

(undocumented)

class hip.hip.hipExternalSemaphoreSignalParams_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st.

Python wrapper for cdef class chip.hipExternalSemaphoreSignalParams_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreSignalParams_st.

Constructor for type hipExternalSemaphoreSignalParams_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

flags#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalSemaphoreSignalParams_st from a Python object.

Derives a hipExternalSemaphoreSignalParams_st from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreSignalParams_st reference, this method returns it directly. No new hipExternalSemaphoreSignalParams_st is created in this case.

get_flags(self, i)#

Get value flags of (<chip.hipExternalSemaphoreSignalParams_st*>self._ptr)[i].

get_params(self, i)#

Get value of params of (<chip.hipExternalSemaphoreSignalParams_st*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipExternalSemaphoreSignalParams_st*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

params#

(undocumented)

reserved#

(undocumented)

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.hipExternalSemaphoreSignalParams_st*>self._ptr)[i].

hip.hip.hipExternalSemaphoreSignalParams#

alias of hipExternalSemaphoreSignalParams_st

class hip.hip.hipExternalSemaphoreWaitParams_st_struct_0_struct_0(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_0.

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreWaitParams_st_struct_0_struct_0.

Constructor for type hipExternalSemaphoreWaitParams_st_struct_0_struct_0.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipExternalSemaphoreWaitParams_st_struct_0_struct_0 from a Python object.

Derives a hipExternalSemaphoreWaitParams_st_struct_0_struct_0 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreWaitParams_st_struct_0_struct_0 reference, this method returns it directly. No new hipExternalSemaphoreWaitParams_st_struct_0_struct_0 is created in this case.

get_value(self, i)#

Get value value of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_value(self, i, unsigned long long value)#

Set value value of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_0*>self._ptr)[i].

value#

(undocumented)

class hip.hip.hipExternalSemaphoreWaitParams_st_struct_0_union_0(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st_struct_0_union_0.

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st_struct_0_union_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type hipExternalSemaphoreWaitParams_st_struct_0_union_0.

Constructor for type hipExternalSemaphoreWaitParams_st_struct_0_union_0.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

fence#

(undocumented) Note:

Setting this fence can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static fromObj(pyobj)#

Creates a hipExternalSemaphoreWaitParams_st_struct_0_union_0 from a Python object.

Derives a hipExternalSemaphoreWaitParams_st_struct_0_union_0 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreWaitParams_st_struct_0_union_0 reference, this method returns it directly. No new hipExternalSemaphoreWaitParams_st_struct_0_union_0 is created in this case.

get_fence(self, i)#

Get value fence of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_union_0*>self._ptr)[i].

get_reserved(self, i)#

Get value reserved of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_union_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

reserved#

(undocumented)

set_fence(self, i, value)#

Set value fence of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_union_0*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_reserved(self, i, unsigned long long value)#

Set value reserved of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_union_0*>self._ptr)[i].

class hip.hip.hipExternalSemaphoreWaitParams_st_struct_0_struct_1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_1.

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreWaitParams_st_struct_0_struct_1.

Constructor for type hipExternalSemaphoreWaitParams_st_struct_0_struct_1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipExternalSemaphoreWaitParams_st_struct_0_struct_1 from a Python object.

Derives a hipExternalSemaphoreWaitParams_st_struct_0_struct_1 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreWaitParams_st_struct_0_struct_1 reference, this method returns it directly. No new hipExternalSemaphoreWaitParams_st_struct_0_struct_1 is created in this case.

get_key(self, i)#

Get value key of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_1*>self._ptr)[i].

get_timeoutMs(self, i)#

Get value timeoutMs of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

key#

(undocumented)

set_key(self, i, unsigned long long value)#

Set value key of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_1*>self._ptr)[i].

set_timeoutMs(self, i, unsigned int value)#

Set value timeoutMs of (<chip.hipExternalSemaphoreWaitParams_st_struct_0_struct_1*>self._ptr)[i].

timeoutMs#

(undocumented)

class hip.hip.hipExternalSemaphoreWaitParams_st_struct_0(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st_struct_0.

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreWaitParams_st_struct_0.

Constructor for type hipExternalSemaphoreWaitParams_st_struct_0.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

fence#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalSemaphoreWaitParams_st_struct_0 from a Python object.

Derives a hipExternalSemaphoreWaitParams_st_struct_0 from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreWaitParams_st_struct_0 reference, this method returns it directly. No new hipExternalSemaphoreWaitParams_st_struct_0 is created in this case.

get_fence(self, i)#

Get value of fence of (<chip.hipExternalSemaphoreWaitParams_st_struct_0*>self._ptr)[i].

get_keyedMutex(self, i)#

Get value of keyedMutex of (<chip.hipExternalSemaphoreWaitParams_st_struct_0*>self._ptr)[i].

get_nvSciSync(self, i)#

Get value of nvSciSync of (<chip.hipExternalSemaphoreWaitParams_st_struct_0*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipExternalSemaphoreWaitParams_st_struct_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

keyedMutex#

(undocumented)

nvSciSync#

(undocumented)

reserved#

(undocumented)

class hip.hip.hipExternalSemaphoreWaitParams_st(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st.

Python wrapper for cdef class chip.hipExternalSemaphoreWaitParams_st.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreWaitParams_st.

Constructor for type hipExternalSemaphoreWaitParams_st.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

flags#

(undocumented)

static fromObj(pyobj)#

Creates a hipExternalSemaphoreWaitParams_st from a Python object.

Derives a hipExternalSemaphoreWaitParams_st from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreWaitParams_st reference, this method returns it directly. No new hipExternalSemaphoreWaitParams_st is created in this case.

get_flags(self, i)#

Get value flags of (<chip.hipExternalSemaphoreWaitParams_st*>self._ptr)[i].

get_params(self, i)#

Get value of params of (<chip.hipExternalSemaphoreWaitParams_st*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipExternalSemaphoreWaitParams_st*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

params#

(undocumented)

reserved#

(undocumented)

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.hipExternalSemaphoreWaitParams_st*>self._ptr)[i].

hip.hip.hipExternalSemaphoreWaitParams#

alias of hipExternalSemaphoreWaitParams_st

class hip.hip.hipGraphicsRegisterFlags(value)#

Bases: _hipGraphicsRegisterFlags__Base

HIP Access falgs for Interop resources.

Attributes:
hipGraphicsRegisterFlagsNone:

(undocumented)

hipGraphicsRegisterFlagsReadOnly:

HIP will not write to this registered resource

hipGraphicsRegisterFlagsWriteDiscard:

(undocumented)

hipGraphicsRegisterFlagsSurfaceLoadStore:

HIP will bind this resource to a surface

hipGraphicsRegisterFlagsTextureGather:

(undocumented)

hipGraphicsRegisterFlagsNone = 0#
hipGraphicsRegisterFlagsReadOnly = 1#
hipGraphicsRegisterFlagsWriteDiscard = 2#
hipGraphicsRegisterFlagsSurfaceLoadStore = 4#
hipGraphicsRegisterFlagsTextureGather = 8#
static ctypes_type()#

The type of the enum constants as ctypes type.

hip.hip.hipGraphicsResource#

alias of _hipGraphicsResource

hip.hip.hipGraphicsResource_t#

alias of _hipGraphicsResource

class hip.hip.ihipGraph#

Bases: Pointer

Python wrapper for cdef class chip.ihipGraph.

Python wrapper for cdef class chip.ihipGraph.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ihipGraph from a Python object.

Derives a ihipGraph from the given Python object pyobj. In case pyobj is itself an ihipGraph reference, this method returns it directly. No new ihipGraph is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipGraph_t#

alias of ihipGraph

class hip.hip.hipGraphNode#

Bases: Pointer

Python wrapper for cdef class chip.hipGraphNode.

Python wrapper for cdef class chip.hipGraphNode.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipGraphNode from a Python object.

Derives a hipGraphNode from the given Python object pyobj. In case pyobj is itself an hipGraphNode reference, this method returns it directly. No new hipGraphNode is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipGraphNode_t#

alias of hipGraphNode

class hip.hip.hipGraphExec#

Bases: Pointer

Python wrapper for cdef class chip.hipGraphExec.

Python wrapper for cdef class chip.hipGraphExec.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipGraphExec from a Python object.

Derives a hipGraphExec from the given Python object pyobj. In case pyobj is itself an hipGraphExec reference, this method returns it directly. No new hipGraphExec is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipGraphExec_t#

alias of hipGraphExec

class hip.hip.hipUserObject#

Bases: Pointer

Python wrapper for cdef class chip.hipUserObject.

Python wrapper for cdef class chip.hipUserObject.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipUserObject from a Python object.

Derives a hipUserObject from the given Python object pyobj. In case pyobj is itself an hipUserObject reference, this method returns it directly. No new hipUserObject is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipUserObject_t#

alias of hipUserObject

class hip.hip.hipGraphNodeType(value)#

Bases: _hipGraphNodeType__Base

Attributes:
hipGraphNodeTypeKernel:

GPU kernel node

hipGraphNodeTypeMemcpy:

Memcpy node

hipGraphNodeTypeMemset:

Memset node

hipGraphNodeTypeHost:

Host (executable) node

hipGraphNodeTypeGraph:

Node which executes an embedded graph

hipGraphNodeTypeEmpty:

Empty (no-op) node

hipGraphNodeTypeWaitEvent:

External event wait node

hipGraphNodeTypeEventRecord:

External event record node

hipGraphNodeTypeExtSemaphoreSignal:

External Semaphore signal node

hipGraphNodeTypeExtSemaphoreWait:

External Semaphore wait node

hipGraphNodeTypeMemAlloc:

Memory alloc node

hipGraphNodeTypeMemFree:

Memory free node

hipGraphNodeTypeMemcpyFromSymbol:

MemcpyFromSymbol node

hipGraphNodeTypeMemcpyToSymbol:

MemcpyToSymbol node

hipGraphNodeTypeCount:

(undocumented)

hipGraphNodeTypeKernel = 0#
hipGraphNodeTypeMemcpy = 1#
hipGraphNodeTypeMemset = 2#
hipGraphNodeTypeHost = 3#
hipGraphNodeTypeGraph = 4#
hipGraphNodeTypeEmpty = 5#
hipGraphNodeTypeWaitEvent = 6#
hipGraphNodeTypeEventRecord = 7#
hipGraphNodeTypeExtSemaphoreSignal = 8#
hipGraphNodeTypeExtSemaphoreWait = 9#
hipGraphNodeTypeMemAlloc = 10#
hipGraphNodeTypeMemFree = 11#
hipGraphNodeTypeMemcpyFromSymbol = 12#
hipGraphNodeTypeMemcpyToSymbol = 13#
hipGraphNodeTypeCount = 14#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipHostFn_t#

Bases: Pointer

Python wrapper for cdef class chip.hipHostFn_t.

Python wrapper for cdef class chip.hipHostFn_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipHostFn_t from a Python object.

Derives a hipHostFn_t from the given Python object pyobj. In case pyobj is itself an hipHostFn_t reference, this method returns it directly. No new hipHostFn_t is created in this case.

is_ptr_null#

If data pointer is NULL.

class hip.hip.hipHostNodeParams(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipHostNodeParams.

Python wrapper for cdef class chip.hipHostNodeParams.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipHostNodeParams.

Constructor for type hipHostNodeParams.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipHostNodeParams from a Python object.

Derives a hipHostNodeParams from the given Python object pyobj. In case pyobj is itself an hipHostNodeParams reference, this method returns it directly. No new hipHostNodeParams is created in this case.

get_userData(self, i)#

Get value userData of (<chip.hipHostNodeParams*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_userData(self, i, value)#

Set value userData of (<chip.hipHostNodeParams*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

userData#

(undocumented) Note:

Setting this userData can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

class hip.hip.hipKernelNodeParams(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipKernelNodeParams.

Python wrapper for cdef class chip.hipKernelNodeParams.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipKernelNodeParams.

Constructor for type hipKernelNodeParams.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

blockDim#

(undocumented)

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

extra#

(undocumented) Note:

Setting this extra can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static fromObj(pyobj)#

Creates a hipKernelNodeParams from a Python object.

Derives a hipKernelNodeParams from the given Python object pyobj. In case pyobj is itself an hipKernelNodeParams reference, this method returns it directly. No new hipKernelNodeParams is created in this case.

func#

(undocumented) Note:

Setting this func can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

get_blockDim(self, i)#

Get value of blockDim of (<chip.hipKernelNodeParams*>self._ptr)[i].

get_extra(self, i)#

Get value extra of (<chip.hipKernelNodeParams*>self._ptr)[i].

get_func(self, i)#

Get value func of (<chip.hipKernelNodeParams*>self._ptr)[i].

get_gridDim(self, i)#

Get value of gridDim of (<chip.hipKernelNodeParams*>self._ptr)[i].

get_kernelParams(self, i)#

Get value kernelParams of (<chip.hipKernelNodeParams*>self._ptr)[i].

get_sharedMemBytes(self, i)#

Get value sharedMemBytes of (<chip.hipKernelNodeParams*>self._ptr)[i].

gridDim#

(undocumented)

is_ptr_null#

If data pointer is NULL.

kernelParams#

(undocumented) Note:

Setting this kernelParams can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

set_extra(self, i, value)#

Set value extra of (<chip.hipKernelNodeParams*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_func(self, i, value)#

Set value func of (<chip.hipKernelNodeParams*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_kernelParams(self, i, value)#

Set value kernelParams of (<chip.hipKernelNodeParams*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_sharedMemBytes(self, i, unsigned int value)#

Set value sharedMemBytes of (<chip.hipKernelNodeParams*>self._ptr)[i].

sharedMemBytes#

(undocumented)

class hip.hip.hipMemsetParams(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMemsetParams.

Python wrapper for cdef class chip.hipMemsetParams.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMemsetParams.

Constructor for type hipMemsetParams.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

dst#

(undocumented) Note:

Setting this dst can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

elementSize#

(undocumented)

static fromObj(pyobj)#

Creates a hipMemsetParams from a Python object.

Derives a hipMemsetParams from the given Python object pyobj. In case pyobj is itself an hipMemsetParams reference, this method returns it directly. No new hipMemsetParams is created in this case.

get_dst(self, i)#

Get value dst of (<chip.hipMemsetParams*>self._ptr)[i].

get_elementSize(self, i)#

Get value elementSize of (<chip.hipMemsetParams*>self._ptr)[i].

get_height(self, i)#

Get value height of (<chip.hipMemsetParams*>self._ptr)[i].

get_pitch(self, i)#

Get value pitch of (<chip.hipMemsetParams*>self._ptr)[i].

get_value(self, i)#

Get value value of (<chip.hipMemsetParams*>self._ptr)[i].

get_width(self, i)#

Get value width of (<chip.hipMemsetParams*>self._ptr)[i].

height#

(undocumented)

is_ptr_null#

If data pointer is NULL.

pitch#

(undocumented)

set_dst(self, i, value)#

Set value dst of (<chip.hipMemsetParams*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_elementSize(self, i, unsigned int value)#

Set value elementSize of (<chip.hipMemsetParams*>self._ptr)[i].

set_height(self, i, unsigned long value)#

Set value height of (<chip.hipMemsetParams*>self._ptr)[i].

set_pitch(self, i, unsigned long value)#

Set value pitch of (<chip.hipMemsetParams*>self._ptr)[i].

set_value(self, i, unsigned int value)#

Set value value of (<chip.hipMemsetParams*>self._ptr)[i].

set_width(self, i, unsigned long value)#

Set value width of (<chip.hipMemsetParams*>self._ptr)[i].

value#

(undocumented)

width#

(undocumented)

class hip.hip.hipMemAllocNodeParams(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMemAllocNodeParams.

Python wrapper for cdef class chip.hipMemAllocNodeParams.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMemAllocNodeParams.

Constructor for type hipMemAllocNodeParams.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

accessDescCount#

The number of access descriptors

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

bytesize#

The size of the requested allocation in bytes

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

dptr#

Returned device address of the allocation Note:

Setting this dptr can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static fromObj(pyobj)#

Creates a hipMemAllocNodeParams from a Python object.

Derives a hipMemAllocNodeParams from the given Python object pyobj. In case pyobj is itself an hipMemAllocNodeParams reference, this method returns it directly. No new hipMemAllocNodeParams is created in this case.

get_accessDescCount(self, i)#

Get value accessDescCount of (<chip.hipMemAllocNodeParams*>self._ptr)[i].

get_bytesize(self, i)#

Get value bytesize of (<chip.hipMemAllocNodeParams*>self._ptr)[i].

get_dptr(self, i)#

Get value dptr of (<chip.hipMemAllocNodeParams*>self._ptr)[i].

get_poolProps(self, i)#

Get value of poolProps of (<chip.hipMemAllocNodeParams*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

poolProps#

Pool properties, which contain where the location should reside

set_accessDescCount(self, i, unsigned long value)#

Set value accessDescCount of (<chip.hipMemAllocNodeParams*>self._ptr)[i].

set_bytesize(self, i, unsigned long value)#

Set value bytesize of (<chip.hipMemAllocNodeParams*>self._ptr)[i].

set_dptr(self, i, value)#

Set value dptr of (<chip.hipMemAllocNodeParams*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

class hip.hip.hipKernelNodeAttrID(value)#

Bases: _hipKernelNodeAttrID__Base

Kernel node attributeID

Attributes:
hipKernelNodeAttributeAccessPolicyWindow:

(undocumented)

hipKernelNodeAttributeCooperative:

(undocumented)

hipKernelNodeAttributeAccessPolicyWindow = 1#
hipKernelNodeAttributeCooperative = 2#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipAccessProperty(value)#

Bases: _hipAccessProperty__Base

Attributes:
hipAccessPropertyNormal:

(undocumented)

hipAccessPropertyStreaming:

(undocumented)

hipAccessPropertyPersisting:

(undocumented)

hipAccessPropertyNormal = 0#
hipAccessPropertyStreaming = 1#
hipAccessPropertyPersisting = 2#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipAccessPolicyWindow(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipAccessPolicyWindow.

Python wrapper for cdef class chip.hipAccessPolicyWindow.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipAccessPolicyWindow.

Constructor for type hipAccessPolicyWindow.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

base_ptr#

(undocumented) Note:

Setting this base_ptr can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipAccessPolicyWindow from a Python object.

Derives a hipAccessPolicyWindow from the given Python object pyobj. In case pyobj is itself an hipAccessPolicyWindow reference, this method returns it directly. No new hipAccessPolicyWindow is created in this case.

get_base_ptr(self, i)#

Get value base_ptr of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

get_hitProp(self, i)#

Get value of hitProp of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

get_hitRatio(self, i)#

Get value hitRatio of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

get_missProp(self, i)#

Get value of missProp of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

get_num_bytes(self, i)#

Get value num_bytes of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

hitProp#

(undocumented)

hitRatio#

(undocumented)

is_ptr_null#

If data pointer is NULL.

missProp#

(undocumented)

num_bytes#

(undocumented)

set_base_ptr(self, i, value)#

Set value base_ptr of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_hitProp(self, i, value)#

Set value hitProp of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

set_hitRatio(self, i, float value)#

Set value hitRatio of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

set_missProp(self, i, value)#

Set value missProp of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

set_num_bytes(self, i, unsigned long value)#

Set value num_bytes of (<chip.hipAccessPolicyWindow*>self._ptr)[i].

class hip.hip.hipKernelNodeAttrValue(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipKernelNodeAttrValue.

Python wrapper for cdef class chip.hipKernelNodeAttrValue.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type hipKernelNodeAttrValue.

Constructor for type hipKernelNodeAttrValue.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

accessPolicyWindow#

(undocumented)

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

cooperative#

(undocumented)

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipKernelNodeAttrValue from a Python object.

Derives a hipKernelNodeAttrValue from the given Python object pyobj. In case pyobj is itself an hipKernelNodeAttrValue reference, this method returns it directly. No new hipKernelNodeAttrValue is created in this case.

get_accessPolicyWindow(self, i)#

Get value of accessPolicyWindow of (<chip.hipKernelNodeAttrValue*>self._ptr)[i].

get_cooperative(self, i)#

Get value cooperative of (<chip.hipKernelNodeAttrValue*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

set_cooperative(self, i, int value)#

Set value cooperative of (<chip.hipKernelNodeAttrValue*>self._ptr)[i].

class hip.hip.hipGraphExecUpdateResult(value)#

Bases: _hipGraphExecUpdateResult__Base

Graph execution update result

Attributes:
hipGraphExecUpdateSuccess:

The update succeeded

hipGraphExecUpdateError:

The update failed for an unexpected reason which is described in the return value of the function

hipGraphExecUpdateErrorTopologyChanged:

The update failed because the topology changed

hipGraphExecUpdateErrorNodeTypeChanged:

The update failed because a node type changed

hipGraphExecUpdateErrorFunctionChanged:

(undocumented)

hipGraphExecUpdateErrorParametersChanged:

(undocumented)

hipGraphExecUpdateErrorNotSupported:

(undocumented)

hipGraphExecUpdateErrorUnsupportedFunctionChange:

(undocumented)

hipGraphExecUpdateSuccess = 0#
hipGraphExecUpdateError = 1#
hipGraphExecUpdateErrorTopologyChanged = 2#
hipGraphExecUpdateErrorNodeTypeChanged = 3#
hipGraphExecUpdateErrorFunctionChanged = 4#
hipGraphExecUpdateErrorParametersChanged = 5#
hipGraphExecUpdateErrorNotSupported = 6#
hipGraphExecUpdateErrorUnsupportedFunctionChange = 7#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipStreamCaptureMode(value)#

Bases: _hipStreamCaptureMode__Base

Attributes:
hipStreamCaptureModeGlobal:

(undocumented)

hipStreamCaptureModeThreadLocal:

(undocumented)

hipStreamCaptureModeRelaxed:

(undocumented)

hipStreamCaptureModeGlobal = 0#
hipStreamCaptureModeThreadLocal = 1#
hipStreamCaptureModeRelaxed = 2#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipStreamCaptureStatus(value)#

Bases: _hipStreamCaptureStatus__Base

Attributes:
hipStreamCaptureStatusNone:

Stream is not capturing

hipStreamCaptureStatusActive:

Stream is actively capturing

hipStreamCaptureStatusInvalidated:

Stream is part of a capture sequence that has been invalidated, but not terminated

hipStreamCaptureStatusNone = 0#
hipStreamCaptureStatusActive = 1#
hipStreamCaptureStatusInvalidated = 2#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipStreamUpdateCaptureDependenciesFlags(value)#

Bases: _hipStreamUpdateCaptureDependenciesFlags__Base

Attributes:
hipStreamAddCaptureDependencies:

Add new nodes to the dependency set

hipStreamSetCaptureDependencies:

Replace the dependency set with the new nodes

hipStreamAddCaptureDependencies = 0#
hipStreamSetCaptureDependencies = 1#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipGraphMemAttributeType(value)#

Bases: _hipGraphMemAttributeType__Base

Attributes:
hipGraphMemAttrUsedMemCurrent:

Amount of memory, in bytes, currently associated with graphs

hipGraphMemAttrUsedMemHigh:

High watermark of memory, in bytes, associated with graphs since the last time.

hipGraphMemAttrReservedMemCurrent:

Amount of memory, in bytes, currently allocated for graphs.

hipGraphMemAttrReservedMemHigh:

High watermark of memory, in bytes, currently allocated for graphs

hipGraphMemAttrUsedMemCurrent = 0#
hipGraphMemAttrUsedMemHigh = 1#
hipGraphMemAttrReservedMemCurrent = 2#
hipGraphMemAttrReservedMemHigh = 3#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipUserObjectFlags(value)#

Bases: _hipUserObjectFlags__Base

Attributes:
hipUserObjectNoDestructorSync:

Destructor execution is not synchronized.

hipUserObjectNoDestructorSync = 1#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipUserObjectRetainFlags(value)#

Bases: _hipUserObjectRetainFlags__Base

Attributes:
hipGraphUserObjectMove:

Add new reference or retain.

hipGraphUserObjectMove = 1#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipGraphInstantiateFlags(value)#

Bases: _hipGraphInstantiateFlags__Base

Attributes:
hipGraphInstantiateFlagAutoFreeOnLaunch:

(undocumented)

hipGraphInstantiateFlagUpload:

(undocumented)

hipGraphInstantiateFlagDeviceLaunch:

(undocumented)

hipGraphInstantiateFlagUseNodePriority:

(undocumented)

hipGraphInstantiateFlagAutoFreeOnLaunch = 1#
hipGraphInstantiateFlagUpload = 2#
hipGraphInstantiateFlagDeviceLaunch = 4#
hipGraphInstantiateFlagUseNodePriority = 8#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipGraphDebugDotFlags(value)#

Bases: _hipGraphDebugDotFlags__Base

Attributes:
hipGraphDebugDotFlagsVerbose:

(undocumented)

hipGraphDebugDotFlagsKernelNodeParams:

Adds hipKernelNodeParams to output

hipGraphDebugDotFlagsMemcpyNodeParams:

Adds hipMemcpy3DParms to output

hipGraphDebugDotFlagsMemsetNodeParams:

Adds hipMemsetParams to output

hipGraphDebugDotFlagsHostNodeParams:

Adds hipHostNodeParams to output

hipGraphDebugDotFlagsEventNodeParams:

(undocumented)

hipGraphDebugDotFlagsExtSemasSignalNodeParams:

(undocumented)

hipGraphDebugDotFlagsExtSemasWaitNodeParams:

(undocumented)

hipGraphDebugDotFlagsKernelNodeAttributes:

(undocumented)

hipGraphDebugDotFlagsHandles:

(undocumented)

hipGraphDebugDotFlagsVerbose = 1#
hipGraphDebugDotFlagsKernelNodeParams = 4#
hipGraphDebugDotFlagsMemcpyNodeParams = 8#
hipGraphDebugDotFlagsMemsetNodeParams = 16#
hipGraphDebugDotFlagsHostNodeParams = 32#
hipGraphDebugDotFlagsEventNodeParams = 64#
hipGraphDebugDotFlagsExtSemasSignalNodeParams = 128#
hipGraphDebugDotFlagsExtSemasWaitNodeParams = 256#
hipGraphDebugDotFlagsKernelNodeAttributes = 512#
hipGraphDebugDotFlagsHandles = 1024#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemAllocationProp_struct_0(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMemAllocationProp_struct_0.

Python wrapper for cdef class chip.hipMemAllocationProp_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMemAllocationProp_struct_0.

Constructor for type hipMemAllocationProp_struct_0.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

compressionType#

Compression type

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipMemAllocationProp_struct_0 from a Python object.

Derives a hipMemAllocationProp_struct_0 from the given Python object pyobj. In case pyobj is itself an hipMemAllocationProp_struct_0 reference, this method returns it directly. No new hipMemAllocationProp_struct_0 is created in this case.

get_compressionType(self, i)#

Get value compressionType of (<chip.hipMemAllocationProp_struct_0*>self._ptr)[i].

get_gpuDirectRDMACapable(self, i)#

Get value gpuDirectRDMACapable of (<chip.hipMemAllocationProp_struct_0*>self._ptr)[i].

get_usage(self, i)#

Get value usage of (<chip.hipMemAllocationProp_struct_0*>self._ptr)[i].

gpuDirectRDMACapable#

RDMA capable

is_ptr_null#

If data pointer is NULL.

set_compressionType(self, i, unsigned char value)#

Set value compressionType of (<chip.hipMemAllocationProp_struct_0*>self._ptr)[i].

set_gpuDirectRDMACapable(self, i, unsigned char value)#

Set value gpuDirectRDMACapable of (<chip.hipMemAllocationProp_struct_0*>self._ptr)[i].

set_usage(self, i, unsigned short value)#

Set value usage of (<chip.hipMemAllocationProp_struct_0*>self._ptr)[i].

usage#

Usage

class hip.hip.hipMemAllocationProp(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipMemAllocationProp.

Python wrapper for cdef class chip.hipMemAllocationProp.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipMemAllocationProp.

Constructor for type hipMemAllocationProp.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

allocFlags#

(undocumented)

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipMemAllocationProp from a Python object.

Derives a hipMemAllocationProp from the given Python object pyobj. In case pyobj is itself an hipMemAllocationProp reference, this method returns it directly. No new hipMemAllocationProp is created in this case.

get_allocFlags(self, i)#

Get value of allocFlags of (<chip.hipMemAllocationProp*>self._ptr)[i].

get_location(self, i)#

Get value of location of (<chip.hipMemAllocationProp*>self._ptr)[i].

get_requestedHandleType(self, i)#

Get value of requestedHandleType of (<chip.hipMemAllocationProp*>self._ptr)[i].

get_type(self, i)#

Get value of type of (<chip.hipMemAllocationProp*>self._ptr)[i].

get_win32HandleMetaData(self, i)#

Get value win32HandleMetaData of (<chip.hipMemAllocationProp*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

location#

Memory location

requestedHandleType#

Requested handle type

set_requestedHandleType(self, i, value)#

Set value requestedHandleType of (<chip.hipMemAllocationProp*>self._ptr)[i].

set_type(self, i, value)#

Set value type of (<chip.hipMemAllocationProp*>self._ptr)[i].

set_win32HandleMetaData(self, i, value)#

Set value win32HandleMetaData of (<chip.hipMemAllocationProp*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

type#

Memory allocation type

win32HandleMetaData#

Metadata for Win32 handles Note:

Setting this win32HandleMetaData can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

class hip.hip.hipExternalSemaphoreSignalNodeParams(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreSignalNodeParams.

Python wrapper for cdef class chip.hipExternalSemaphoreSignalNodeParams.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreSignalNodeParams.

Constructor for type hipExternalSemaphoreSignalNodeParams.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

extSemArray#

(undocumented) Note:

Setting this extSemArray can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static fromObj(pyobj)#

Creates a hipExternalSemaphoreSignalNodeParams from a Python object.

Derives a hipExternalSemaphoreSignalNodeParams from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreSignalNodeParams reference, this method returns it directly. No new hipExternalSemaphoreSignalNodeParams is created in this case.

get_extSemArray(self, i)#

Get value extSemArray of (<chip.hipExternalSemaphoreSignalNodeParams*>self._ptr)[i].

get_numExtSems(self, i)#

Get value numExtSems of (<chip.hipExternalSemaphoreSignalNodeParams*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

numExtSems#

(undocumented)

set_extSemArray(self, i, value)#

Set value extSemArray of (<chip.hipExternalSemaphoreSignalNodeParams*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_numExtSems(self, i, unsigned int value)#

Set value numExtSems of (<chip.hipExternalSemaphoreSignalNodeParams*>self._ptr)[i].

class hip.hip.hipExternalSemaphoreWaitNodeParams(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipExternalSemaphoreWaitNodeParams.

Python wrapper for cdef class chip.hipExternalSemaphoreWaitNodeParams.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipExternalSemaphoreWaitNodeParams.

Constructor for type hipExternalSemaphoreWaitNodeParams.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

extSemArray#

(undocumented) Note:

Setting this extSemArray can be dangerous if the underlying pointer is from a python object that is later on garbage collected.

static fromObj(pyobj)#

Creates a hipExternalSemaphoreWaitNodeParams from a Python object.

Derives a hipExternalSemaphoreWaitNodeParams from the given Python object pyobj. In case pyobj is itself an hipExternalSemaphoreWaitNodeParams reference, this method returns it directly. No new hipExternalSemaphoreWaitNodeParams is created in this case.

get_extSemArray(self, i)#

Get value extSemArray of (<chip.hipExternalSemaphoreWaitNodeParams*>self._ptr)[i].

get_numExtSems(self, i)#

Get value numExtSems of (<chip.hipExternalSemaphoreWaitNodeParams*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

numExtSems#

(undocumented)

set_extSemArray(self, i, value)#

Set value extSemArray of (<chip.hipExternalSemaphoreWaitNodeParams*>self._ptr)[i].

Note:

This can be dangerous if the pointer is from a python object that is later on garbage collected.

set_numExtSems(self, i, unsigned int value)#

Set value numExtSems of (<chip.hipExternalSemaphoreWaitNodeParams*>self._ptr)[i].

class hip.hip.ihipMemGenericAllocationHandle#

Bases: Pointer

Python wrapper for cdef class chip.ihipMemGenericAllocationHandle.

Python wrapper for cdef class chip.ihipMemGenericAllocationHandle.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a ihipMemGenericAllocationHandle from a Python object.

Derives a ihipMemGenericAllocationHandle from the given Python object pyobj. In case pyobj is itself an ihipMemGenericAllocationHandle reference, this method returns it directly. No new ihipMemGenericAllocationHandle is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipMemGenericAllocationHandle_t#

alias of ihipMemGenericAllocationHandle

class hip.hip.hipMemAllocationGranularity_flags(value)#

Bases: _hipMemAllocationGranularity_flags__Base

Flags for granularity

Attributes:
hipMemAllocationGranularityMinimum:

Minimum granularity

hipMemAllocationGranularityRecommended:

Recommended granularity for performance

hipMemAllocationGranularityMinimum = 0#
hipMemAllocationGranularityRecommended = 1#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemHandleType(value)#

Bases: _hipMemHandleType__Base

Memory handle type

Attributes:
hipMemHandleTypeGeneric:

Generic handle type

hipMemHandleTypeGeneric = 0#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipMemOperationType(value)#

Bases: _hipMemOperationType__Base

Memory operation types

Attributes:
hipMemOperationTypeMap:

Map operation

hipMemOperationTypeUnmap:

Unmap operation

hipMemOperationTypeMap = 1#
hipMemOperationTypeUnmap = 2#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipArraySparseSubresourceType(value)#

Bases: _hipArraySparseSubresourceType__Base

Subresource types for sparse arrays

Attributes:
hipArraySparseSubresourceTypeSparseLevel:

Sparse level

hipArraySparseSubresourceTypeMiptail:

Miptail

hipArraySparseSubresourceTypeSparseLevel = 0#
hipArraySparseSubresourceTypeMiptail = 1#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipArrayMapInfo_union_0(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipArrayMapInfo_union_0.

Python wrapper for cdef class chip.hipArrayMapInfo_union_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type hipArrayMapInfo_union_0.

Constructor for type hipArrayMapInfo_union_0.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipArrayMapInfo_union_0 from a Python object.

Derives a hipArrayMapInfo_union_0 from the given Python object pyobj. In case pyobj is itself an hipArrayMapInfo_union_0 reference, this method returns it directly. No new hipArrayMapInfo_union_0 is created in this case.

get_mipmap(self, i)#

Get value of mipmap of (<chip.hipArrayMapInfo_union_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

mipmap#

(undocumented)

class hip.hip.hipArrayMapInfo_union_1_struct_0(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipArrayMapInfo_union_1_struct_0.

Python wrapper for cdef class chip.hipArrayMapInfo_union_1_struct_0.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipArrayMapInfo_union_1_struct_0.

Constructor for type hipArrayMapInfo_union_1_struct_0.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

extentDepth#

Depth in elements

extentHeight#

Height in elements

extentWidth#

Width in elements

static fromObj(pyobj)#

Creates a hipArrayMapInfo_union_1_struct_0 from a Python object.

Derives a hipArrayMapInfo_union_1_struct_0 from the given Python object pyobj. In case pyobj is itself an hipArrayMapInfo_union_1_struct_0 reference, this method returns it directly. No new hipArrayMapInfo_union_1_struct_0 is created in this case.

get_extentDepth(self, i)#

Get value extentDepth of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

get_extentHeight(self, i)#

Get value extentHeight of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

get_extentWidth(self, i)#

Get value extentWidth of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

get_layer(self, i)#

Get value layer of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

get_level(self, i)#

Get value level of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

get_offsetX(self, i)#

Get value offsetX of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

get_offsetY(self, i)#

Get value offsetY of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

get_offsetZ(self, i)#

Get value offsetZ of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

layer#

For layered arrays must be a valid layer index. Otherwise, must be zero

level#

For mipmapped arrays must be a valid mipmap level. For arrays must be zero

offsetX#

X offset in elements

offsetY#

Y offset in elements

offsetZ#

Z offset in elements

set_extentDepth(self, i, unsigned int value)#

Set value extentDepth of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

set_extentHeight(self, i, unsigned int value)#

Set value extentHeight of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

set_extentWidth(self, i, unsigned int value)#

Set value extentWidth of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

set_layer(self, i, unsigned int value)#

Set value layer of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

set_level(self, i, unsigned int value)#

Set value level of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

set_offsetX(self, i, unsigned int value)#

Set value offsetX of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

set_offsetY(self, i, unsigned int value)#

Set value offsetY of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

set_offsetZ(self, i, unsigned int value)#

Set value offsetZ of (<chip.hipArrayMapInfo_union_1_struct_0*>self._ptr)[i].

class hip.hip.hipArrayMapInfo_union_1_struct_1(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipArrayMapInfo_union_1_struct_1.

Python wrapper for cdef class chip.hipArrayMapInfo_union_1_struct_1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipArrayMapInfo_union_1_struct_1.

Constructor for type hipArrayMapInfo_union_1_struct_1.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipArrayMapInfo_union_1_struct_1 from a Python object.

Derives a hipArrayMapInfo_union_1_struct_1 from the given Python object pyobj. In case pyobj is itself an hipArrayMapInfo_union_1_struct_1 reference, this method returns it directly. No new hipArrayMapInfo_union_1_struct_1 is created in this case.

get_layer(self, i)#

Get value layer of (<chip.hipArrayMapInfo_union_1_struct_1*>self._ptr)[i].

get_offset(self, i)#

Get value offset of (<chip.hipArrayMapInfo_union_1_struct_1*>self._ptr)[i].

get_size(self, i)#

Get value size of (<chip.hipArrayMapInfo_union_1_struct_1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

layer#

For layered arrays must be a valid layer index. Otherwise, must be zero

offset#

Offset within mip tail

set_layer(self, i, unsigned int value)#

Set value layer of (<chip.hipArrayMapInfo_union_1_struct_1*>self._ptr)[i].

set_offset(self, i, unsigned long long value)#

Set value offset of (<chip.hipArrayMapInfo_union_1_struct_1*>self._ptr)[i].

set_size(self, i, unsigned long long value)#

Set value size of (<chip.hipArrayMapInfo_union_1_struct_1*>self._ptr)[i].

size#

Extent in bytes

class hip.hip.hipArrayMapInfo_union_1(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipArrayMapInfo_union_1.

Python wrapper for cdef class chip.hipArrayMapInfo_union_1.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type hipArrayMapInfo_union_1.

Constructor for type hipArrayMapInfo_union_1.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipArrayMapInfo_union_1 from a Python object.

Derives a hipArrayMapInfo_union_1 from the given Python object pyobj. In case pyobj is itself an hipArrayMapInfo_union_1 reference, this method returns it directly. No new hipArrayMapInfo_union_1 is created in this case.

get_miptail(self, i)#

Get value of miptail of (<chip.hipArrayMapInfo_union_1*>self._ptr)[i].

get_sparseLevel(self, i)#

Get value of sparseLevel of (<chip.hipArrayMapInfo_union_1*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

miptail#

(undocumented)

sparseLevel#

(undocumented)

class hip.hip.hipArrayMapInfo_union_2(**kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipArrayMapInfo_union_2.

Python wrapper for cdef class chip.hipArrayMapInfo_union_2.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor type hipArrayMapInfo_union_2.

Constructor for type hipArrayMapInfo_union_2.

Args:
**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipArrayMapInfo_union_2 from a Python object.

Derives a hipArrayMapInfo_union_2 from the given Python object pyobj. In case pyobj is itself an hipArrayMapInfo_union_2 reference, this method returns it directly. No new hipArrayMapInfo_union_2 is created in this case.

is_ptr_null#

If data pointer is NULL.

class hip.hip.hipArrayMapInfo(*args, **kwargs)#

Bases: Pointer

Python wrapper for cdef class chip.hipArrayMapInfo.

Python wrapper for cdef class chip.hipArrayMapInfo.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor type hipArrayMapInfo.

Constructor for type hipArrayMapInfo.

Args:
*args:

Positional arguments. Initialize all or a subset of the member variables according to their order of declaration.

**kwargs:

Can be used to initialize member variables at construction, Just pass an argument expression of the form <member>=<value> per member that you want to initialize.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

c_sizeof(self)#

Returns the size of the underlying C type in bytes. Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

deviceBitMask#

Device ordinal bit mask

flags#

flags for future use, must be zero now.

static fromObj(pyobj)#

Creates a hipArrayMapInfo from a Python object.

Derives a hipArrayMapInfo from the given Python object pyobj. In case pyobj is itself an hipArrayMapInfo reference, this method returns it directly. No new hipArrayMapInfo is created in this case.

get_deviceBitMask(self, i)#

Get value deviceBitMask of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_flags(self, i)#

Get value flags of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_memHandle(self, i)#

Get value of memHandle of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_memHandleType(self, i)#

Get value of memHandleType of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_memOperationType(self, i)#

Get value of memOperationType of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_offset(self, i)#

Get value offset of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_reserved(self, i)#

Get value of reserved of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_resource(self, i)#

Get value of resource of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_resourceType(self, i)#

Get value of resourceType of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_subresource(self, i)#

Get value of subresource of (<chip.hipArrayMapInfo*>self._ptr)[i].

get_subresourceType(self, i)#

Get value of subresourceType of (<chip.hipArrayMapInfo*>self._ptr)[i].

is_ptr_null#

If data pointer is NULL.

memHandle#

(undocumented)

memHandleType#

Memory handle type

memOperationType#

Memory operation type

offset#

Offset within the memory

reserved#

Reserved for future use, must be zero now.

resource#

(undocumented)

resourceType#

Resource type

set_deviceBitMask(self, i, unsigned int value)#

Set value deviceBitMask of (<chip.hipArrayMapInfo*>self._ptr)[i].

set_flags(self, i, unsigned int value)#

Set value flags of (<chip.hipArrayMapInfo*>self._ptr)[i].

set_memHandleType(self, i, value)#

Set value memHandleType of (<chip.hipArrayMapInfo*>self._ptr)[i].

set_memOperationType(self, i, value)#

Set value memOperationType of (<chip.hipArrayMapInfo*>self._ptr)[i].

set_offset(self, i, unsigned long long value)#

Set value offset of (<chip.hipArrayMapInfo*>self._ptr)[i].

set_resourceType(self, i, value)#

Set value resourceType of (<chip.hipArrayMapInfo*>self._ptr)[i].

set_subresourceType(self, i, value)#

Set value subresourceType of (<chip.hipArrayMapInfo*>self._ptr)[i].

subresource#

(undocumented)

subresourceType#

Sparse subresource type

hip.hip.hipInit(unsigned int 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.

Args:
flags (int) – IN:

Initialization flag, should be zero.

Returns:

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

hip.hip.hipDriverGetVersion()#

Returns the approximate HIP driver version.

Warning:

The HIP feature set does not correspond to an exact CUDA SDK driver revision. This function always set *driverVersion 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 driver revision number here and should use arch feature flags to test device capabilities or conditional compilation.

See:

hipRuntimeGetVersion

Returns:

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

hip.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):

hip.hip.hipDeviceGet(int 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):

hip.hip.hipDeviceComputeCapability(int 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):

hip.hip.hipDeviceGetName(int len, int 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):

hip.hip.hipDeviceGetUuid(int device)#

Returns an UUID for the device.[BETA]

Beta:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Args:
device (int) – IN:

device ordinal

Returns:

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

hip.hip.hipDeviceGetP2PAttribute(attr, int srcDevice, int 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):

hip.hip.hipDeviceGetPCIBusId(int len, int 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):

hip.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):

hip.hip.hipDeviceTotalMem(int 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):

hip.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):

hip.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):

hip.hip.hipSetDevice(int 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):

hip.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):

hip.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):

hip.hip.hipDeviceGetAttribute(attr, int 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):

hip.hip.hipDeviceGetDefaultMemPool(int 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, meaning, while this is feature complete, it is still open to changes and may 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):

hip.hip.hipDeviceSetMemPool(int 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, meaning, while this is feature complete, it is still open to changes and may 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):

hip.hip.hipDeviceGetMemPool(int 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, meaning, while this is feature complete, it is still open to changes and may 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):

hip.hip.hipGetDeviceProperties(prop, int deviceId)#

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

Args:
prop (hipDeviceProp_t/object):

(undocumented)

deviceId (int):

(undocumented)

hip.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):

hip.hip.hipDeviceGetCacheConfig()#

Get Cache configuration for a specific Device

Returns:

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

hip.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):

hip.hip.hipDeviceSetLimit(limit, unsigned long 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):

hip.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):

hip.hip.hipGetDeviceFlags()#

Gets the flags set for current device

Returns:

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

hip.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):

hip.hip.hipSetDeviceFlags(unsigned int flags)#

The current device behavior is changed according 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 : Use a hueristic to select between Spin and Yield modes. If the number of HIP contexts is greater than the number of logical processors in the system, use Spin scheduling. Else use Yield scheduling.

hipDeviceMapHost : Allow mapping host memory. On ROCM, this is always allowed and the flag is ignored. hipDeviceLmemResizeToMax :

Warning:

ROCm silently ignores this flag.

Args:
flags (int) – IN:

Flag to set on the current device

Returns:

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

hip.hip.hipChooseDevice(prop)#

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

Args:
prop (hipDeviceProp_t/object):

(undocumented)

Returns:

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

  • device (int):

    (undocumented)

hip.hip.hipExtGetLinkTypeAndHopCount(int device1, int 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):

hip.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):

hip.hip.hipIpcOpenMemHandle(handle, unsigned int 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):

hip.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):

hip.hip.hipIpcGetEventHandle(handle, 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:
handle (hipIpcEventHandle_st/object) – OUT:

Pointer to hipIpcEventHandle to return the opaque event handle

event (ihipEvent_t/object) – IN:

Event allocated with hipEventInterprocess and hipEventDisableTiming flags

Returns:

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

hip.hip.hipIpcOpenEventHandle(handle)#

Opens an interprocess event handles.

Opens an interprocess event handle exported from another process with cudaIpcGetEventHandle. 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):

hip.hip.hipFuncSetAttribute(func, attr, int 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):

hip.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):

hip.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):

hip.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

hip.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

hip.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):

hip.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):

hip.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):

hip.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):

hip.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):

hip.hip.hipStreamCreate()#

Create an asynchronous stream.

Create a new asynchronous stream. 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, applicaiton must call hipStreamDestroy.

See:

hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy

Returns:

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

hip.hip.hipStreamCreateWithFlags(unsigned int flags)#

Create an asynchronous stream.

Create a new asynchronous stream. 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, applicaiton must call hipStreamDestroy. Flags controls behavior of the stream. See hipStreamDefault, hipStreamNonBlocking.

See:

hipStreamCreate, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy

Args:
flags (int) – IN:

to control stream creation.

Returns:

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

hip.hip.hipStreamCreateWithPriority(unsigned int flags, int priority)#

Create an asynchronous stream with the specified priority.

Create a new asynchronous stream with the specified priority. 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, applicaiton must call hipStreamDestroy. Flags controls behavior of the stream. See hipStreamDefault, hipStreamNonBlocking.

See:

hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy

Args:
flags (int) – IN:

to control stream creation.

priority (int) – IN:

of the stream. Lower numbers represent higher priorities.

Returns:

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

hip.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 [*greatestPriority, *leastPriority]. If the user attempts to create a stream with a priority value that is outside the the meaningful range as specified by this API, the priority is automatically clamped to within the valid range.

Returns:

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

  • hipError_t: hipSuccess

  • int:

    pointer in which value corresponding to least priority is returned.

  • int:

    pointer in which value corresponding to greatest priority is returned.

hip.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):

hip.hip.hipStreamQuery(stream)#

Return 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):

hip.hip.hipStreamSynchronize(stream)#

Wait for all commands in stream to complete.

This command is host-synchronous : the host will block until the specified stream is empty.

This command follows standard null-stream semantics. Specifically, 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 hipDeviceLaunchBlocking 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):

hip.hip.hipStreamWaitEvent(stream, event, unsigned int flags)#

Make the specified compute stream wait for an 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.

This function only waits for commands in the current stream to complete. Notably,, this function does not impliciy 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:

control operation [must be 0]

Returns:

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

hip.hip.hipStreamGetFlags(stream)#

Return flags associated with this stream.

Return flags associated with this stream in *flags.

See:

hipStreamCreateWithFlags

Args:
stream (ihipStream_t/object) – IN:

stream to be queried

Returns:

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

hip.hip.hipStreamGetPriority(stream)#

Query the priority of a stream.

Query the priority of a stream. The priority is returned in in priority.

See:

hipStreamCreateWithFlags

Args:
stream (ihipStream_t/object) – IN:

stream to be queried

Returns:

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

hip.hip.hipStreamGetDevice(stream)#

Get the device assocaited 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):

hip.hip.hipExtStreamCreateWithCUMask(unsigned int cuMaskSize)#

Create an asynchronous stream with the specified CU mask.

Create 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.

Returns:

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

  • hipError_t: hipSuccess, hipErrorInvalidHandle, hipErrorInvalidValue

  • ihipStream_t:

    Pointer to new stream

  • int:

    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.

hip.hip.hipExtStreamGetCUMask(stream, unsigned int cuMaskSize)#

Get 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

Returns:

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

class hip.hip.hipStreamCallback_t#

Bases: Pointer

Python wrapper for cdef class chip.hipStreamCallback_t.

Python wrapper for cdef class chip.hipStreamCallback_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

__getitem__()#

Returns a new Pointer whose pointer is this instance’s pointer offsetted by offset.

Args:

offset (int): Offset (in bytes) to add to this instance’s pointer.

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipStreamCallback_t from a Python object.

Derives a hipStreamCallback_t from the given Python object pyobj. In case pyobj is itself an hipStreamCallback_t reference, this method returns it directly. No new hipStreamCallback_t is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hip.hipStreamAddCallback(stream, callback, userData, unsigned int 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):

hip.hip.hipStreamWaitValue32(stream, ptr, unsigned int value, unsigned int flags, unsigned int mask)#

Enqueues a wait command to the stream.[BETA]

This section describes Stream Memory Wait and Write functions of HIP runtime API.

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.

Beta:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

See:

hipExtMallocWithFlags, hipFree, hipStreamWaitValue64, 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:
  • Defines the compare operation, supported values are hipStreamWaitValueGte

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):

hip.hip.hipStreamWaitValue64(stream, ptr, unsigned long value, unsigned int flags, unsigned long 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.

Beta:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may 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:
  • Defines the compare operation, supported values are hipStreamWaitValueGte

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):

hip.hip.hipStreamWriteValue32(stream, ptr, unsigned int value, unsigned int flags)#

Enqueues a write command to the stream.[BETA]

Enqueues a write command to the stream, write operation is performed after all earlier commands on this stream have completed the execution.

Beta:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may 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):

hip.hip.hipStreamWriteValue64(stream, ptr, unsigned long value, unsigned int flags)#

Enqueues a write command to the stream.[BETA]

Enqueues a write command to the stream, write operation is performed after all earlier commands on this stream have completed the execution.

Beta:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may 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):

hip.hip.hipEventCreateWithFlags(unsigned int 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):

hip.hip.hipEventCreate()#

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

Create an event

See:

hipEventCreateWithFlags, hipEventRecord, hipEventQuery, hipEventSynchronize, hipEventDestroy, hipEventElapsedTime

Returns:

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

hip.hip.hipEventRecord(event, stream)#

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

Args:
event (ihipEvent_t/object):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

hip.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):

hip.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 immediately.

TODO-hip- This function needs to support hipEventBlockingSync parameter.

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):

hip.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):

hip.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 that work has not completed, or if hipEventRecord() was not called on the event, then hipErrorNotReady is returned.

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):

hip.hip.hipPointerSetAttribute(value, attribute, ptr)#

Sets information on the specified pointer.[BETA]

Beta:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Args:
value (Pointer/object) – IN:

sets pointer attribute value

attribute (hipPointer_attribute):

(undocumented)

ptr (Pointer/object) – IN:

pointer to set attributes for

Returns:

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

hip.hip.hipPointerGetAttributes(attributes, ptr)#

Return attributes for the specified pointer

Note:

To get pointer’s memory type, the parameter attributes has ‘type’ as member variable. The ‘type’ indicates input pointer is allocated on device or host. That means the input pointer must be returned or passed through an HIP API such as hipHostMalloc, hipMallocManaged, hipHostRegister, etc. Otherwise, the pointer can’t be handled by this API and attributes returned hipErrorInvalidValue, due to the hipMemoryType enums values, unrecognized memory type is currently not supported due to HIP functionality backward compatibility.

See:

hipPointerGetAttribute

Args:
attributes (hipPointerAttribute_t/object) – OUT:

attributes for the specified pointer

ptr (Pointer/object) – IN:

pointer to get attributes for

Returns:

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

hip.hip.hipPointerGetAttribute(data, attribute, ptr)#

Returns information about the specified pointer.[BETA]

Beta:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

See:

hipPointerGetAttributes

Args:
data (Pointer/object) – IN,OUT:

returned pointer attribute value

attribute (hipPointer_attribute):

(undocumented)

ptr (Pointer/object) – IN:

pointer to get attributes for

Returns:

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

hip.hip.hipDrvPointerGetAttributes(unsigned int numAttributes, attributes, ptr)#

Returns information about the specified pointer.[BETA]

Beta:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

See:

hipPointerGetAttribute

Args:
numAttributes (int) – IN:

number of attributes to query for

attributes (Pointer/object) – IN:

attributes to query for

ptr (Pointer/object) – IN:

pointer to get attributes for

Returns:

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

hip.hip.hipImportExternalSemaphore(extSem_out, semHandleDesc)#

Imports an external semaphore.

This section describes the external resource interoperability functions of HIP runtime API.

See:

Args:
extSem_out (Pointer/object) – OUT:

External semaphores to be waited on

semHandleDesc (hipExternalSemaphoreHandleDesc_st/object) – IN:

Semaphore import handle descriptor

Returns:

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

hip.hip.hipSignalExternalSemaphoresAsync(extSemArray, paramsArray, unsigned int numExtSems, stream)#

Signals a set of external semaphore objects.

See:

Args:
extSemArray (Pointer/object):

(undocumented)

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):

hip.hip.hipWaitExternalSemaphoresAsync(extSemArray, paramsArray, unsigned int numExtSems, stream)#

Waits on a set of external semaphore objects

See:

Args:
extSemArray (Pointer/object):

(undocumented)

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):

hip.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:

Args:
extSem (Pointer/object) – IN:

handle to an external memory object

Returns:

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

hip.hip.hipImportExternalMemory(extMem_out, memHandleDesc)#

Imports an external memory object.

See:

Args:
extMem_out (Pointer/object) – OUT:

Returned handle to an external memory object

memHandleDesc (hipExternalMemoryHandleDesc_st/object) – IN:

Memory import handle descriptor

Returns:

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

hip.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):

hip.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):

hip.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):

hip.hip.hipMalloc(unsigned long 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):

hip.hip.hipExtMallocWithFlags(unsigned long sizeBytes, unsigned int 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, hipHostMalloc

Args:
sizeBytes (int):

(undocumented)

flags (int) – IN:

Type of memory allocation

Returns:

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

hip.hip.hipMallocHost(unsigned long 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):

hip.hip.hipMemAllocHost(unsigned long 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):

hip.hip.hipHostMalloc(unsigned long size, unsigned int 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, hipHostFree

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

Returns:

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

hip.hip.hipMallocManaged(unsigned long size, unsigned int 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.

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):

hip.hip.hipMemPrefetchAsync(dev_ptr, unsigned long count, int device, stream)#

Prefetches memory to the specified destination device using HIP.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemAdvise(dev_ptr, unsigned long count, advice, int 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 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):

hip.hip.hipMemRangeGetAttribute(data, unsigned long data_size, attribute, dev_ptr, unsigned long count)#

Query an attribute of a given memory range in HIP.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemRangeGetAttributes(attributes, unsigned long num_attributes, dev_ptr, unsigned long count)#

Query attributes of a given memory range in HIP.

Note:

This API is implemented on Linux, under development on Windows.

Args:
attributes (Pointer/object) – IN:

the attribute to query

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 3 that contains (in that order):

hip.hip.hipStreamAttachMemAsync(stream, dev_ptr, unsigned long length, unsigned int flags)#

Attach memory to a stream asynchronously in HIP.

Note:

This API is implemented on Linux, under development on Windows.

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):

hip.hip.hipMallocAsync(unsigned long 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 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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemPoolTrimTo(mem_pool, unsigned long 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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemPoolSetAccess(mem_pool, desc_list, unsigned long 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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemPoolGetAccess(flags, 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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on Windows.

Args:
flags (Pointer/object) – OUT:

Accessibility of the memory pool from the specified location/device

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 1 that contains (in that order):

hip.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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on Windows.

Args:
pool_props (hipMemPoolProps/object) – IN:

Memory pool properties

Returns:

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

hip.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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on Windows.

Args:
mem_pool (ihipMemPoolHandle_t/object) – IN:

Memory pool for destruction

Returns:

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

hip.hip.hipMallocFromPoolAsync(unsigned long 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 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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemPoolExportToShareableHandle(shared_handle, mem_pool, handle_type, unsigned int 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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemPoolImportFromShareableHandle(shared_handle, handle_type, unsigned int 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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemPoolExportPointer(export_data, 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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on Windows.

Args:
export_data (hipMemPoolPtrExportData/object) – OUT:

Returned export data

dev_ptr (Pointer/object) – IN:

Pointer to memory being exported

Returns:

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

hip.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, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipHostAlloc(unsigned long size, unsigned int flags)#

Allocate device accessible page locked 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 in bytes

flags (int) – IN:

Type of host memory allocation

Returns:

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

hip.hip.hipHostGetDevicePointer(hstPtr, unsigned int 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):

hip.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):

hip.hip.hipHostRegister(hostPtr, unsigned long sizeBytes, unsigned int flags)#

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

Flags:
  • hipHostRegisterDefault Memory is Mapped and Portable

  • hipHostRegisterPortable Memory is considered registered by all contexts. HIP only supports

one context so this is always assumed true.
  • hipHostRegisterMapped Map the allocation into the address space for the current device.

The device pointer can be obtained with hipHostGetDevicePointer.

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 device 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):

hip.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):

hip.hip.hipMallocPitch(unsigned long width, unsigned long height)#

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

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):

hip.hip.hipMemAllocPitch(unsigned long widthInBytes, unsigned long height, unsigned int elementSizeBytes)#

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

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):

(undocumented)

height (int) – IN:

Requested pitched allocation height

elementSizeBytes (int):

(undocumented)

Returns:

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

hip.hip.hipFree(ptr)#
Free memory allocated by the hcc hip memory allocation API.

This API performs an implicit hipDeviceSynchronize() call. If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.

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):

hip.hip.hipFreeHost(ptr)#

Free memory allocated by the hcc hip host memory allocation API [Deprecated]

Warning:

This API is deprecated, use hipHostFree() instead

Args:
ptr (Pointer/object) – IN:

Pointer to memory to be freed

Returns:

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

hip.hip.hipHostFree(ptr)#
Free memory allocated by the hcc hip host memory allocation API

This API performs an implicit hipDeviceSynchronize() call. If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.

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):

hip.hip.hipMemcpy(dst, src, unsigned long 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/dest 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):

(undocumented)

Returns:

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

hip.hip.hipMemcpyWithStream(dst, src, unsigned long sizeBytes, kind, stream)#

Memory copy on the stream. It allows single or multiple devices to do memory copy on single or multiple streams.

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):

(undocumented)

stream (ihipStream_t/object) – IN:

Valid stream

Returns:

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

hip.hip.hipMemcpyHtoD(dst, src, unsigned long 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):

hip.hip.hipMemcpyDtoH(dst, src, unsigned long 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):

hip.hip.hipMemcpyDtoD(dst, src, unsigned long 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):

hip.hip.hipMemcpyHtoDAsync(dst, src, unsigned long 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):

(undocumented)

Returns:

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

hip.hip.hipMemcpyDtoHAsync(dst, src, unsigned long 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):

(undocumented)

Returns:

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

hip.hip.hipMemcpyDtoDAsync(dst, src, unsigned long 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):

(undocumented)

Returns:

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

hip.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):

hip.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):

hip.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):

hip.hip.hipMemcpyToSymbol(symbol, src, unsigned long sizeBytes, unsigned long 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 detail usage, see the example at ROCm-Developer-Tools/HIP

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):

hip.hip.hipMemcpyToSymbolAsync(symbol, src, unsigned long sizeBytes, unsigned long 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):

hip.hip.hipMemcpyFromSymbol(dst, symbol, unsigned long sizeBytes, unsigned long offset, kind)#

Copies data from the given symbol on the device.

Args:
dst (Pointer/object):

(undocumented)

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):

hip.hip.hipMemcpyFromSymbolAsync(dst, symbol, unsigned long sizeBytes, unsigned long offset, kind, stream)#

Copies data from the given symbol on the device asynchronously.

Args:
dst (Pointer/object):

(undocumented)

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):

hip.hip.hipMemcpyAsync(dst, src, unsigned long sizeBytes, kind, stream)#

Copy data from src to dst asynchronously.

Warning:

If host or dest are not pinned, the memory copy will be performed synchronously. For best performance, use hipHostMalloc to allocate host memory that is transferred asynchronously.

Warning:

on HCC hipMemcpyAsync does not support overlapped H2D and D2H copies. For hipMemcpy, 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 a 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 this is not done, the hipMemcpy will still work, but will perform the copy using a staging buffer on the host.

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):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

Returns:

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

hip.hip.hipMemset(dst, int value, unsigned long 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):

(undocumented)

sizeBytes (int) – IN:

Data size in bytes

Returns:

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

hip.hip.hipMemsetD8(dest, unsigned char value, unsigned long count)#

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

Args:
dest (Pointer/object):

(undocumented)

value (int):

(undocumented)

count (int):

(undocumented)

Returns:

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

hip.hip.hipMemsetD8Async(dest, unsigned char value, unsigned long 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):

(undocumented)

value (int):

(undocumented)

count (int):

(undocumented)

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

Returns:

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

hip.hip.hipMemsetD16(dest, unsigned short value, unsigned long count)#

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

Args:
dest (Pointer/object):

(undocumented)

value (int):

(undocumented)

count (int):

(undocumented)

Returns:

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

hip.hip.hipMemsetD16Async(dest, unsigned short value, unsigned long 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):

(undocumented)

value (int):

(undocumented)

count (int):

(undocumented)

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

Returns:

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

hip.hip.hipMemsetD32(dest, int value, unsigned long count)#

Fills the memory area pointed to by dest with the constant integer value for specified number of times.

Args:
dest (Pointer/object):

(undocumented)

value (int):

(undocumented)

count (int):

(undocumented)

Returns:

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

hip.hip.hipMemsetAsync(dst, int value, unsigned long 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):

hip.hip.hipMemsetD32Async(dst, int value, unsigned long 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):

hip.hip.hipMemset2D(dst, unsigned long pitch, int value, unsigned long width, unsigned long height)#

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

Args:
dst (Pointer/object) – OUT:

Pointer to device memory

pitch (int) – IN:
  • data size in bytes

value (int) – IN:
  • constant value to be set

width (int) – IN:

height (int) – IN:

Returns:

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

hip.hip.hipMemset2DAsync(dst, unsigned long pitch, int value, unsigned long width, unsigned long height, stream)#

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

Args:
dst (Pointer/object) – IN:

Pointer to device memory

pitch (int) – IN:
  • data size in bytes

value (int) – IN:
  • constant value to be set

width (int) – IN:

height (int) – IN:

stream (ihipStream_t/object) – IN:

Returns:

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

hip.hip.hipMemset3D(pitchedDevPtr, int value, extent)#

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

Args:

pitchedDevPtr (hipPitchedPtr) – IN:

value (int) – IN:
  • constant value to be set

extent (hipExtent) – IN:

Returns:

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

hip.hip.hipMemset3DAsync(pitchedDevPtr, int value, extent, stream)#

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

Args:

pitchedDevPtr (hipPitchedPtr) – IN:

value (int) – IN:
  • constant value to be set

extent (hipExtent) – IN:

stream (ihipStream_t/object) – IN:

Returns:

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

hip.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):

hip.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):

hip.hip.hipMallocArray(desc, unsigned long width, unsigned long height, unsigned int 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):

hip.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):

hip.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):

hip.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):

hip.hip.hipMalloc3D(pitchedDevPtr, extent)#

Create a 3D memory pointer on the device.

See:

hipMallocPitch, hipMemGetInfo, hipFree

Args:
pitchedDevPtr (hipPitchedPtr/object) – OUT:

Pointer to the 3D memory

extent (hipExtent) – IN:

Requested extent

Returns:

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

hip.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):

hip.hip.hipMalloc3DArray(desc, extent, unsigned int 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):

hip.hip.hipArrayGetInfo(desc, extent, array)#

Gets info about the specified array

See:

hipArrayGetDescriptor, hipArray3DGetDescriptor

Args:
desc (hipChannelFormatDesc/object) – OUT:
  • Returned array type

extent (hipExtent/object) – OUT:
  • Returned array shape. 2D arrays will have depth of zero

array (hipArray/object) – IN:
  • The HIP array to get info for

Returns:

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

hip.hip.hipArrayGetDescriptor(pArrayDescriptor, 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:
pArrayDescriptor (HIP_ARRAY_DESCRIPTOR/object) – OUT:
  • Returned array descriptor

array (hipArray/object) – IN:
  • Array to get descriptor of

Returns:

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

hip.hip.hipArray3DGetDescriptor(pArrayDescriptor, 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:
pArrayDescriptor (HIP_ARRAY3D_DESCRIPTOR/object) – OUT:
  • Returned 3D array descriptor

array (hipArray/object) – IN:
  • 3D array to get descriptor of

Returns:

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

hip.hip.hipMemcpy2D(dst, unsigned long dpitch, src, unsigned long spitch, unsigned long width, unsigned long height, kind)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – IN:

Destination memory address

dpitch (int) – IN:

Pitch of destination memory

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):

hip.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):

hip.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):

hip.hip.hipMemcpy2DAsync(dst, unsigned long dpitch, src, unsigned long spitch, unsigned long width, unsigned long height, kind, stream)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – IN:

Destination memory address

dpitch (int) – IN:

Pitch of destination memory

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:

Stream to use

Returns:

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

hip.hip.hipMemcpy2DToArray(dst, unsigned long wOffset, unsigned long hOffset, src, unsigned long spitch, unsigned long width, unsigned long height, kind)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (hipArray/object) – IN:

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):

hip.hip.hipMemcpy2DToArrayAsync(dst, unsigned long wOffset, unsigned long hOffset, src, unsigned long spitch, unsigned long width, unsigned long height, kind, stream)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (hipArray/object) – IN:

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):

hip.hip.hipMemcpyToArray(dst, unsigned long wOffset, unsigned long hOffset, src, unsigned long count, kind)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Warning:

This API is deprecated.

Args:
dst (hipArray/object) – IN:

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):

hip.hip.hipMemcpyFromArray(dst, srcArray, unsigned long wOffset, unsigned long hOffset, unsigned long count, kind)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Warning:

This API is deprecated.

Args:
dst (Pointer/object) – IN:

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):

hip.hip.hipMemcpy2DFromArray(dst, unsigned long dpitch, src, unsigned long wOffset, unsigned long hOffset, unsigned long width, unsigned long height, kind)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – IN:

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):

hip.hip.hipMemcpy2DFromArrayAsync(dst, unsigned long dpitch, src, unsigned long wOffset, unsigned long hOffset, unsigned long width, unsigned long height, kind, stream)#

Copies data between host and device asynchronously.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – IN:

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):

hip.hip.hipMemcpyAtoH(dst, srcArray, unsigned long srcOffset, unsigned long count)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dst (Pointer/object) – IN:

Destination memory address

srcArray (hipArray/object) – IN:

Source array

srcOffset (int):

(undocumented)

count (int) – IN:

Size of memory copy in bytes

Returns:

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

hip.hip.hipMemcpyHtoA(dstArray, unsigned long dstOffset, srcHost, unsigned long count)#

Copies data between host and device.

See:

hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync

Args:
dstArray (hipArray/object) – IN:

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):

hip.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):

hip.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):

hip.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):

hip.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):

hip.hip.hipDeviceCanAccessPeer(int deviceId, int peerDeviceId)#

Determine if a device can access a peer’s memory.

Warning:

PeerToPeer support is experimental. This section describes the PeerToPeer device memory access functions of HIP runtime API.

Returns “1” in canAccessPeer if the specified device is capable of directly accessing memory physically located on peerDevice , or “0” if not.

Returns “0” in canAccessPeer if deviceId == peerDeviceId, and both are valid devices : a device is not a peer of itself.

Args:
deviceId (int) – IN:
  • device from where memory may be accessed.

peerDeviceId (int) – IN:
  • device where memory is physically located

Returns:

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

hip.hip.hipDeviceEnablePeerAccess(int peerDeviceId, unsigned int flags)#

Enable direct access from current device’s virtual address space to memory allocations physically located on a peer device.

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.

Returns hipSuccess, hipErrorInvalidDevice, hipErrorInvalidValue,

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):

hip.hip.hipDeviceDisablePeerAccess(int peerDeviceId)#

Disable direct access from current device’s virtual address space to memory allocations physically located on a peer device.

Returns hipErrorPeerAccessNotEnabled if direct access to memory on peerDevice has not yet been enabled from the current device.

Args:
peerDeviceId (int) – IN:

Peer device to disable direct access to

Returns:

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

hip.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):

hip.hip.hipMemcpyPeer(dst, int dstDeviceId, src, int srcDeviceId, unsigned long sizeBytes)#

Copies memory from one device to memory on another device.

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):

hip.hip.hipMemcpyPeerAsync(dst, int dstDeviceId, src, int srcDevice, unsigned long sizeBytes, stream)#

Copies memory from one device to memory on another device.

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):

hip.hip.hipCtxCreate(unsigned int flags, int device)#

Create a context and set it as current/default context

This section describes the context management functions of HIP runtime API.

This section describes the deprecated context management functions of HIP runtime API.

See:

hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This HIP API is deprecated.

Args:
flags (int) – IN:

Context creation flags

device (int) – IN:

device handle

Returns:

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

hip.hip.hipCtxDestroy(ctx)#

Destroy a HIP context.

See:

hipCtxCreate, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,`~.hipCtxSetCurrent`, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice

Warning:

This HIP API is deprecated.

Args:
ctx (ihipCtx_t/object) – IN:

Context to destroy

Returns:

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

hip.hip.hipCtxPopCurrent()#

Pop the current/default context and return the popped context.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxSetCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This HIP API is deprecated.

Returns:

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

hip.hip.hipCtxPushCurrent(ctx)#

Push the context to be set as current/ default context

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice

Warning:

This HIP API is deprecated.

Args:
ctx (ihipCtx_t/object) – IN:

The current context to push

Returns:

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

hip.hip.hipCtxSetCurrent(ctx)#

Set the passed context as current/default

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice

Warning:

This HIP API is deprecated.

Args:
ctx (ihipCtx_t/object) – IN:

The context to set as current

Returns:

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

hip.hip.hipCtxGetCurrent()#

Get the handle of the current/ default context

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This HIP API is deprecated.

Returns:

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

hip.hip.hipCtxGetDevice()#

Get the handle of the device associated with current/default context

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize

Warning:

This HIP API is deprecated.

Returns:

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

hip.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 HIP API is deprecated.

Args:
ctx (ihipCtx_t/object) – IN:

Context to check

Returns:

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

hip.hip.hipCtxGetCacheConfig()#

Get Cache configuration for a specific function

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 HIP API is deprecated.

Returns:

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

hip.hip.hipCtxSetCacheConfig(cacheConfig)#

Set L1/Shared cache partition.

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 HIP API is deprecated.

Args:
cacheConfig (hipFuncCache_t) – IN:

Cache configuration to set

Returns:

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

hip.hip.hipCtxSetSharedMemConfig(config)#

Set Shared memory bank configuration.

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 HIP API is deprecated.

Args:
config (hipSharedMemConfig) – IN:

Shared memory configuration to set

Returns:

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

hip.hip.hipCtxGetSharedMemConfig()#

Get Shared memory bank configuration.

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 HIP API is deprecated.

Returns:

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

hip.hip.hipCtxSynchronize()#

Blocks until the default context has completed all preceding requested tasks.

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 HIP API is deprecated.

Returns:

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

hip.hip.hipCtxGetFlags()#

Return flags used for creating default context.

See:

hipCtxCreate, hipCtxDestroy, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Warning:

This HIP API is deprecated.

Returns:

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

hip.hip.hipCtxEnablePeerAccess(peerCtx, unsigned int flags)#

Enables direct access to memory allocations in a peer context.

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 HIP API is deprecated.

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):

hip.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.

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 HIP API is deprecated.

Args:
peerCtx (ihipCtx_t/object) – IN:

Peer context to be disabled

Returns:

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

hip.hip.hipDevicePrimaryCtxGetState(int dev)#

Get the state of the primary context.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Args:
dev (int) – IN:

Device to get primary context flags for

Returns:

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

hip.hip.hipDevicePrimaryCtxRelease(int 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/HCC path.

Args:
dev (int) – IN:

Device which primary context is released

Returns:

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

hip.hip.hipDevicePrimaryCtxRetain(int dev)#

Retain the primary context on the GPU.

hipError_t hipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev);

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Args:
dev (int) – IN:

Device which primary context is released

Returns:

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

hip.hip.hipDevicePrimaryCtxReset(int dev)#

Resets the primary context on the GPU.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

Args:
dev (int) – IN:

Device which primary context is reset

Returns:

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

hip.hip.hipDevicePrimaryCtxSetFlags(int dev, unsigned int flags)#

Set flags for the primary context.

See:

hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice

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):

hip.hip.hipModuleLoad(fname)#

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

This section describes the module management functions of HIP runtime API.

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):

hip.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):

hip.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):

hip.hip.hipFuncGetAttributes(attr, func)#

Find out attributes for a given function.

Args:
attr (hipFuncAttributes/object) – OUT:

Attributes of funtion

func (Pointer/object) – IN:

Pointer to the function handle

Returns:

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

hip.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):

hip.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):

hip.hip.hipModuleLoadData(image)#

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

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

hip.hip.hipModuleLoadDataEx(image, unsigned int numOptions, options, 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

options (Pointer/object) – IN:

Options for JIT

optionValues (Pointer/object) – IN:

Option values for JIT

Returns:

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

  • hipError_t: hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized

  • ihipModule_t:

    Retuned module

hip.hip.hipModuleLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int 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 (Pointer/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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue

hip.hip.hipModuleLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int 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 x blockDim >= 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 (Pointer/object) – IN:

A list of kernel arguments.

Returns:

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

  • hipError_t: hipSuccess, hipErrorDeinitialized, hipErrorNotInitialized, hipErrorInvalidContext,

    hipErrorInvalidHandle, hipErrorInvalidImage, hipErrorInvalidValue, hipInvalidDevice, hipErrorInvalidConfiguration, hipErrorLaunchFailure, hipErrorLaunchOutOfResources, hipErrorLaunchTimeOut, hipErrorCooperativeLaunchTooLarge, hipErrorSharedObjectInitFailed

hip.hip.hipModuleLaunchCooperativeKernelMultiDevice(launchParamsList, unsigned int numDevices, unsigned int 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):

  • hipError_t: hipSuccess, hipErrorDeinitialized, hipErrorNotInitialized, hipErrorInvalidContext,

    hipErrorInvalidHandle, hipErrorInvalidImage, hipErrorInvalidValue, hipInvalidDevice, hipErrorInvalidConfiguration, hipErrorInvalidResourceHandle, hipErrorLaunchFailure, hipErrorLaunchOutOfResources, hipErrorLaunchTimeOut, hipErrorCooperativeLaunchTooLarge, hipErrorSharedObjectInitFailed

hip.hip.hipLaunchCooperativeKernel(f, gridDim, blockDimX, kernelParams, unsigned int 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 x blockDim >= 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 (Pointer/object) – IN:

A list of kernel arguments

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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue, hipErrorCooperativeLaunchTooLarge

hip.hip.hipLaunchCooperativeKernelMultiDevice(launchParamsList, int numDevices, unsigned int 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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue, hipErrorCooperativeLaunchTooLarge

hip.hip.hipExtLaunchMultiKernelMultiDevice(launchParamsList, int numDevices, unsigned int 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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue

hip.hip.hipModuleOccupancyMaxPotentialBlockSize(f, unsigned long dynSharedMemPerBlk, int 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 calulated

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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorInvalidValue

  • int:

    minimum grid size for maximum potential occupancy

  • int:

    block size for maximum potential occupancy

hip.hip.hipModuleOccupancyMaxPotentialBlockSizeWithFlags(f, unsigned long dynSharedMemPerBlk, int blockSizeLimit, unsigned int 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 calulated

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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorInvalidValue

  • int:

    minimum grid size for maximum potential occupancy

  • int:

    block size for maximum potential occupancy

hip.hip.hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(f, int blockSize, unsigned long dynSharedMemPerBlk)#

Returns occupancy for a device function.

Args:
f (ihipModuleSymbol_t/object) – IN:

Kernel function (hipFunction) for which occupancy is calulated

blockSize (int) – IN:

Block size the kernel is intended to be launched with

dynSharedMemPerBlk – IN:

dynamic shared memory usage (in bytes) intended for each block

Returns:

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

hip.hip.hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(f, int blockSize, unsigned long dynSharedMemPerBlk, unsigned int flags)#

Returns occupancy for a device function.

Args:
f (ihipModuleSymbol_t/object) – IN:

Kernel function(hipFunction_t) for which occupancy is calulated

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):

hip.hip.hipOccupancyMaxActiveBlocksPerMultiprocessor(f, int blockSize, unsigned long dynSharedMemPerBlk)#

Returns occupancy for a device function.

Args:
f (Pointer/object) – IN:

Kernel function for which occupancy is calulated

blockSize (int) – IN:

Block size the kernel is intended to be launched with

dynSharedMemPerBlk – IN:

dynamic shared memory usage (in bytes) intended for each block

Returns:

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

hip.hip.hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(f, int blockSize, unsigned long dynSharedMemPerBlk, unsigned int flags)#

Returns occupancy for a device function.

Args:
f (Pointer/object) – IN:

Kernel function for which occupancy is calulated

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):

hip.hip.hipOccupancyMaxPotentialBlockSize(f, unsigned long dynSharedMemPerBlk, int 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 calulated

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):

hip.hip.hipProfilerStart()#

Start recording of profiling information 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):

hip.hip.hipProfilerStop()#

Stop recording of profiling information. 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):

hip.hip.hipConfigureCall(gridDim, blockDim, unsigned long 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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue

hip.hip.hipSetupArgument(arg, unsigned long size, unsigned long 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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue

hip.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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue

hip.hip.hipLaunchKernel(function_address, numBlocks, dimBlocks, args, unsigned long 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 (Pointer/object) – IN:
  • kernel arguments

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):

hip.hip.hipLaunchHostFunc(stream, fn, userData)#

Enqueues a host function call in a stream.

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:
  • stream to enqueue work to.

fn (hipHostFn_t/object) – IN:
  • function to call once operations enqueued preceeding 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):

hip.hip.hipDrvMemcpy2DUnaligned(pCopy)#

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

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):

hip.hip.hipExtLaunchKernel(function_address, numBlocks, dimBlocks, args, unsigned long sharedMemBytes, stream, startEvent, stopEvent, int 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 (Pointer/object) – IN:

pointer to kernel arguments.

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):

  • hipError_t: hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue.

hip.hip.hipCreateTextureObject(pResDesc, pTexDesc, pResViewDesc)#

Creates a texture object.

Note:

3D liner 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):

hip.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):

hip.hip.hipGetChannelDesc(desc, array)#

Gets the channel descriptor in an array.

Args:
desc (hipChannelFormatDesc/object) – IN:

pointer to channel format descriptor

array (hipArray/object) – OUT:

memory array on the device

Returns:

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

hip.hip.hipGetTextureObjectResourceDesc(pResDesc, textureObject)#

Gets resource descriptor for the texture object.

Args:
pResDesc (hipResourceDesc/object) – OUT:

pointer to resource descriptor

textureObject (__hip_texture/object) – IN:

texture object

Returns:

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

hip.hip.hipGetTextureObjectResourceViewDesc(pResViewDesc, textureObject)#

Gets resource view descriptor for the texture object.

Args:
pResViewDesc (hipResourceViewDesc/object) – OUT:

pointer to resource view descriptor

textureObject (__hip_texture/object) – IN:

texture object

Returns:

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

hip.hip.hipGetTextureObjectTextureDesc(pTexDesc, textureObject)#

Gets texture descriptor for the texture object.

Args:
pTexDesc (hipTextureDesc/object) – OUT:

pointer to texture descriptor

textureObject (__hip_texture/object) – IN:

texture object

Returns:

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

hip.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):

hip.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):

hip.hip.hipTexObjectGetResourceDesc(pResDesc, texObject)#

Gets resource descriptor of a texture object.

Args:
pResDesc (HIP_RESOURCE_DESC_st/object) – OUT:

pointer to resource descriptor

texObject (__hip_texture/object) – IN:

texture object

Returns:

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

hip.hip.hipTexObjectGetResourceViewDesc(pResViewDesc, texObject)#

Gets resource view descriptor of a texture object.

Args:
pResViewDesc (HIP_RESOURCE_VIEW_DESC_st/object) – OUT:

pointer to resource view descriptor

texObject (__hip_texture/object) – IN:

texture object

Returns:

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

hip.hip.hipTexObjectGetTextureDesc(pTexDesc, texObject)#

Gets texture descriptor of a texture object.

Args:
pTexDesc (HIP_TEXTURE_DESC_st/object) – OUT:

pointer to texture descriptor

texObject (__hip_texture/object) – IN:

texture object

Returns:

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

hip.hip.hipMallocMipmappedArray(desc, extent, unsigned int numLevels, unsigned int flags)#

Allocate a mipmapped array on the device.

Note:

This API is implemented on Windows, under development on Linux.

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):

hip.hip.hipFreeMipmappedArray(mipmappedArray)#

Frees a mipmapped array on the device.

Note:

This API is implemented on Windows, under development on Linux.

Args:
mipmappedArray (hipMipmappedArray/object) – IN:
  • Pointer to mipmapped array to free

Returns:

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

hip.hip.hipGetMipmappedArrayLevel(mipmappedArray, unsigned int level)#

Gets a mipmap level of a HIP mipmapped array.

Note:

This API is implemented on Windows, under development on Linux.

Args:
mipmappedArray (hipMipmappedArray/object) – IN:
  • HIP mipmapped array

level (int) – IN:
  • Mipmap level

Returns:

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

hip.hip.hipMipmappedArrayCreate(pMipmappedArrayDesc, unsigned int numMipmapLevels)#

Create a mipmapped array.

Note:

This API is implemented on Windows, under development on Linux.

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):

hip.hip.hipMipmappedArrayDestroy(hMipmappedArray)#

Destroy a mipmapped array.

Note:

This API is implemented on Windows, under development on Linux.

Args:
hMipmappedArray (hipMipmappedArray/object) – OUT:

pointer to mipmapped array to destroy

Returns:

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

hip.hip.hipMipmappedArrayGetLevel(hMipMappedArray, unsigned int level)#

Get a mipmapped array on a mipmapped level.

Note:

This API is implemented on Windows, under development on Linux.

Args:
hMipMappedArray (hipMipmappedArray/object) – OUT:

Pointer of mipmapped array on the requested mipmap level

level (int) – OUT:

Mipmap level

Returns:

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

hip.hip.hipBindTextureToMipmappedArray(tex, mipmappedArray, desc)#

Binds a mipmapped array to a texture.

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):

hip.hip.hipGetTextureReference(symbol)#

Gets the texture reference related with the symbol.

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):

hip.hip.hipTexRefSetAddressMode(texRef, int dim, am)#

Sets address mode for a texture reference.

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):

hip.hip.hipTexRefSetArray(tex, array, unsigned int flags)#

Binds an array as a texture reference.

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):

hip.hip.hipTexRefSetFilterMode(texRef, fm)#

Set filter mode for a texture reference.

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):

hip.hip.hipTexRefSetFlags(texRef, unsigned int Flags)#

Set flags for a texture reference.

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):

hip.hip.hipTexRefSetFormat(texRef, fmt, int NumPackedComponents)#

Set format for a texture reference.

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):

hip.hip.hipBindTexture(tex, devPtr, desc, unsigned long size)#

Binds a memory area to a texture.

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):

hip.hip.hipBindTexture2D(tex, devPtr, desc, unsigned long width, unsigned long height, unsigned long pitch)#

Binds a 2D memory area to a texture.

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):

hip.hip.hipBindTextureToArray(tex, array, desc)#

Binds a memory area to a texture.

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):

hip.hip.hipGetTextureAlignmentOffset(texref)#

Get the offset of the alignment in a texture.

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):

hip.hip.hipUnbindTexture(tex)#

Unbinds a texture.

Warning:

This API is deprecated.

Args:
tex (textureReference/object) – IN:

Texture to unbind.

Returns:

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

hip.hip.hipTexRefGetAddress(texRef)#

Gets the the address for a texture reference.

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):

hip.hip.hipTexRefGetAddressMode(texRef, int dim)#

Gets the address mode for a texture reference.

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):

hip.hip.hipTexRefGetFilterMode(texRef)#

Gets filter mode for a texture reference.

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):

hip.hip.hipTexRefGetFlags(texRef)#

Gets flags for a texture reference.

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):

hip.hip.hipTexRefGetFormat(texRef)#

Gets texture format for a texture reference.

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):

hip.hip.hipTexRefGetMaxAnisotropy(texRef)#

Gets the maximum anisotropy for a texture reference.

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):

hip.hip.hipTexRefGetMipmapFilterMode(texRef)#

Gets the mipmap filter mode for a texture reference.

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):

hip.hip.hipTexRefGetMipmapLevelBias(texRef)#

Gets the mipmap level bias for a texture reference.

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):

hip.hip.hipTexRefGetMipmapLevelClamp(texRef)#

Gets the minimum and maximum mipmap level clamps for a texture reference.

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):

hip.hip.hipTexRefGetMipMappedArray(texRef)#

Gets the mipmapped array bound to a texture reference.

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):

hip.hip.hipTexRefSetAddress(texRef, dptr, unsigned long bytes)#

Sets an bound address for a texture reference.

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):

hip.hip.hipTexRefSetAddress2D(texRef, desc, dptr, unsigned long Pitch)#

Set a bind an address as a 2D texture reference.

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):

hip.hip.hipTexRefSetMaxAnisotropy(texRef, unsigned int maxAniso)#

Sets the maximum anisotropy for a texture reference.

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):

hip.hip.hipTexRefSetBorderColor(texRef)#

Sets border color for a texture reference.

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):

hip.hip.hipTexRefSetMipmapFilterMode(texRef, fm)#

Sets mipmap filter mode for a texture reference.

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):

hip.hip.hipTexRefSetMipmapLevelBias(texRef, float bias)#

Sets mipmap level bias for a texture reference.

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):

hip.hip.hipTexRefSetMipmapLevelClamp(texRef, float minMipMapLevelClamp, float maxMipMapLevelClamp)#

Sets mipmap level clamp for a texture reference.

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):

hip.hip.hipTexRefSetMipmappedArray(texRef, mipmappedArray, unsigned int Flags)#

Binds mipmapped array to a texture reference.

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):

hip.hip.hipApiName(unsigned int 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):

hip.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):

hip.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):

hip.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):

hip.hip.hipStreamBeginCapture(stream, mode)#

Begins graph capture on a stream.

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:
  • 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):

hip.hip.hipStreamEndCapture(stream)#

Ends capture on a stream, returning the captured graph.

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:
  • Stream to end capture.

Returns:

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

hip.hip.hipStreamGetCaptureInfo(stream)#

Get capture status of a stream.

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:
  • Stream under capture.

Returns:

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

hip.hip.hipStreamGetCaptureInfo_v2(stream, dependencies_out)#

Get stream’s capture state

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:
  • Stream under capture.

dependencies_out (Pointer/object) – OUT:
  • returns pointer to an array of nodes.

Returns:

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

hip.hip.hipStreamIsCapturing(stream)#

Get stream’s capture state

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:
  • Stream under capture.

Returns:

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

hip.hip.hipStreamUpdateCaptureDependencies(stream, unsigned long numDependencies, unsigned int flags)#

Update the set of dependencies in a capturing stream

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:
  • Stream under capture.

numDependencies (int) – IN:
  • size of the array in dependencies.

flags (int):

(undocumented)

Returns:

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

hip.hip.hipThreadExchangeStreamCaptureMode(mode)#

Swaps the stream capture mode of a thread.

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:
mode (Pointer/object) – IN:
  • Pointer to mode value to swap with the current mode

Returns:

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

hip.hip.hipGraphCreate(unsigned int flags)#

Creates a graph

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:
flags (int) – IN:
  • flags for graph creation, must be 0.

Returns:

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

hip.hip.hipGraphDestroy(graph)#

Destroys a graph

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:
graph (ihipGraph/object) – IN:
  • instance of graph to destroy.

Returns:

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

hip.hip.hipGraphAddDependencies(graph, unsigned long numDependencies)#

Adds dependency edges to a graph.

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:
graph (ihipGraph/object) – IN:
  • instance of the graph to add dependencies.

numDependencies (int) – IN:
  • the number of dependencies to add.

Returns:

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

hip.hip.hipGraphRemoveDependencies(graph, unsigned long numDependencies)#

Removes dependency edges from a graph.

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:
graph (ihipGraph/object) – IN:
  • instance of the graph to remove dependencies.

numDependencies (int) – IN:
  • the number of dependencies to remove.

Returns:

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

hip.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

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:
graph (ihipGraph/object) – IN:
  • instance of the graph to get the edges from.

Returns:

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

hip.hip.hipGraphGetNodes(graph)#

Returns graph 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.

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:
graph (ihipGraph/object) – IN:
  • instance of graph to get the nodes.

Returns:

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

hip.hip.hipGraphGetRootNodes(graph)#

Returns 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.

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:
graph (ihipGraph/object) – IN:
  • instance of the graph to get the nodes.

Returns:

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

hip.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.

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:
node (hipGraphNode/object) – IN:
  • graph node to get the dependencies from.

Returns:

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

hip.hip.hipGraphNodeGetDependentNodes(node)#

Returns a node’s dependent nodes.

DependentNodes 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.

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:
node (hipGraphNode/object) – IN:
  • graph node to get the Dependent nodes from.

Returns:

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

hip.hip.hipGraphNodeGetType(node)#

Returns a node’s type.

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:
node (hipGraphNode/object) – IN:
  • instance of the graph to add dependencies.

Returns:

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

hip.hip.hipGraphDestroyNode(node)#

Remove a node from the graph.

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:
node (hipGraphNode/object) – IN:
  • graph node to remove

Returns:

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

hip.hip.hipGraphClone(originalGraph)#

Clones a graph.

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:
originalGraph (ihipGraph/object) – IN:
  • original graph to clone from.

Returns:

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

hip.hip.hipGraphNodeFindInClone(originalNode, clonedGraph)#

Finds a cloned version of a node.

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:
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):

hip.hip.hipGraphInstantiate(graph, pLogBuffer, unsigned long bufferSize)#

Creates an executable graph from a graph

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:
graph (ihipGraph/object) – IN:
  • instance of graph to instantiate.

pLogBuffer (CStr/object) – OUT:
  • pointer to log buffer.

bufferSize (int) – OUT:
  • the size of log buffer.

Returns:

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

hip.hip.hipGraphInstantiateWithFlags(graph, unsigned long long flags)#

Creates an executable graph from a graph.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.It 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):

hip.hip.hipGraphLaunch(graphExec, stream)#

launches an executable graph in a stream

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:
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):

hip.hip.hipGraphUpload(graphExec, stream)#

uploads an executable graph in a stream

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:
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):

hip.hip.hipGraphExecDestroy(graphExec)#

Destroys an executable graph

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:
graphExec (hipGraphExec/object) – IN:
  • instance of executable graph to destry.

Returns:

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

hip.hip.hipGraphExecUpdate(hGraphExec, hGraph)#

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

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:
hGraphExec (hipGraphExec/object) – IN:
  • instance of executable graph to update.

hGraph (ihipGraph/object) – IN:
  • graph that contains the updated parameters.

Returns:

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

hip.hip.hipGraphAddKernelNode(graph, unsigned long numDependencies, pNodeParams)#

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

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:
graph (ihipGraph/object) – IN:
  • instance of graph to add the created node.

numDependencies (int) – IN:
  • the number of the dependencies.

pNodeParams (hipKernelNodeParams/object) – IN:
  • pointer to the parameters to the kernel execution node on the GPU.

Returns:

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

hip.hip.hipGraphKernelNodeGetParams(node, pNodeParams)#

Gets kernel node’s parameters.

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:
node (hipGraphNode/object) – IN:
  • instance of the node to get parameters from.

pNodeParams (hipKernelNodeParams/object) – OUT:
  • pointer to the parameters

Returns:

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

hip.hip.hipGraphKernelNodeSetParams(node, pNodeParams)#

Sets a kernel node’s parameters.

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:
node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

pNodeParams (hipKernelNodeParams/object) – IN:
  • const pointer to the parameters.

Returns:

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

hip.hip.hipGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams)#

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

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:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

pNodeParams (hipKernelNodeParams/object) – IN:
  • const pointer to the kernel node parameters.

Returns:

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

hip.hip.hipDrvGraphAddMemcpyNode(hGraph, unsigned long numDependencies, copyParams, ctx)#

Creates a memcpy node and adds it to a graph.

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:
hGraph (ihipGraph/object) – IN:
  • instance of graph to add the created node.

numDependencies (int) – IN:
  • the number of the dependencies.

copyParams (HIP_MEMCPY3D/object) – IN:
  • const pointer to the parameters for the memory copy.

ctx (ihipCtx_t/object) – IN:
  • cotext related to current device.

Returns:

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

hip.hip.hipGraphAddMemcpyNode(graph, unsigned long numDependencies, pCopyParams)#

Creates a memcpy node and adds it to a graph.

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:
graph (ihipGraph/object) – IN:
  • instance of graph to add the created node.

numDependencies (int) – IN:
  • the number of the dependencies.

pCopyParams (hipMemcpy3DParms/object) – IN:
  • const pointer to the parameters for the memory copy.

Returns:

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

hip.hip.hipGraphMemcpyNodeGetParams(node, pNodeParams)#

Gets a memcpy node’s parameters.

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:
node (hipGraphNode/object) – IN:
  • instance of the node to get parameters from.

pNodeParams (hipMemcpy3DParms/object) – OUT:
  • pointer to the parameters.

Returns:

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

hip.hip.hipGraphMemcpyNodeSetParams(node, pNodeParams)#

Sets a memcpy node’s parameters.

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:
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):

hip.hip.hipGraphKernelNodeSetAttribute(hNode, attr, value)#

Sets a node attribute.

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:
hNode (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

attr (hipKernelNodeAttrID) – IN:
  • the attribute node is set to.

value (hipKernelNodeAttrValue/object) – IN:
  • const pointer to the parameters.

Returns:

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

hip.hip.hipGraphKernelNodeGetAttribute(hNode, attr, value)#

Gets a node attribute.

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:
hNode (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

attr (hipKernelNodeAttrID) – IN:
  • the attribute node is set to.

value (hipKernelNodeAttrValue/object) – IN:
  • const pointer to the parameters.

Returns:

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

hip.hip.hipGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams)#

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

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:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

pNodeParams (hipMemcpy3DParms/object) – IN:
  • const pointer to the kernel node parameters.

Returns:

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

hip.hip.hipGraphAddMemcpyNode1D(graph, unsigned long numDependencies, dst, src, unsigned long count, kind)#

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

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:
graph (ihipGraph/object) – IN:
  • instance of graph to add the created node.

numDependencies (int) – IN:
  • the number of the dependencies.

dst (Pointer/object) – IN:
  • pointer to memory address to the destination.

src (Pointer/object) – IN:
  • pointer to memory address to the source.

count (int) – IN:
  • the size of the memory to copy.

kind (hipMemcpyKind) – IN:
  • the type of memory copy.

Returns:

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

hip.hip.hipGraphMemcpyNodeSetParams1D(node, dst, src, unsigned long count, kind)#

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

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:
node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

dst (Pointer/object) – IN:
  • pointer to memory address to the destination.

src (Pointer/object) – IN:
  • pointer to memory address to the source.

count (int) – IN:
  • the size of the memory to copy.

kind (hipMemcpyKind) – IN:
  • the type of memory copy.

Returns:

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

hip.hip.hipGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, unsigned long count, kind)#

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

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:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

dst (Pointer/object) – IN:
  • pointer to memory address to the destination.

src (Pointer/object) – IN:
  • pointer to memory address to the source.

count (int) – IN:
  • the size of the memory to copy.

kind (hipMemcpyKind) – IN:
  • the type of memory copy.

Returns:

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

hip.hip.hipGraphAddMemcpyNodeFromSymbol(graph, unsigned long numDependencies, dst, symbol, unsigned long count, unsigned long offset, kind)#

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

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:
graph (ihipGraph/object) – IN:
  • instance of graph to add the created node.

numDependencies (int) – IN:
  • the number of the dependencies.

dst (Pointer/object) – IN:
  • pointer to memory address to the destination.

symbol (Pointer/object) – IN:
  • Device symbol address.

count (int) – IN:
  • the size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • the type of memory copy.

Returns:

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

hip.hip.hipGraphMemcpyNodeSetParamsFromSymbol(node, dst, symbol, unsigned long count, unsigned long offset, kind)#

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

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:
node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

dst (Pointer/object) – IN:
  • pointer to memory address to the destination.

symbol (Pointer/object) – IN:
  • Device symbol address.

count (int) – IN:
  • the size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • the type of memory copy.

Returns:

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

hip.hip.hipGraphExecMemcpyNodeSetParamsFromSymbol(hGraphExec, node, dst, symbol, unsigned long count, unsigned long offset, kind)#

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

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:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

dst (Pointer/object) – IN:
  • pointer to memory address to the destination.

symbol (Pointer/object) – IN:
  • Device symbol address.

count (int) – IN:
  • the size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • the type of memory copy.

Returns:

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

hip.hip.hipGraphAddMemcpyNodeToSymbol(graph, unsigned long numDependencies, symbol, src, unsigned long count, unsigned long offset, kind)#

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

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:
graph (ihipGraph/object) – IN:
  • instance of graph to add the created node.

numDependencies (int) – IN:
  • the number of the dependencies.

symbol (Pointer/object) – IN:
  • Device symbol address.

src (Pointer/object) – IN:
  • pointer to memory address of the src.

count (int) – IN:
  • the size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • the type of memory copy.

Returns:

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

hip.hip.hipGraphMemcpyNodeSetParamsToSymbol(node, symbol, src, unsigned long count, unsigned long offset, kind)#

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

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:
node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

symbol (Pointer/object) – IN:
  • Device symbol address.

src (Pointer/object) – IN:
  • pointer to memory address of the src.

count (int) – IN:
  • the size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • the type of memory copy.

Returns:

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

hip.hip.hipGraphExecMemcpyNodeSetParamsToSymbol(hGraphExec, node, symbol, src, unsigned long count, unsigned long offset, kind)#

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

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:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

symbol (Pointer/object) – IN:
  • Device symbol address.

src (Pointer/object) – IN:
  • pointer to memory address of the src.

count (int) – IN:
  • the size of the memory to copy.

offset (int) – IN:
  • Offset from start of symbol in bytes.

kind (hipMemcpyKind) – IN:
  • the type of memory copy.

Returns:

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

hip.hip.hipGraphAddMemsetNode(graph, unsigned long numDependencies, pMemsetParams)#

Creates a memset node and adds it to a graph.

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:
graph (ihipGraph/object) – IN:
  • instance of the graph to add the created node.

numDependencies (int) – IN:
  • the number of the dependencies.

pMemsetParams (hipMemsetParams/object) – IN:
  • const pointer to the parameters for the memory set.

Returns:

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

hip.hip.hipGraphMemsetNodeGetParams(node, pNodeParams)#

Gets a memset node’s parameters.

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:
node (hipGraphNode/object) – IN:
  • instane of the node to get parameters from.

pNodeParams (hipMemsetParams/object) – OUT:
  • pointer to the parameters.

Returns:

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

hip.hip.hipGraphMemsetNodeSetParams(node, pNodeParams)#

Sets a memset node’s parameters.

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:
node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

pNodeParams (hipMemsetParams/object) – IN:
  • pointer to the parameters.

Returns:

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

hip.hip.hipGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams)#

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

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:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

pNodeParams (hipMemsetParams/object) – IN:
  • pointer to the parameters.

Returns:

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

hip.hip.hipGraphAddHostNode(graph, unsigned long numDependencies, pNodeParams)#

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

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:
graph (ihipGraph/object) – IN:
  • instance of the graph to add the created node.

numDependencies (int) – IN:
  • the number of the dependencies.

pNodeParams (hipHostNodeParams/object) – IN:

-pointer to the parameters.

Returns:

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

hip.hip.hipGraphHostNodeGetParams(node, pNodeParams)#

Returns a host node’s parameters.

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:
node (hipGraphNode/object) – IN:
  • instane of the node to get parameters from.

pNodeParams (hipHostNodeParams/object) – OUT:
  • pointer to the parameters.

Returns:

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

hip.hip.hipGraphHostNodeSetParams(node, pNodeParams)#

Sets a host node’s parameters.

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:
node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

pNodeParams (hipHostNodeParams/object) – IN:
  • pointer to the parameters.

Returns:

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

hip.hip.hipGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams)#

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

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:
hGraphExec (hipGraphExec/object) – IN:
  • instance of the executable graph with the node.

node (hipGraphNode/object) – IN:
  • instance of the node to set parameters to.

pNodeParams (hipHostNodeParams/object) – IN:
  • pointer to the parameters.

Returns:

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

hip.hip.hipGraphAddChildGraphNode(graph, unsigned long numDependencies, childGraph)#

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

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:
graph (ihipGraph/object) – IN:
  • instance of the graph to add the created node.

numDependencies (int) – IN:
  • the number of the dependencies.

childGraph (ihipGraph/object) – IN:
  • the graph to clone into this node

Returns:

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

hip.hip.hipGraphChildGraphNodeGetGraph(node)#

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

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:
node (hipGraphNode/object) – IN:
  • instane of the node to get child graph.

Returns:

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

hip.hip.hipGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph)#

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

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:
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):

hip.hip.hipGraphAddEmptyNode(graph, unsigned long numDependencies)#

Creates an empty node and adds it to a graph.

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:
graph (ihipGraph/object) – IN:
  • instane of the graph the node is add to.

numDependencies (int) – IN:
  • the number of dependencies.

Returns:

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

hip.hip.hipGraphAddEventRecordNode(graph, unsigned long numDependencies, event)#

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

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:
graph (ihipGraph/object) – IN:
  • instane of the graph the node to be added.

numDependencies (int) – IN:
  • the number of dependencies.

event (ihipEvent_t/object) – IN:
  • Event for the node.

Returns:

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

hip.hip.hipGraphEventRecordNodeGetEvent(node)#

Returns the event associated with an event record node.

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:
node (hipGraphNode/object) – IN:
  • instane of the node to get event from.

Returns:

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

hip.hip.hipGraphEventRecordNodeSetEvent(node, event)#

Sets an event record node’s event.

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:
node (hipGraphNode/object) – IN:
  • instane 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):

hip.hip.hipGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)#

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

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:
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):

hip.hip.hipGraphAddEventWaitNode(graph, unsigned long numDependencies, event)#

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

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:
graph (ihipGraph/object) – IN:
  • instane of the graph the node to be added.

numDependencies (int) – IN:
  • the number of dependencies.

event (ihipEvent_t/object) – IN:
  • Event for the node.

Returns:

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

hip.hip.hipGraphEventWaitNodeGetEvent(node)#

Returns the event associated with an event wait node.

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:
node (hipGraphNode/object) – IN:
  • instane of the node to get event from.

Returns:

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

hip.hip.hipGraphEventWaitNodeSetEvent(node, event)#

Sets an event wait node’s event.

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:
node (hipGraphNode/object) – IN:
  • instane 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):

hip.hip.hipGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)#

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

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:
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):

hip.hip.hipGraphAddMemAllocNode(graph, unsigned long numDependencies, pNodeParams)#

Creates a memory allocation node and adds it to a graph

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:
graph (ihipGraph/object) – IN:
  • Instane of the graph the node to be added

numDependencies (int) – IN:
  • The number of dependencies

pNodeParams (hipMemAllocNodeParams/object) – IN:
  • Node parameters for memory allocation

Returns:

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

hip.hip.hipGraphMemAllocNodeGetParams(node, pNodeParams)#

Returns parameters for memory allocation node

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:
node (hipGraphNode/object) – IN:
  • Memory allocation node for a query

pNodeParams (hipMemAllocNodeParams/object) – OUT:
  • Parameters for the specified memory allocation node

Returns:

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

hip.hip.hipGraphAddMemFreeNode(graph, unsigned long numDependencies, dev_ptr)#

Creates a memory free node and adds it to a graph

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:
graph (ihipGraph/object) – IN:
  • Instane of the graph the node to be added

numDependencies (int) – IN:
  • The number of dependencies

dev_ptr (Pointer/object) – IN:
  • Pointer to the memory to be freed

Returns:

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

hip.hip.hipGraphMemFreeNodeGetParams(node, dev_ptr)#

Returns parameters for memory free node

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:
node (hipGraphNode/object) – IN:
  • Memory free node for a query

dev_ptr (Pointer/object) – OUT:
  • Device pointer for the specified memory free node

Returns:

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

hip.hip.hipDeviceGetGraphMemAttribute(int device, attr, value)#

Get the mem attribute for graphs.

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:
device (int) – IN:
  • device the attr is get for.

attr (hipGraphMemAttributeType) – IN:
  • attr to get.

value (Pointer/object) – OUT:
  • value for specific attr.

Returns:

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

hip.hip.hipDeviceSetGraphMemAttribute(int device, attr, value)#

Set the mem attribute for graphs.

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:
device (int) – IN:
  • device the attr is set for.

attr (hipGraphMemAttributeType) – IN:
  • attr to set.

value (Pointer/object) – IN:
  • value for specific attr.

Returns:

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

hip.hip.hipDeviceGraphMemTrim(int device)#

Free unused memory on specific device used for graph back to OS.

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:
device (int) – IN:
  • device the memory is used for graphs

Returns:

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

hip.hip.hipUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags)#

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

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:
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):

hip.hip.hipUserObjectRelease(object, unsigned int count)#

Release number of references to resource.

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:
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):

hip.hip.hipUserObjectRetain(object, unsigned int count)#

Retain number of references to resource.

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:
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):

hip.hip.hipGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags)#

Retain user object for graphs.

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:
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):

hip.hip.hipGraphReleaseUserObject(graph, object, unsigned int count)#

Release user object from graphs.

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:
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):

hip.hip.hipGraphDebugDotPrint(graph, path, unsigned int flags)#

Write a DOT file describing graph structure.

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:
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):

hip.hip.hipGraphKernelNodeCopyAttributes(hSrc, hDst)#

Copies attributes from source node to destination node.

Copies attributes from source node to destination node. Both node must have the same context.

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:
hSrc (hipGraphNode/object) – IN:
  • Source node.

For list of attributes see hipKernelNodeAttrID.

hDst (hipGraphNode/object) – OUT:
  • Destination node.

Returns:

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

hip.hip.hipGraphNodeSetEnabled(hGraphExec, hNode, unsigned int 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.

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:
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):

hip.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.

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:
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):

hip.hip.hipMemAddressFree(devPtr, unsigned long size)#

Frees an address range reservation made via hipMemAddressReserve

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemAddressReserve(unsigned long size, unsigned long alignment, addr, unsigned long long flags)#

Reserves an address range

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemCreate(unsigned long size, prop, unsigned long long flags)#

Creates a memory allocation described by the properties and size

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemExportToShareableHandle(shareableHandle, handle, handleType, unsigned long long flags)#

Exports an allocation to a requested shareable handle type.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemGetAccess(location, ptr)#

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

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemGetAllocationGranularity(prop, option)#

Calculates either the minimal or recommended granularity.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemGetAllocationPropertiesFromHandle(prop, handle)#

Retrieve the property structure of the given handle.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux under development on Windows.

Args:
prop (hipMemAllocationProp/object) – OUT:
  • properties of the given handle.

handle (ihipMemGenericAllocationHandle/object) – IN:
  • handle to perform the query on.

Returns:

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

hip.hip.hipMemImportFromShareableHandle(osHandle, shHandleType)#

Imports an allocation from a requested shareable handle type.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemMap(ptr, unsigned long size, unsigned long offset, handle, unsigned long long flags)#

Maps an allocation handle to a reserved virtual address range.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemMapArrayAsync(mapInfoList, unsigned int count, stream)#

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

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on Windows.

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):

hip.hip.hipMemRelease(handle)#

Release a memory handle representing a memory allocation which was previously allocated through hipMemCreate.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on Windows.

Args:
handle (ihipMemGenericAllocationHandle/object) – IN:
  • handle of the memory allocation.

Returns:

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

hip.hip.hipMemRetainAllocationHandle(addr)#

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

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on Windows.

Args:
addr (Pointer/object) – IN:
  • address to look up.

Returns:

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

hip.hip.hipMemSetAccess(ptr, unsigned long size, desc, unsigned long count)#

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

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipMemUnmap(ptr, unsigned long size)#

Unmap memory allocation of a given address range.

Warning:

This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.

Note:

This API is implemented on Linux, under development on 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):

hip.hip.hipGraphicsMapResources(int count, stream)#

Maps a graphics resource for access.

Args:
count (int) – IN:
  • Number of resources to map.

stream (ihipStream_t/object) – IN:
  • Stream for synchronization.

Returns:

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

hip.hip.hipGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int 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):

hip.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):

hip.hip.hipGraphicsUnmapResources(int count, stream)#

Unmaps graphics resources.

Args:
count (int) – IN:
  • Number of resources to unmap.

stream (ihipStream_t/object) – IN:
  • Stream for synchronization.

Returns:

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

hip.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):

hip.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):

hip.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):

hip.hip.hipMemcpy_spt(dst, src, unsigned long 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)

hip.hip.hipMemcpyToSymbol_spt(symbol, src, unsigned long sizeBytes, unsigned long 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)

hip.hip.hipMemcpyFromSymbol_spt(dst, symbol, unsigned long sizeBytes, unsigned long 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)

hip.hip.hipMemcpy2D_spt(dst, unsigned long dpitch, src, unsigned long spitch, unsigned long width, unsigned long 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)

hip.hip.hipMemcpy2DFromArray_spt(dst, unsigned long dpitch, src, unsigned long wOffset, unsigned long hOffset, unsigned long width, unsigned long 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)

hip.hip.hipMemcpy3D_spt(p)#

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

Args:
p (hipMemcpy3DParms/object):

(undocumented)

hip.hip.hipMemset_spt(dst, int value, unsigned long sizeBytes)#

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

Args:
dst (Pointer/object):

(undocumented)

value (int):

(undocumented)

sizeBytes (int):

(undocumented)

hip.hip.hipMemsetAsync_spt(dst, int value, unsigned long 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)

hip.hip.hipMemset2D_spt(dst, unsigned long pitch, int value, unsigned long width, unsigned long 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)

hip.hip.hipMemset2DAsync_spt(dst, unsigned long pitch, int value, unsigned long width, unsigned long 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)

hip.hip.hipMemset3DAsync_spt(pitchedDevPtr, int 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)

hip.hip.hipMemset3D_spt(pitchedDevPtr, int value, extent)#

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

Args:
pitchedDevPtr (hipPitchedPtr):

(undocumented)

value (int):

(undocumented)

extent (hipExtent):

(undocumented)

hip.hip.hipMemcpyAsync_spt(dst, src, unsigned long 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)

hip.hip.hipMemcpy3DAsync_spt(p, stream)#

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

Args:
p (hipMemcpy3DParms/object):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

hip.hip.hipMemcpy2DAsync_spt(dst, unsigned long dpitch, src, unsigned long spitch, unsigned long width, unsigned long 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)

hip.hip.hipMemcpyFromSymbolAsync_spt(dst, symbol, unsigned long sizeBytes, unsigned long 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)

hip.hip.hipMemcpyToSymbolAsync_spt(symbol, src, unsigned long sizeBytes, unsigned long 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)

hip.hip.hipMemcpyFromArray_spt(dst, src, unsigned long wOffsetSrc, unsigned long hOffset, unsigned long 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)

hip.hip.hipMemcpy2DToArray_spt(dst, unsigned long wOffset, unsigned long hOffset, src, unsigned long spitch, unsigned long width, unsigned long 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)

hip.hip.hipMemcpy2DFromArrayAsync_spt(dst, unsigned long dpitch, src, unsigned long wOffsetSrc, unsigned long hOffsetSrc, unsigned long width, unsigned long 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)

hip.hip.hipMemcpy2DToArrayAsync_spt(dst, unsigned long wOffset, unsigned long hOffset, src, unsigned long spitch, unsigned long width, unsigned long 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)

hip.hip.hipStreamQuery_spt(stream)#

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

Args:
stream (ihipStream_t/object):

(undocumented)

hip.hip.hipStreamSynchronize_spt(stream)#

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

Args:
stream (ihipStream_t/object):

(undocumented)

hip.hip.hipStreamGetPriority_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):

  • priority (int):

    (undocumented)

hip.hip.hipStreamWaitEvent_spt(stream, event, unsigned int flags)#

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

Args:
stream (ihipStream_t/object):

(undocumented)

event (ihipEvent_t/object):

(undocumented)

flags (int):

(undocumented)

hip.hip.hipStreamGetFlags_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):

  • flags (int):

    (undocumented)

hip.hip.hipStreamAddCallback_spt(stream, callback, userData, unsigned int 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)

hip.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)

hip.hip.hipLaunchCooperativeKernel_spt(f, gridDim, blockDim, kernelParams, unsigned int sharedMemBytes, hStream)#

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

Args:
f (Pointer/object):

(undocumented)

gridDim (dim3):

(undocumented)

blockDim (dim3):

(undocumented)

kernelParams (Pointer/object):

(undocumented)

sharedMemBytes (int):

(undocumented)

hStream (ihipStream_t/object):

(undocumented)

hip.hip.hipLaunchKernel_spt(function_address, numBlocks, dimBlocks, args, unsigned long sharedMemBytes, stream)#

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

Args:
function_address (Pointer/object):

(undocumented)

numBlocks (dim3):

(undocumented)

dimBlocks (dim3):

(undocumented)

args (Pointer/object):

(undocumented)

sharedMemBytes (int):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

hip.hip.hipGraphLaunch_spt(graphExec, stream)#

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

Args:
graphExec (hipGraphExec/object):

(undocumented)

stream (ihipStream_t/object):

(undocumented)

hip.hip.hipStreamBeginCapture_spt(stream, mode)#

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

Args:
stream (ihipStream_t/object):

(undocumented)

mode (hipStreamCaptureMode):

(undocumented)

hip.hip.hipStreamEndCapture_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):

hip.hip.hipStreamIsCapturing_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):

hip.hip.hipStreamGetCaptureInfo_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):

hip.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 4 that contains (in that order):

hip.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)

class hip.hip.hipDataType(value)#

Bases: _hipDataType__Base

Attributes:
HIP_R_32F:

(undocumented)

HIP_R_64F:

(undocumented)

HIP_R_16F:

(undocumented)

HIP_R_8I:

(undocumented)

HIP_C_32F:

(undocumented)

HIP_C_64F:

(undocumented)

HIP_C_16F:

(undocumented)

HIP_C_8I:

(undocumented)

HIP_R_8U:

(undocumented)

HIP_C_8U:

(undocumented)

HIP_R_32I:

(undocumented)

HIP_C_32I:

(undocumented)

HIP_R_32U:

(undocumented)

HIP_C_32U:

(undocumented)

HIP_R_16BF:

(undocumented)

HIP_C_16BF:

(undocumented)

HIP_R_4I:

(undocumented)

HIP_C_4I:

(undocumented)

HIP_R_4U:

(undocumented)

HIP_C_4U:

(undocumented)

HIP_R_16I:

(undocumented)

HIP_C_16I:

(undocumented)

HIP_R_16U:

(undocumented)

HIP_C_16U:

(undocumented)

HIP_R_64I:

(undocumented)

HIP_C_64I:

(undocumented)

HIP_R_64U:

(undocumented)

HIP_C_64U:

(undocumented)

HIP_R_8F_E4M3_FNUZ:

(undocumented)

HIP_R_8F_E5M2_FNUZ:

(undocumented)

HIP_R_32F = 0#
HIP_R_64F = 1#
HIP_R_16F = 2#
HIP_R_8I = 3#
HIP_C_32F = 4#
HIP_C_64F = 5#
HIP_C_16F = 6#
HIP_C_8I = 7#
HIP_R_8U = 8#
HIP_C_8U = 9#
HIP_R_32I = 10#
HIP_C_32I = 11#
HIP_R_32U = 12#
HIP_C_32U = 13#
HIP_R_16BF = 14#
HIP_C_16BF = 15#
HIP_R_4I = 16#
HIP_C_4I = 17#
HIP_R_4U = 18#
HIP_C_4U = 19#
HIP_R_16I = 20#
HIP_C_16I = 21#
HIP_R_16U = 22#
HIP_C_16U = 23#
HIP_R_64I = 24#
HIP_C_64I = 25#
HIP_R_64U = 26#
HIP_C_64U = 27#
HIP_R_8F_E4M3_FNUZ = 1000#
HIP_R_8F_E5M2_FNUZ = 1001#
static ctypes_type()#

The type of the enum constants as ctypes type.

class hip.hip.hipLibraryPropertyType(value)#

Bases: _hipLibraryPropertyType__Base

Attributes:
HIP_LIBRARY_MAJOR_VERSION:

(undocumented)

HIP_LIBRARY_MINOR_VERSION:

(undocumented)

HIP_LIBRARY_PATCH_LEVEL:

(undocumented)

HIP_LIBRARY_MAJOR_VERSION = 0#
HIP_LIBRARY_MINOR_VERSION = 1#
HIP_LIBRARY_PATCH_LEVEL = 2#
static ctypes_type()#

The type of the enum constants as ctypes type.