34 #if defined (__HCC__) && (__hcc_workweek__ < 1602)
35 #error("This version of HIP requires a newer version of HCC.");
47 #define hipStreamDefault 0x00
49 #define hipStreamNonBlocking 0x01
53 #define hipEventDefault 0x0
54 #define hipEventBlockingSync 0x1
55 #define hipEventDisableTiming 0x2
56 #define hipEventInterprocess 0x4
90 dim3(uint32_t _x=1, uint32_t _y=1, uint32_t _z=1) :
x(_x),
y(_y),
z(_z) {};
764 hipError_t hipMemGetInfo (
size_t * free,
size_t * total) ;
hipError_t hipDeviceEnablePeerAccess(int peerDevice, unsigned int flags)
Enables registering memory on peerDevice for direct access from the current device.
Definition: hip_hcc.cpp:1658
hipError_t hipDeviceCanAccessPeer(int *canAccessPeer, int device, int peerDevice)
Determine if a device can access a peer's memory.
Definition: hip_hcc.cpp:1634
hipError_t hipPeekAtLastError(void)
Return last error returned by any HIP runtime API call.
hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view **av)
Return hc::accelerator_view associated with the specified stream.
Definition: hip_hcc.cpp:1730
hipError_t hipMemsetAsync(void *dst, int value, size_t sizeBytes, hipStream_t=0)
Fills the first sizeBytes bytes of the memory area pointed to by dev with the constant byte value val...
Definition: hip_hcc.cpp:1513
hipError_t hipFreeHost(void *ptr)
Free memory allocated by the hcc hip host memory allocation API.
Definition: hip_hcc.cpp:1612
hipError_t hipMemcpyToSymbol(const char *symbolName, const void *src, size_t sizeBytes, size_t offset, hipMemcpyKind kind)
Copies sizeBytes bytes from the memory area pointed to by src to the memory area pointed to by offset...
Definition: hip_hcc.cpp:1410
hipError_t hipFuncSetCacheConfig(hipFuncCache config)
Set Cache configuration for a specific function.
Definition: hip_hcc.cpp:721
no preference for shared memory or L1 (default)
Definition: hip_runtime_api.h:63
uint32_t x
x
Definition: hip_runtime_api.h:86
Host-to-Device Copy.
Definition: hip_runtime_api.h:101
hipError_t hipDeviceGetSharedMemConfig(hipSharedMemConfig *pConfig)
Get Shared memory bank configuration.
Definition: hip_hcc.cpp:751
hipError_t hipSetDevice(int device)
Set default device to be used for subsequent hip API calls from this thread.
Definition: hip_hcc.cpp:764
Device-to-Host Copy.
Definition: hip_runtime_api.h:102
hipError_t hipEventSynchronize(hipEvent_t event)
: Wait for an event to complete.
Definition: hip_hcc.cpp:1157
hipError_t hipDeviceGetProperties(hipDeviceProp_t *prop, int device)
Returns device properties.
Definition: hip_hcc.cpp:884
hipFuncCache
Definition: hip_runtime_api.h:62
hipError_t hipEventQuery(hipEvent_t event)
Query event status.
Definition: hip_hcc.cpp:1252
hipError_t hipDeviceGetCacheConfig(hipFuncCache *cacheConfig)
Set Cache configuration for a specific function.
Definition: hip_hcc.cpp:707
hipError_t hipMemcpyPeer(void *dst, int dstDevice, const void *src, int srcDevice, size_t sizeBytes)
Copies memory from one device to memory on another device.
Definition: hip_hcc.cpp:1667
hipError_t hipDeviceGetAttribute(int *pi, hipDeviceAttribute_t attr, int device)
Query device attribute.
Definition: hip_hcc.cpp:812
hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream=NULL)
Record an event in the specified stream.
Definition: hip_hcc.cpp:1108
hipError_t hipGetDevice(int *device)
Return the default device id for the calling host thread.
Definition: hip_hcc.cpp:662
hipDeviceAttribute_t
Definition: hip_runtime_api.h:134
hipError_t hipEventDestroy(hipEvent_t event)
Destroy the specified event.
Definition: hip_hcc.cpp:1142
hipError_t hipStreamCreateWithFlags(hipStream_t *stream, unsigned int flags)
Create an asynchronous stream.
Definition: hip_hcc.cpp:974
hipError_t hipDeviceDisablePeerAccess(int peerDevice)
Disables registering memory on peerDevice for direct access from the current device.
Definition: hip_hcc.cpp:1646
Definition: hip_runtime_api.h:85
uint32_t y
y
Definition: hip_runtime_api.h:87
prefer equal size L1 cache and shared memory
Definition: hip_runtime_api.h:66
hipError_t hipEventCreateWithFlags(hipEvent_t *event, unsigned flags)
Create an event with the specified flags.
Definition: hip_hcc.cpp:1085
hipError_t hipMallocHost(void **ptr, size_t size)
Allocate pinned host memory.
Definition: hip_hcc.cpp:1372
hipError_t hipEventElapsedTime(float *ms, hipEvent_t start, hipEvent_t stop)
Return the elapsed time between two events.
Definition: hip_hcc.cpp:1207
hipError_t hipMemcpyPeerAsync(void *dst, int dstDevice, const void *src, int srcDevice, size_t sizeBytes, hipStream_t stream=0)
Copies memory from one device to memory on another device.
Definition: hip_hcc.cpp:1679
hipError_t hipGetDeviceCount(int *count)
Return number of compute-capable devices.
Definition: hip_hcc.cpp:675
hipError_t hipMemset(void *dst, int value, size_t sizeBytes)
Copy data from src to dst asynchronously.
Definition: hip_hcc.cpp:1558
hipError_t hipStreamDestroy(hipStream_t stream)
Destroys the specified stream.
Definition: hip_hcc.cpp:1038
hipError_t hipStreamSynchronize(hipStream_t stream)
Wait for all commands in stream to complete.
Definition: hip_hcc.cpp:1015
Definition: hip_hcc.cpp:82
Shared mem is banked at 4-bytes intervals and performs best when adjacent threads access data 4 bytes...
Definition: hip_runtime_api.h:75
hipError_t
Definition: hip_runtime_api.h:114
hipMemcpyKind
Definition: hip_runtime_api.h:99
prefer larger L1 cache and smaller shared memory
Definition: hip_runtime_api.h:65
hipError_t hipDriverGetVersion(int *driverVersion)
Returns the approximate HIP driver version.
Definition: hip_hcc.cpp:1691
hipError_t hipDeviceSynchronize(void)
Blocks until the default device has completed all preceding requested tasks.
Definition: hip_hcc.cpp:781
Definition: hip_runtime_api.h:122
hipError_t hipDeviceSetCacheConfig(hipFuncCache cacheConfig)
Set L1/Shared cache partition.
Definition: hip_hcc.cpp:693
hipError_t hipMalloc(void **ptr, size_t size)
Allocate memory on the default accelerator.
Definition: hip_hcc.cpp:1351
const char * hipGetErrorName(hipError_t hip_error)
Return name of the specified error code in text form.
Definition: hip_hcc.cpp:931
hipError_t hipGetLastError(void)
Return last error returned by any HIP runtime API call and resets the stored error code to hipSuccess...
Definition: hip_hcc.cpp:912
hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int flags)
Make the specified compute stream wait for an event.
Definition: hip_hcc.cpp:998
hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int *flags)
Return flags associated with this stream.
Definition: hip_hcc.cpp:1062
#define hipStreamDefault
Flags that can be used with hipStreamCreateWithFlags.
Definition: hip_runtime_api.h:48
hipError_t hipFree(void *ptr)
Free memory allocated by the hcc hip memory allocation API. This API performs an implicit hipDeviceSy...
Definition: hip_hcc.cpp:1596
uint32_t z
z
Definition: hip_runtime_api.h:88
hipError_t hipDeviceReset(void)
Destroy all resources and reset all state on the default device in the current process.
Definition: hip_hcc.cpp:796
Definition: hip_runtime_api.h:74
hipError_t hipMemcpyAsync(void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream=0)
Copy data from src to dst asynchronously.
Definition: hip_hcc.cpp:1471
The compiler selects a device-specific value for the banking.
Definition: hip_runtime_api.h:74
Device-to-Device Copy.
Definition: hip_runtime_api.h:103
Definition: hip_hcc.cpp:107
Runtime will automatically determine copy-kind based on virtual addresses.
Definition: hip_runtime_api.h:104
hipSharedMemConfig
Definition: hip_runtime_api.h:73
hipError_t hipMemcpy(void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind)
Copy data from src to dst.
Definition: hip_hcc.cpp:1429
hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config)
Set Shared memory bank configuration.
Definition: hip_hcc.cpp:736
prefer larger shared memory and smaller L1 cache
Definition: hip_runtime_api.h:64
Host-to-Host Copy.
Definition: hip_runtime_api.h:100
hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator *acc)
Return hc::accelerator associated with the specified deviceId.
Definition: hip_hcc.cpp:1710
Shared mem is banked at 8-byte intervals and performs best when adjacent threads access data 4 bytes ...
Definition: hip_runtime_api.h:76
const char * hipGetErrorString(hipError_t hip_error)
Return handy text string message to explain the error which occurred.
Definition: hip_hcc.cpp:958