SWDEV-408180 - Add a new hipMemcpyKind

Header changes to support new hipMemcpyDeviceToDeviceNoCU

Change-Id: I7c15d6e73eeb467d46c582a80c015c5d545df0dc


[ROCm/hip commit: 5b88d8787d]
Bu işleme şunda yer alıyor:
Saleel Kudchadker
2023-10-12 04:35:09 +00:00
ebeveyn 329487b6dc
işleme 4bd7079059
2 değiştirilmiş dosya ile 20 ekleme ve 19 silme
+7 -6
Dosyayı Görüntüle
@@ -331,12 +331,13 @@ typedef struct HIP_RESOURCE_VIEW_DESC_st
*/ */
#if !defined(__HIPCC_RTC__) #if !defined(__HIPCC_RTC__)
typedef enum hipMemcpyKind { typedef enum hipMemcpyKind {
hipMemcpyHostToHost = 0, ///< Host-to-Host Copy hipMemcpyHostToHost = 0, ///< Host-to-Host Copy
hipMemcpyHostToDevice = 1, ///< Host-to-Device Copy hipMemcpyHostToDevice = 1, ///< Host-to-Device Copy
hipMemcpyDeviceToHost = 2, ///< Device-to-Host Copy hipMemcpyDeviceToHost = 2, ///< Device-to-Host Copy
hipMemcpyDeviceToDevice = 3, ///< Device-to-Device Copy hipMemcpyDeviceToDevice = 3, ///< Device-to-Device Copy
hipMemcpyDefault = hipMemcpyDefault = 4, ///< Runtime will automatically determine
4 ///< Runtime will automatically determine copy-kind based on virtual addresses. ///<copy-kind based on virtual addresses.
hipMemcpyDeviceToDeviceNoCU = 1024 ///< Device-to-Device Copy without using compute units
} hipMemcpyKind; } hipMemcpyKind;
typedef struct hipPitchedPtr { typedef struct hipPitchedPtr {
void* ptr; void* ptr;
+13 -13
Dosyayı Görüntüle
@@ -1829,7 +1829,7 @@ hipError_t hipDeviceGetCacheConfig(hipFuncCache_t* cacheConfig);
hipError_t hipDeviceGetLimit(size_t* pValue, enum hipLimit_t limit); hipError_t hipDeviceGetLimit(size_t* pValue, enum hipLimit_t limit);
/** /**
* @brief Sets resource limits of current device. * @brief Sets resource limits of current device.
* *
* As the input enum limit, * As the input enum limit,
* #hipLimitStackSize sets the limit value of the stack size on the current GPU device, per thread. * #hipLimitStackSize sets the limit value of the stack size on the current GPU device, per thread.
* The limit size can get via hipDeviceSetLimit. * The limit size can get via hipDeviceSetLimit.
@@ -1861,7 +1861,7 @@ hipError_t hipDeviceGetSharedMemConfig(hipSharedMemConfig* pConfig);
/** /**
* @brief Gets the flags set for current device * @brief Gets the flags set for current device
* *
* @param [out] flags Pointer of the flags * @param [out] flags Pointer of the flags
* *
* @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue * @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue
*/ */
@@ -1881,7 +1881,7 @@ hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config);
/** /**
* @brief The current device behavior is changed according the flags passed. * @brief The current device behavior is changed according the flags passed.
* *
* @param [in] flags Flag to set on the current device * @param [in] flags Flag to set on the current device
* *
* The schedule flags impact how HIP waits for the completion of a command running on a device. * 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 * hipDeviceScheduleSpin : HIP runtime will actively spin in the thread which submitted the
@@ -2748,7 +2748,7 @@ hipError_t hipPointerSetAttribute(const void* value, hipPointer_attribute attrib
* must be returned or passed through an HIP API such as hipHostMalloc, hipMallocManaged, * 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 * 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 * returned hipErrorInvalidValue, due to the hipMemoryType enums values, unrecognized memory type
* is currently not supported due to HIP functionality backward compatibility. * is currently not supported due to HIP functionality backward compatibility.
* *
* @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue * @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue
* *
@@ -2796,7 +2796,7 @@ hipError_t hipDrvPointerGetAttributes(unsigned int numAttributes, hipPointer_att
* @{ * @{
* @ingroup API * @ingroup API
* *
* This section describes the external resource interoperability functions of HIP runtime API. * This section describes the external resource interoperability functions of HIP runtime API.
* *
*/ */
/** /**
@@ -3740,7 +3740,7 @@ hipError_t hipHostFree(void* ptr);
* @param[out] dst Data being copy to * @param[out] dst Data being copy to
* @param[in] src Data being copy from * @param[in] src Data being copy from
* @param[in] sizeBytes Data size in bytes * @param[in] sizeBytes Data size in bytes
* @param[in] copyType Memory copy type * @param[in] kind Kind of transfer
* @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree, #hipErrorUnknown * @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree, #hipErrorUnknown
* *
* @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost, * @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,
@@ -3758,7 +3758,7 @@ hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind
* @param[out] dst Data being copy to * @param[out] dst Data being copy to
* @param[in] src Data being copy from * @param[in] src Data being copy from
* @param[in] sizeBytes Data size in bytes * @param[in] sizeBytes Data size in bytes
* @param[in] copyType Memory copy type * @param[in] kind Kind of transfer
* @param[in] stream Valid stream * @param[in] stream Valid stream
* @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree, #hipErrorUnknown, #hipErrorContextIsDestroyed * @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree, #hipErrorUnknown, #hipErrorContextIsDestroyed
* *
@@ -4781,7 +4781,7 @@ hipError_t hipCtxGetCurrent(hipCtx_t* ctx);
/** /**
* @brief Get the handle of the device associated with current/default context * @brief Get the handle of the device associated with current/default context
* *
* @param [out] device The device from the current context * @param [out] device The device from the current context
* *
* @returns #hipSuccess, #hipErrorInvalidContext * @returns #hipSuccess, #hipErrorInvalidContext
* *
@@ -4919,7 +4919,7 @@ hipError_t hipCtxGetFlags(unsigned int* flags);
* accessible from the current device until a call to hipDeviceDisablePeerAccess or hipDeviceReset. * accessible from the current device until a call to hipDeviceDisablePeerAccess or hipDeviceReset.
* *
* *
* @param [in] peerCtx Peer context * @param [in] peerCtx Peer context
* @param [in] flags flags, need to set as 0 * @param [in] flags flags, need to set as 0
* *
* @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue, * @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue,
@@ -5034,7 +5034,7 @@ hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, unsigned int flags);
* *
*/ */
/** /**
* @brief Loads code object from file into a module the currrent context. * @brief Loads code object from file into a module the currrent context.
* *
* @param [in] fname Filename of code object to load * @param [in] fname Filename of code object to load
@@ -5060,9 +5060,9 @@ hipError_t hipModuleUnload(hipModule_t module);
/** /**
* @brief Function with kname will be extracted if present in module * @brief Function with kname will be extracted if present in module
* *
* @param [in] module Module to get function from * @param [in] module Module to get function from
* @param [in] kname Pointer to the name of function * @param [in] kname Pointer to the name of function
* @param [out] function Pointer to function handle * @param [out] function Pointer to function handle
* *
* @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorNotInitialized, * @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorNotInitialized,
* #hipErrorNotFound, * #hipErrorNotFound,
@@ -7994,7 +7994,7 @@ hipError_t hipGraphicsResourceGetMappedPointer(void** devPtr, size_t* size,
* @param [in] count - Number of resources to unmap. * @param [in] count - Number of resources to unmap.
* @param [in] resources - Pointer of resources to unmap. * @param [in] resources - Pointer of resources to unmap.
* @param [in] stream - Stream for synchronization. * @param [in] stream - Stream for synchronization.
* *
* @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorContextIsDestroyed * @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorContextIsDestroyed
* *
*/ */