HIP: Heterogenous-computing Interface for Portability
Classes | Macros | Typedefs | Enumerations | Variables
hip_runtime_api.h File Reference

Defines the API signatures for HIP runtime. This file can be compiled with a standard compiler. More...

#include <string.h>
#include <hip/hip_version.h>
#include <hip/hip_common.h>
#include "hip/amd_detail/hip_runtime_api.h"
Include dependency graph for hip_runtime_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hipDeviceArch_t
 
struct  hipDeviceProp_t
 
struct  hipPointerAttribute_t
 

Typedefs

typedef struct hipDeviceProp_t hipDeviceProp_t
 
typedef enum hipMemoryType hipMemoryType
 
typedef struct hipPointerAttribute_t hipPointerAttribute_t
 
typedef enum __HIP_NODISCARD hipError_t hipError_t
 
typedef enum hipDeviceAttribute_t hipDeviceAttribute_t
 

Enumerations

enum  { HIP_SUCCESS = 0, HIP_ERROR_INVALID_VALUE, HIP_ERROR_NOT_INITIALIZED, HIP_ERROR_LAUNCH_OUT_OF_RESOURCES }
 
enum  hipMemoryType { hipMemoryTypeHost, hipMemoryTypeDevice, hipMemoryTypeArray, hipMemoryTypeUnified }
 
enum  hipDeviceAttribute_t {
  hipDeviceAttributeMaxThreadsPerBlock, hipDeviceAttributeMaxBlockDimX, hipDeviceAttributeMaxBlockDimY, hipDeviceAttributeMaxBlockDimZ,
  hipDeviceAttributeMaxGridDimX, hipDeviceAttributeMaxGridDimY, hipDeviceAttributeMaxGridDimZ, hipDeviceAttributeMaxSharedMemoryPerBlock,
  hipDeviceAttributeTotalConstantMemory, hipDeviceAttributeWarpSize, hipDeviceAttributeMaxRegistersPerBlock, hipDeviceAttributeClockRate,
  hipDeviceAttributeMemoryClockRate, hipDeviceAttributeMemoryBusWidth, hipDeviceAttributeMultiprocessorCount, hipDeviceAttributeComputeMode,
  hipDeviceAttributeL2CacheSize, hipDeviceAttributeMaxThreadsPerMultiProcessor, hipDeviceAttributeComputeCapabilityMajor, hipDeviceAttributeComputeCapabilityMinor,
  hipDeviceAttributeConcurrentKernels, hipDeviceAttributePciBusId, hipDeviceAttributePciDeviceId, hipDeviceAttributeMaxSharedMemoryPerMultiprocessor,
  hipDeviceAttributeIsMultiGpuBoard, hipDeviceAttributeIntegrated, hipDeviceAttributeCooperativeLaunch, hipDeviceAttributeCooperativeMultiDeviceLaunch,
  hipDeviceAttributeMaxTexture1DWidth, hipDeviceAttributeMaxTexture2DWidth, hipDeviceAttributeMaxTexture2DHeight, hipDeviceAttributeMaxTexture3DWidth,
  hipDeviceAttributeMaxTexture3DHeight, hipDeviceAttributeMaxTexture3DDepth, hipDeviceAttributeHdpMemFlushCntl, hipDeviceAttributeHdpRegFlushCntl,
  hipDeviceAttributeMaxPitch, hipDeviceAttributeTextureAlignment, hipDeviceAttributeTexturePitchAlignment, hipDeviceAttributeKernelExecTimeout,
  hipDeviceAttributeCanMapHostMemory, hipDeviceAttributeEccEnabled, hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc, hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim,
  hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim, hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem, hipDeviceAttributeAsicRevision, hipDeviceAttributeManagedMemory,
  hipDeviceAttributeDirectManagedMemAccessFromHost, hipDeviceAttributeConcurrentManagedAccess, hipDeviceAttributePageableMemoryAccess, hipDeviceAttributePageableMemoryAccessUsesHostPageTables,
  hipDeviceAttributeCanUseStreamWaitValue
}
 
enum  hipComputeMode { hipComputeModeDefault = 0, hipComputeModeExclusive = 1, hipComputeModeProhibited = 2, hipComputeModeExclusiveProcess = 3 }
 

