28 #include <hcc_detail/host_defines.h>
30 #if defined (__HCC__) && (__hcc_workweek__ < 1602)
31 #error("This version of HIP requires a newer version of HCC.");
49 #define hipStreamDefault 0x00
51 #define hipStreamNonBlocking 0x01
55 #define hipEventDefault 0x0
56 #define hipEventBlockingSync 0x1
57 #define hipEventDisableTiming 0x2
58 #define hipEventInterprocess 0x4
92 dim3(uint32_t _x=1, uint32_t _y=1, uint32_t _z=1) :
x(_x),
y(_y),
z(_z) {};
697 hipError_t hipMemcpyToSymbol(
const char* symbolName,
const void *src,
size_t sizeBytes,
size_t offset,
hipMemcpyKind kind);
721 hipError_t hipMemset(
void* dst,
int value,
size_t sizeBytes );
730 hipError_t hipMemGetInfo (
size_t * free,
size_t * total) ;
766 hipError_t hipMemcpyPeer (
void* dst,
int dstDevice,
const void* src,
int srcDevice,
size_t sizeBytes );
hipError_t hipDeviceEnablePeerAccess(int peerDevice, unsigned int flags)
Definition: hip_hcc.cpp:1575
hipError_t hipDeviceCanAccessPeer(int *canAccessPeer, int device, int peerDevice)
Determine if a device can access a peer's memory.
Definition: hip_hcc.cpp:1551
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::acclerator_view associated with the specified stream.
Definition: hip_hcc.cpp:1647
hipError_t hipFreeHost(void *ptr)
Definition: hip_hcc.cpp:1529
hipError_t hipFuncSetCacheConfig(hipFuncCache config)
Set Cache configuration for a specific function.
Definition: hip_hcc.cpp:704
no preference for shared memory or L1 (default)
Definition: hip_runtime_api.h:65
uint32_t x
x
Definition: hip_runtime_api.h:88
Host-to-Device Copy.
Definition: hip_runtime_api.h:103
hipError_t hipDeviceGetSharedMemConfig(hipSharedMemConfig *pConfig)
Get Shared memory bank configuration.
Definition: hip_hcc.cpp:734
hipError_t hipSetDevice(int device)
Set default device to be used for subsequent hip API calls from this thread.
Definition: hip_hcc.cpp:747
Device-to-Host Copy.
Definition: hip_runtime_api.h:104
hipError_t hipEventSynchronize(hipEvent_t event)
: Wait for an event to complete.
Definition: hip_hcc.cpp:1074
hipError_t hipDeviceGetProperties(hipDeviceProp_t *prop, int device)
Returns device properties.
Definition: hip_hcc.cpp:801
hipFuncCache
Definition: hip_runtime_api.h:64
hipError_t hipEventQuery(hipEvent_t event)
Query event status.
Definition: hip_hcc.cpp:1169
hipError_t hipDeviceGetCacheConfig(hipFuncCache *cacheConfig)
Set Cache configuration for a specific function.
Definition: hip_hcc.cpp:690
hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream=NULL)
Record an event in the specified stream.
Definition: hip_hcc.cpp:1025
hipError_t hipGetDevice(int *device)
Return the default device id for the calling host thread.
Definition: hip_hcc.cpp:645
hipError_t hipEventDestroy(hipEvent_t event)
Destroy the specified event.
Definition: hip_hcc.cpp:1059
hipError_t hipStreamCreateWithFlags(hipStream_t *stream, unsigned int flags)
Create an asynchronous stream.
Definition: hip_hcc.cpp:891
hipError_t hipDeviceDisablePeerAccess(int peerDevice)
Definition: hip_hcc.cpp:1563
Definition: hip_runtime_api.h:87
uint32_t y
y
Definition: hip_runtime_api.h:89
prefer equal size L1 cache and shared memory
Definition: hip_runtime_api.h:68
hipError_t hipEventCreateWithFlags(hipEvent_t *event, unsigned flags)
Create an event with the specified flags.
Definition: hip_hcc.cpp:1002
hipError_t hipMallocHost(void **ptr, size_t size)
Definition: hip_hcc.cpp:1289
hipError_t hipEventElapsedTime(float *ms, hipEvent_t start, hipEvent_t stop)
Return the elapsed time between two events.
Definition: hip_hcc.cpp:1124
hipError_t hipMemcpyPeerAsync(void *dst, int dstDevice, const void *src, int srcDevice, size_t sizeBytes, hipStream_t stream=0)
Definition: hip_hcc.cpp:1596
hipError_t hipGetDeviceCount(int *count)
Return number of compute-capable devices.
Definition: hip_hcc.cpp:658
hipError_t hipStreamDestroy(hipStream_t stream)
Destroys the specified stream.
Definition: hip_hcc.cpp:955
hipError_t hipStreamSynchronize(hipStream_t stream)
Wait for all commands in stream to complete.
Definition: hip_hcc.cpp:932
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:77
hipError_t
Definition: hip_runtime_api.h:112
hipMemcpyKind
Definition: hip_runtime_api.h:101
prefer larger L1 cache and smaller shared memory
Definition: hip_runtime_api.h:67
hipError_t hipDriverGetVersion(int *driverVersion)
Returns the approximate HIP driver versin.
Definition: hip_hcc.cpp:1608
hipError_t hipDeviceSynchronize(void)
Blocks until the default device has completed all preceding requested tasks.
Definition: hip_hcc.cpp:764
Definition: hip_runtime_api.h:124
hipError_t hipDeviceSetCacheConfig(hipFuncCache cacheConfig)
Set L1/Shared cache partition.
Definition: hip_hcc.cpp:676
hipError_t hipMalloc(void **ptr, size_t size)
Definition: hip_hcc.cpp:1268
const char * hipGetErrorName(hipError_t hip_error)
Return name of the specified error code in text form.
Definition: hip_hcc.cpp:848
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:829
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:915
hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int *flags)
Return flags associated with this stream.
Definition: hip_hcc.cpp:979
#define hipStreamDefault
Flags that can be used with hipStreamCreateWithFlags.
Definition: hip_runtime_api.h:50
hipError_t hipFree(void *ptr)
Definition: hip_hcc.cpp:1513
uint32_t z
z
Definition: hip_runtime_api.h:90
hipError_t hipDeviceReset(void)
Destroy all resources and reset all state on the default device in the current process.
Definition: hip_hcc.cpp:779
Definition: hip_runtime_api.h:74
hipError_t hipMemcpyAsync(void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream=0)
Definition: hip_hcc.cpp:1388
The compiler selects a device-specific value for the banking.
Definition: hip_runtime_api.h:76
Device-to-Device Copy.
Definition: hip_runtime_api.h:105
Definition: hip_hcc.cpp:107
Runtime will automatically determine copy-kind based on virtual addresses.
Definition: hip_runtime_api.h:106
hipSharedMemConfig
Definition: hip_runtime_api.h:75
hipError_t hipMemcpy(void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind)
Definition: hip_hcc.cpp:1346
hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config)
Set Shared memory bank configuration.
Definition: hip_hcc.cpp:719
prefer larger shared memory and smaller L1 cache
Definition: hip_runtime_api.h:66
Host-to-Host Copy.
Definition: hip_runtime_api.h:102
hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator *acc)
Return hc::acclerator associated with the specified deviceId.
Definition: hip_hcc.cpp:1627
Shared mem is banked at 8-byte intervals and performs best when adjacent threads access data 4 bytes ...
Definition: hip_runtime_api.h:78
const char * hipGetErrorString(hipError_t hip_error)
Return handy text string message to explain the error which occurred.
Definition: hip_hcc.cpp:875