The Tutorial and API Reference of VEDA
3.3.0
|
To use VERA API functions, include "vera.h" header. More...
Functions | |
const char * | veraGetErrorName (veraError_t error) |
Returns the string representation of an error code enum name. More... | |
const char * | veraGetErrorString (veraError_t error) |
Returns the description string for an error code. More... | |
veraError_t | veraDeviceGetAttribute (int *value, veraDeviceAttr attr, int device) |
Returns information about the VEDA device. More... | |
veraError_t | veraDeviceGetPower (float *temp, int device) |
Returns a VE device power corresponding to VEDA Device. More... | |
veraError_t | veraDeviceGetTemp (float *temp, const int coreIdx, int device) |
Retrieve the core temperature of the VEDA device in Celsius. More... | |
veraError_t | veraDeviceSynchronize (void) |
Block for a context's tasks to complete. More... | |
veraError_t | veraDriverGetVersion (const char **driverVersion) |
Return the latest AVEO version supported by VEDA. More... | |
veraError_t | veraFree (void *devPtr) |
Frees device memory. More... | |
veraError_t | veraFreeAsync (void *devPtr, veraStream_t stream=0) |
Frees device memory with stream ordered semantics. More... | |
veraError_t | veraFreeHost (void *ptr) |
Frees host memory. More... | |
veraError_t | veraGetDevice (int *device) |
Returns the device ID for the current context. More... | |
veraError_t | veraGetDeviceCount (int *count) |
Retrieve the number of initializaed VEDA device. More... | |
veraError_t | veraHostAlloc (void **pHost, size_t size, unsigned int flags) |
Allocates host memory. More... | |
veraError_t | veraLaunchHostFunc (veraStream_t stream, veraHostFn_t fn, void *userData) |
Enqueues a host function call in a stream. More... | |
veraError_t | veraLaunchHostFuncEx (veraStream_t stream, veraHostFn_t fn, void *userData, uint64_t *result) |
Enqueues a host function call in a stream. More... | |
veraError_t | veraMalloc (void **devPtr, size_t size) |
Allocates VEDA device memory. More... | |
veraError_t | veraMallocAsync (void **devPtr, size_t size, veraStream_t stream=0) |
Allocates memory with stream ordered semantics. More... | |
veraError_t | veraMallocHost (void **ptr, size_t size) |
Allocates host memory. More... | |
veraError_t | veraMallocPitch (void **devPtr, size_t *pitch, size_t width, size_t height) |
Allocates pitched device memory. More... | |
veraError_t | veraMemGetInfo (size_t *free, size_t *total) |
Gets free and total memory. More... | |
veraError_t | veraMemset (void *devPtr, int value, size_t count) |
Initializes device memory. More... | |
veraError_t | veraMemsetAsync (void *devPtr, int value, size_t count, veraStream_t stream=0) |
Initializes device memory. More... | |
veraError_t | veraModuleGetFunction (veraFunction_t *func, veraModule_t mod, const char *name) |
Return the VE address of the VEDA device function located in VEDA module. More... | |
veraError_t | veraModuleUnload (veraModule_t mod) |
To unload/remove the VE device code from the VE memory. More... | |
veraError_t | veraModuleLoad (veraModule_t *mod, const char *name) |
To load the VE device code into the VE memory. More... | |
veraError_t | veraRuntimeGetVersion (const char **runtimeVersion) |
Return the latest AVEO version supported by VEDA. More... | |
veraError_t | veraStreamCnt (int *cnt) |
Gets the VEDA SM count. More... | |
veraError_t | veraStreamQuery (veraStream_t stream) |
Determine status of a compute stream. More... | |
veraError_t | veraStreamSynchronize (veraStream_t stream) |
Wait until a stream's tasks are completed. More... | |
veraExtent | make_veraExtent (size_t w, size_t h, size_t d) |
Returns a veraExtent based on input parameters. More... | |
veraPitchedPtr | make_veraPitchedPtr (void *d, size_t p, size_t xsz, size_t ysz) |
Returns a veraPitchedPtr based on input parameters. More... | |
veraError_t | veraInit (void) |
Initialize the VEDA driver API library. More... | |
veraError_t | veraGetDeviceProperties (veraDeviceProp *prop, int device) |
Returns information about the VEDA device. More... | |
veraError_t | veraStreamAddCallback (veraStream_t stream, veraStreamCallback_t callback, void *userData, unsigned int flags) |
Add a callback to a compute stream. More... | |
veraError_t | veraMemcpy (void *dst, const void *src, size_t count, veraMemcpyKind kind) |
Copies Memory from source to destination as per kind value. More... | |
veraError_t | veraMemcpyAsync (void *dst, const void *src, size_t count, veraMemcpyKind kind, veraStream_t stream) |
Copies Memory asynchronously from source to destination as per kind value. More... | |
veraError_t | veraDeviceReset (void) |
This function is not yet implemented. More... | |
veraError_t | veraMalloc3D (veraPitchedPtr *pitchedDevPtr, veraExtent extent) |
This function is not yet implemented. More... | |
veraError_t | veraMemcpy2D (void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, veraMemcpyKind kind) |
This function is not yet implemented. More... | |
veraError_t | veraMemcpy2DAsync (void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, veraMemcpyKind kind, veraStream_t stream) |
This function is not yet implemented. More... | |
veraError_t | veraMemset2D (void *devPtr, size_t pitch, int value, size_t width, size_t height) |
This function is not yet implemented. More... | |
veraError_t | veraMemset2DAsync (void *devPtr, size_t pitch, int value, size_t width, size_t height, veraStream_t stream) |
This function is not yet implemented. More... | |
veraError_t | veraMemset3D (veraPitchedPtr pitchedDevPtr, int value, veraExtent extent) |
This function is not yet implemented. More... | |
veraError_t | veraMemset3DAsync (veraPitchedPtr pitchedDevPtr, int value, veraExtent extent, veraStream_t stream) |
This function is not yet implemented. More... | |
veraError_t | veraSetValidDevices (int *device_arr, int len) |
This function is not yet implemented. More... | |
veraError_t | veraPointerGetAttributes (veraPointerAttributes *attributes, const void *ptr) |
Returns attributes about a specified pointer. More... | |
veraError_t | veraSetDevice (int device) |
Set device to be used for device executions. More... | |
To use VERA API functions, include "vera.h" header.
|
inline |
Returns the string representation of an error code enum name.
error | Error code to convert to string |
Returns a string containing the name of an error code in the enum. If the error code is not recognized, "unrecognized error code" is returned.
|
inline |
Returns the description string for an error code.
error | Error code to convert to string |
Returns the description string for an error code. If the error code is not recognized, "unrecognized error code" is returned.
|
inline |
Returns information about the VEDA device.
value | Returned VEDA device attribute value. |
attr | VEDA Device attribute to query. |
device | VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Returns in *pi the integer value of the attribute attrib on device dev. The supported attributes are:
VEDA_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO: VEDA precision ratio.
VEDA_DEVICE_ATTRIBUTE_CLOCK_RATE: Clock chip clock frequency of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_CLOCK_BASE: Clock Base clock frequency of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT: Number of VE cores corresponding to VEDA device.
VEDA_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE: Clock memory clock frequency of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_L1D_CACHE_SIZE: Size of the L1 cache of the device of VEDA device.
VEDA_DEVICE_ATTRIBUTE_L1I_CACHE_SIZE: Size of L1 instruction cache of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_L2_CACHE_SIZE: Size of L2 data cache of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_LLC_CACHE_SIZE: Size of last level cache of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_MODEL: VE device model corresponding to VEDA device.
VEDA_DEVICE_ATTRIBUTE_ABI_VERSION: VE device ABI version corresponding to VEDA device.
VEDA_DEVICE_ATTRIBUTE_FIREWARE_VERSION: VE device firmware version corresponding to VEDA device.
|
inline |
Returns a VE device power corresponding to VEDA Device.
temp | pointer to hold the VE device power. |
device | VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Calculated VE device power includes both the PCIe edge power as well as the VE device AUX power with added 5W.
|
inline |
Retrieve the core temperature of the VEDA device in Celsius.
temp | pointer to hold the core temperature. |
coreIdx | Core index of the VEDA device. |
device | VEDA device ID. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
|
inline |
Block for a context's tasks to complete.
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Blocks until the device has completed all preceding requested tasks.
vedaCtxSynchronize() returns an error if one of the preceding tasks failed.
|
inline |
Return the latest AVEO version supported by VEDA.
driverVersion | Pointer to hold the AVEO version. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
|
inline |
Frees device memory.
devPtr | Pointer to memory to free. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Frees the memory space pointed to by dptr, which must have been returned by a previous call to vedaMemAlloc() or vedaMemAllocPitch().
|
inline |
Frees device memory with stream ordered semantics.
devPtr | Pointer to memory to free. |
stream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Inserts a free operation into stream. The allocation must not be accessed after stream execution reaches the free. After this API returns, accessing the memory from any subsequent work launched on the VEDA device or querying its pointer attributes results in undefined behavior.
|
inline |
Frees host memory.
ptr | Pointer to memory to free. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Frees the memory space pointed to by dptr, which must have been returned by a previous call to vedaMemAllocHost().
|
inline |
Returns the device ID for the current context.
device | Returned device ID for the current context. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Returns in *device the ordinal of the current context's device.
|
inline |
Retrieve the number of initializaed VEDA device.
count | pointer to hold the count of the VEDA device. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
|
inline |
Allocates host memory.
pHost | Returned host pointer |
size | Requested allocation size in bytes. |
flags |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | Host memory exausted. |
|
inline |
Enqueues a host function call in a stream.
stream | Stream Identifier. |
fn | The function to call once preceding stream operations are complete. |
userData | User-specified data to be passed to the function. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Enqueues a host function to run in a stream. The function will be called after currently enqueued work and will block work added after it.
|
inline |
Enqueues a host function call in a stream.
stream | Stream Identifier. |
fn | The function to call once preceding stream operations are complete. |
userData | User-specified data to be passed to the function. |
result | return-value future |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Enqueues a host function to run in a stream. The function will be called after currently enqueued work and will block work added after it.
|
inline |
Allocates VEDA device memory.
devPtr | Returned VEDA device pointer |
size | Requested allocation size in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | VEDA device memory exausted. |
Allocates size bytes of linear memory on the VEDA device and returns in *ptr a pointer to the allocated memory.
|
inline |
Allocates memory with stream ordered semantics.
devPtr | Returned VEDA device pointer |
size | Requested allocation size in bytes. |
stream | The stream establishing the stream ordering contract and the memory pool to allocate from |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | VEDA device memory exausted. |
Inserts an allocation operation into stream. A pointer to the allocated memory is returned immediately in *ptr. The allocation must not be accessed until the the allocation operation completes.
|
inline |
Allocates host memory.
ptr | Returned host pointer |
size | Requested allocation size in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | Host memory exausted. |
|
inline |
Allocates pitched device memory.
devPtr | Returned device pointer |
pitch | Returned pitch of allocation in bytes. |
width | Requested allocation width in bytes |
height | Requested allocation height in rows |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
VEDA_ERROR_OUT_OF_MEMORY | Host memory exausted. |
Allocates at least WidthInBytes * Height bytes of linear memory on the device and returns in *dptr a pointer to the allocated memory. The pitch returned in *pPitch by vedaMemAllocPitch() is the width in bytes of the allocation.
|
inline |
Gets free and total memory.
free | Returned free memory in bytes. |
total | Returned total memory in bytes. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Returns in *total the total amount of memory available to the the current context. Returns in *free the amount of memory on the VEDA device that is free.
|
inline |
Initializes device memory.
devPtr | Destination device pointer. |
value | Value to set. |
count | Number of Elements. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Sets the memory range of N 32-bit values to the specified value us.
|
inline |
Initializes device memory.
devPtr | Destination device pointer. |
value | Value to set. |
count | Number of Elements. |
stream | The stream establishing the stream ordering contract. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Sets the memory range of N 32-bit values to the specified value us.
|
inline |
Return the VE address of the VEDA device function located in VEDA module.
func | Buffer to hold the VE address of the VEDA device function. |
mod | handle to the VEDA module corresponding to the VE device code. |
name | Name of the VEDA device function for which the VE address is required. |
|
inline |
To unload/remove the VE device code from the VE memory.
mod | Pointer to the VEDA module corresponding to the VE device code.. |
|
inline |
To load the VE device code into the VE memory.
mod | Pointer to hold the reference of the VEDA module. |
name | Library name of the file name containing VE device code. |
|
inline |
Return the latest AVEO version supported by VEDA.
runtimeVersion | Pointer to hold the AVEO version. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
|
inline |
Gets the VEDA SM count.
cnt | pointer to hold the VEDA SM count. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Returns the VEDA SM count of the VEDA context bound to the calling CPU thread.
|
inline |
Determine status of a compute stream.
stream | Determine status of a compute stream. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Returns CUDA_SUCCESS if all operations in the stream specified by hStream have completed
|
inline |
Wait until a stream's tasks are completed.
stream | Determine status of a compute stream. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Waits until the device has completed all operations in the stream specified by hStream.
|
inline |
Returns a veraExtent based on input parameters.
w | Width in elements when referring to array memory, in bytes when referring to linear memory |
h | Height in elements |
d | Depth in elements |
Returns a veraExtent based on the specified input parameters w, h, and d.
|
inline |
Returns a veraPitchedPtr based on input parameters.
d | Pointer to allocated memory |
p | Pitch of allocated memory in bytes |
xsz | Logical width of allocation in elements |
ysz | Logical height of allocation in elements |
Returns a veraPitchedPtr based on the specified input parameters d, p, xsz, and ysz.
veraError_t veraInit | ( | void | ) |
Initialize the VEDA driver API library.
VEDA_SUCCESS | on Success |
Initializes the driver API and it is optional to call when you are using other VERA APIs because it is being called at the begining of other vera APIs, calling multiple times don't make any effect.
veraError_t veraGetDeviceProperties | ( | veraDeviceProp * | prop, |
int | device | ||
) |
Returns information about the VEDA device.
prop | Returned VEDA device attribute value. |
device | VEDA device handle. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
Returns in *pi the integer value of the attribute attrib on device dev. The supported attributes are: VEDA_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO: VEDA precision ratio.
VEDA_DEVICE_ATTRIBUTE_CLOCK_RATE: Clock chip clock frequency of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_CLOCK_BASE: Clock Base clock frequency of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT: Number of VE cores corresponding to VEDA device.
VEDA_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE: Clock memory clock frequency of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_L1D_CACHE_SIZE: Size of the L1 cache of the device of VEDA device.
VEDA_DEVICE_ATTRIBUTE_L1I_CACHE_SIZE: Size of L1 instruction cache of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_L2_CACHE_SIZE: Size of L2 data cache of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_LLC_CACHE_SIZE: Size of last level cache of the VEDA device.
VEDA_DEVICE_ATTRIBUTE_MODEL: VE device model corresponding to VEDA device.
VEDA_DEVICE_ATTRIBUTE_ABI_VERSION: VE device ABI version corresponding to VEDA device.
VEDA_DEVICE_ATTRIBUTE_FIREWARE_VERSION: VE device firmware version corresponding to VEDA device.
veraError_t veraStreamAddCallback | ( | veraStream_t | stream, |
veraStreamCallback_t | callback, | ||
void * | userData, | ||
unsigned int | flags | ||
) |
Add a callback to a compute stream.
stream | Determine status of a compute stream. |
callback | The function to call once preceding stream operations are complete. |
userData | User specified data to be passed to the callback function. |
flags | Reserved for future use, must be 0. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Adds a callback to be called on the host after all currently enqueued items in the stream have completed.
veraError_t veraMemcpy | ( | void * | dst, |
const void * | src, | ||
size_t | count, | ||
veraMemcpyKind | kind | ||
) |
Copies Memory from source to destination as per kind value.
dst | Destination virtual address pointer. |
src | Source virtual address pointer. |
count | Size of memory copy in bytes. |
kind | value can be veraMemcpyHostToHost, veraMemcpyHostToDevice, veraMemcpyDeviceToHost, veraMemcpyDeviceToDevice. |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from source memory to destination memory. dst and src are the base pointers of the destination and source, respectively. count specifies the number of bytes to copy.
veraError_t veraMemcpyAsync | ( | void * | dst, |
const void * | src, | ||
size_t | count, | ||
veraMemcpyKind | kind, | ||
veraStream_t | stream | ||
) |
Copies Memory asynchronously from source to destination as per kind value.
dst | Destination virtual address pointer. |
src | Source virtual address pointer. |
count | Size of memory copy in bytes. |
kind | value can be veraMemcpyHostToHost, veraMemcpyHostToDevice, veraMemcpyDeviceToHost, veraMemcpyDeviceToDevice. |
stream | Stream identifier |
VEDA_SUCCESS | on Success |
VEDA_ERROR_NOT_INITIALIZED | VEDA library not initialized |
VEDA_ERROR_INVALID_DEVICE | VEDA device id is not valid. |
VEDA_ERROR_UNKNOWN_CONTEXT | VEDA context is not set for the calling thread. |
VEDA_ERROR_CONTEXT_IS_DESTROYED | VEDA current context is already destroyed. |
Copies from source memory to destination memory. dst and src are the base pointers of the destination and source, respectively. count specifies the number of bytes to copy.
veraError_t veraDeviceReset | ( | void | ) |
This function is not yet implemented.
veraError_t veraMalloc3D | ( | veraPitchedPtr * | pitchedDevPtr, |
veraExtent | extent | ||
) |
This function is not yet implemented.
pitchedDevPtr | |
extent |
veraError_t veraMemcpy2D | ( | void * | dst, |
size_t | dpitch, | ||
const void * | src, | ||
size_t | spitch, | ||
size_t | width, | ||
size_t | height, | ||
veraMemcpyKind | kind | ||
) |
This function is not yet implemented.
dst | |
dpitch | |
src | |
spitch | |
width | |
height | |
kind |
veraError_t veraMemcpy2DAsync | ( | void * | dst, |
size_t | dpitch, | ||
const void * | src, | ||
size_t | spitch, | ||
size_t | width, | ||
size_t | height, | ||
veraMemcpyKind | kind, | ||
veraStream_t | stream | ||
) |
This function is not yet implemented.
dst | |
dpitch | |
src | |
spitch | |
width | |
height | |
kind | |
stream |
veraError_t veraMemset2D | ( | void * | devPtr, |
size_t | pitch, | ||
int | value, | ||
size_t | width, | ||
size_t | height | ||
) |
This function is not yet implemented.
devPtr | |
pitch | |
value | |
width | |
height |
veraError_t veraMemset2DAsync | ( | void * | devPtr, |
size_t | pitch, | ||
int | value, | ||
size_t | width, | ||
size_t | height, | ||
veraStream_t | stream | ||
) |
This function is not yet implemented.
devPtr | |
pitch | |
value | |
width | |
height | |
stream |
veraError_t veraMemset3D | ( | veraPitchedPtr | pitchedDevPtr, |
int | value, | ||
veraExtent | extent | ||
) |
This function is not yet implemented.
pitchedDevPtr | |
value | |
extent |
veraError_t veraMemset3DAsync | ( | veraPitchedPtr | pitchedDevPtr, |
int | value, | ||
veraExtent | extent, | ||
veraStream_t | stream | ||
) |
This function is not yet implemented.
pitchedDevPtr | |
value | |
extent | |
stream |
veraError_t veraSetValidDevices | ( | int * | device_arr, |
int | len | ||
) |
This function is not yet implemented.
device_arr | |
len |
veraError_t veraPointerGetAttributes | ( | veraPointerAttributes * | attributes, |
const void * | ptr | ||
) |
Returns attributes about a specified pointer.
attributes | Attributes for the specified pointer |
ptr | Pointer to get attributes for |
veraError_t veraSetDevice | ( | int | device | ) |
Set device to be used for device executions.
device | Device on which the active host thread should execute the device code. |
Sets device as the current device for the calling host thread.