Variables

 hipSuccess = 0
 Successful completion.
 
 hipErrorInvalidValue = 1
 
 hipErrorOutOfMemory = 2
 
 hipErrorMemoryAllocation = 2
 Memory allocation error.
 
 hipErrorNotInitialized = 3
 
 hipErrorInitializationError = 3
 
 hipErrorDeinitialized = 4
 
 hipErrorProfilerDisabled = 5
 
 hipErrorProfilerNotInitialized = 6
 
 hipErrorProfilerAlreadyStarted = 7
 
 hipErrorProfilerAlreadyStopped = 8
 
 hipErrorInvalidConfiguration = 9
 
 hipErrorInvalidPitchValue = 12
 
 hipErrorInvalidSymbol = 13
 
 hipErrorInvalidDevicePointer = 17
 Invalid Device Pointer.
 
 hipErrorInvalidMemcpyDirection = 21
 Invalid memory copy direction.
 
 hipErrorInsufficientDriver = 35
 
 hipErrorMissingConfiguration = 52
 
 hipErrorPriorLaunchFailure = 53
 
 hipErrorInvalidDeviceFunction = 98
 
 hipErrorNoDevice = 100
 Call to hipGetDeviceCount returned 0 devices.
 
 hipErrorInvalidDevice = 101
 DeviceID must be in range 0...#compute-devices.
 
 hipErrorInvalidImage = 200
 
 hipErrorInvalidContext = 201
 Produced when input context is invalid.
 
 hipErrorContextAlreadyCurrent = 202
 
 hipErrorMapFailed = 205
 
 hipErrorMapBufferObjectFailed = 205
 Produced when the IPC memory attach failed from ROCr.
 
 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
 In CUDA DRV, it is CUDA_ERROR_INVALID_PTX.
 
 hipErrorInvalidGraphicsContext = 219
 
 hipErrorInvalidSource = 300
 
 hipErrorFileNotFound = 301
 
 hipErrorSharedObjectSymbolNotFound = 302
 
 hipErrorSharedObjectInitFailed = 303
 
 hipErrorOperatingSystem = 304
 
 hipErrorInvalidHandle = 400
 
 hipErrorInvalidResourceHandle = 400
 Resource handle (hipEvent_t or hipStream_t) invalid.
 
 hipErrorNotFound = 500
 
 hipErrorNotReady = 600
 
 hipErrorIllegalAddress = 700
 
 hipErrorLaunchOutOfResources = 701
 Out of resources error.
 
 hipErrorLaunchTimeOut = 702
 
 hipErrorPeerAccessAlreadyEnabled
 Peer access was already enabled from the current device. More...
 
 hipErrorPeerAccessNotEnabled
 Peer access was never enabled from the current device. More...
 
 hipErrorSetOnActiveProcess = 708
 
 hipErrorContextIsDestroyed = 709
 
 hipErrorAssert = 710
 Produced when the kernel calls assert.
 
 hipErrorHostMemoryAlreadyRegistered
 Produced when trying to lock a page-locked memory. More...
 
 hipErrorHostMemoryNotRegistered
 Produced when trying to unlock a non-page-locked memory. More...
 
 hipErrorLaunchFailure
 An exception occurred on the device while executing a kernel. More...
 
 hipErrorCooperativeLaunchTooLarge
 
 hipErrorNotSupported = 801
 Produced when the hip API is not supported/implemented.
 
 hipErrorStreamCaptureUnsupported = 900
 
 hipErrorStreamCaptureInvalidated = 901
 
 hipErrorStreamCaptureMerge = 902
 
 hipErrorStreamCaptureUnmatched = 903
 The capture was not initiated in this stream.
 
 hipErrorStreamCaptureUnjoined = 904
 
 hipErrorStreamCaptureIsolation = 905
 
 hipErrorStreamCaptureImplicit = 906
 
 hipErrorCapturedEvent = 907
 
 hipErrorStreamCaptureWrongThread = 908
 
 hipErrorUnknown = 999
 
 hipErrorRuntimeMemory = 1052
 
 hipErrorRuntimeOther = 1053
 

Detailed Description

Defines the API signatures for HIP runtime. This file can be compiled with a standard compiler.

Typedef Documentation

◆ hipDeviceProp_t

hipDeviceProp

◆ hipMemoryType

Memory type (for pointer attributes)

◆ hipPointerAttribute_t

Pointer attributes

Enumeration Type Documentation

◆ hipMemoryType

Memory type (for pointer attributes)

Enumerator
hipMemoryTypeHost 

Memory is physically located on host.

hipMemoryTypeDevice 

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

hipMemoryTypeArray 

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

hipMemoryTypeUnified 

Not used currently.

Variable Documentation

◆ hipErrorCapturedEvent

hipErrorCapturedEvent = 907

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

◆ hipErrorCooperativeLaunchTooLarge

hipErrorCooperativeLaunchTooLarge
Initial value:
=
720

This error indicates that the number of blocks launched per grid for a kernel that was launched via cooperative launch APIs exceeds the maximum number of allowed blocks for the current device

◆ hipErrorHostMemoryAlreadyRegistered

hipErrorHostMemoryAlreadyRegistered
Initial value:
=
712

Produced when trying to lock a page-locked memory.

◆ hipErrorHostMemoryNotRegistered

hipErrorHostMemoryNotRegistered
Initial value:
=
713

Produced when trying to unlock a non-page-locked memory.

◆ hipErrorInvalidValue

hipErrorInvalidValue = 1

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

◆ hipErrorLaunchFailure

hipErrorLaunchFailure
Initial value:
=
719

An exception occurred on the device while executing a kernel.

◆ hipErrorNotReady

hipErrorNotReady = 600

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.

◆ hipErrorPeerAccessAlreadyEnabled

hipErrorPeerAccessAlreadyEnabled
Initial value:
=
704

Peer access was already enabled from the current device.

◆ hipErrorPeerAccessNotEnabled

hipErrorPeerAccessNotEnabled
Initial value:
=
705

Peer access was never enabled from the current device.

◆ hipErrorRuntimeMemory

hipErrorRuntimeMemory = 1052

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

◆ hipErrorRuntimeOther

hipErrorRuntimeOther = 1053

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

◆ hipErrorStreamCaptureImplicit

hipErrorStreamCaptureImplicit = 906

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

◆ hipErrorStreamCaptureInvalidated

hipErrorStreamCaptureInvalidated = 901

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

◆ hipErrorStreamCaptureIsolation

hipErrorStreamCaptureIsolation = 905

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

◆ hipErrorStreamCaptureMerge

hipErrorStreamCaptureMerge = 902

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

◆ hipErrorStreamCaptureUnjoined

hipErrorStreamCaptureUnjoined = 904

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

◆ hipErrorStreamCaptureUnsupported

hipErrorStreamCaptureUnsupported = 900

The operation is not permitted when the stream is capturing.

◆ hipErrorStreamCaptureWrongThread

hipErrorStreamCaptureWrongThread = 908

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