From 150ad6db310d401e39c0c800f4502be87f83cb86 Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras Date: Tue, 3 Oct 2023 11:22:57 +0100 Subject: [PATCH] SWDEV-425129 - Revert "SWDEV-420822 - [ABI Break] Merge hipFunction_attribute into hipFuncAttribute" This reverts commit 87f2ae9a99ca382b43fbf553fed2d1fabe6c5226. Change-Id: Ie34ccda8bc98131f9aef8caed912cb93e9c35264 [ROCm/hip commit: e46aef853626780a042606fe06882a81eabc5436] --- projects/hip/include/hip/driver_types.h | 13 +++++++++++++ projects/hip/include/hip/hip_runtime_api.h | 14 +++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/projects/hip/include/hip/driver_types.h b/projects/hip/include/hip/driver_types.h index 85493f1ab9..1720fa3ab3 100644 --- a/projects/hip/include/hip/driver_types.h +++ b/projects/hip/include/hip/driver_types.h @@ -429,6 +429,19 @@ static inline struct hipExtent make_hipExtent(size_t w, size_t h, size_t d) { e.depth = d; return e; } +typedef enum hipFunction_attribute { + HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK, + HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES, + HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES, + HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES, + HIP_FUNC_ATTRIBUTE_NUM_REGS, + HIP_FUNC_ATTRIBUTE_PTX_VERSION, + HIP_FUNC_ATTRIBUTE_BINARY_VERSION, + HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA, + HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES, + HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT, + HIP_FUNC_ATTRIBUTE_MAX +} hipFunction_attribute; typedef enum hipPointer_attribute { HIP_POINTER_ATTRIBUTE_CONTEXT = 1, ///< The context on which a pointer was allocated diff --git a/projects/hip/include/hip/hip_runtime_api.h b/projects/hip/include/hip/hip_runtime_api.h index 29d7be7140..49c37ce58c 100644 --- a/projects/hip/include/hip/hip_runtime_api.h +++ b/projects/hip/include/hip/hip_runtime_api.h @@ -915,16 +915,8 @@ typedef enum hipJitOption { * @warning On AMD devices and some Nvidia devices, these hints and controls are ignored. */ typedef enum hipFuncAttribute { - hipFuncAttributeMaxThreadsPerBlock, - hipFuncAttributeSharedSizeBytes, - hipFuncAttributeConstSizeBytes, - hipFuncAttributeLocalSizeBytes, - hipFuncAttributeNumRegs, - hipFuncAttributePTXVersion, - hipFuncAttributeBinaryVersion, - hipFuncAttributeCacheModeCA, - hipFuncAttributeMaxDynamicSharedMemorySize, - hipFuncAttributePreferredSharedMemoryCarveout, + hipFuncAttributeMaxDynamicSharedMemorySize = 8, + hipFuncAttributePreferredSharedMemoryCarveout = 9, hipFuncAttributeMax } hipFuncAttribute; /** @@ -4999,7 +4991,7 @@ hipError_t hipFuncGetAttributes(struct hipFuncAttributes* attr, const void* func * * @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction */ -hipError_t hipFuncGetAttribute(int* value, hipFuncAttribute attrib, hipFunction_t hfunc); +hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc); /** * @brief returns the handle of the texture reference with the name from the module. *