SWDEV-228443 - Enhancing hip unit tests for Memory Allocation APIs (#2616)

Adding new testcases for hipMalloc3D,hipMalloc3DArray,
hipArrayCreate,hipMallocPitch and hipMallocArray APIs

Change-Id: Ia2cc8865d605272995aaf703dd26954d11ded2ea

[ROCm/hip-tests commit: b49e8e9fdf]
Этот коммит содержится в:
ROCm CI Service Account
2022-05-17 15:01:15 +05:30
коммит произвёл GitHub
родитель 2f8dcd1765
Коммит dc7b730733
7 изменённых файлов: 975 добавлений и 1 удалений
+21 -1
Просмотреть файл
@@ -71,7 +71,27 @@ THE SOFTWARE.
printf("assertion %s at %s:%d \n", #condition, __FILE__, __LINE__); \
abort(); \
}
#if HT_NVIDIA
#define CTX_CREATE() \
hipCtx_t context;\
initHipCtx(&context);
#define CTX_DESTROY() HIPCHECK(hipCtxDestroy(context));
#define ARRAY_DESTROY(array) HIPCHECK(hipArrayDestroy(array));
#define HIP_TEX_REFERENCE hipTexRef
#define HIP_ARRAY hiparray
static void initHipCtx(hipCtx_t *pcontext) {
HIPCHECK(hipInit(0));
hipDevice_t device;
HIPCHECK(hipDeviceGet(&device, 0));
HIPCHECK(hipCtxCreate(pcontext, 0, device));
}
#else
#define CTX_CREATE()
#define CTX_DESTROY()
#define ARRAY_DESTROY(array) HIPCHECK(hipFreeArray(array));
#define HIP_TEX_REFERENCE textureReference*
#define HIP_ARRAY hipArray*
#endif
// Utility Functions