diff --git a/hipamd/include/hip/amd_detail/hip_prof_str.h b/hipamd/include/hip/amd_detail/hip_prof_str.h index 069f0fac7e..8e527ca6bd 100644 --- a/hipamd/include/hip/amd_detail/hip_prof_str.h +++ b/hipamd/include/hip/amd_detail/hip_prof_str.h @@ -1578,7 +1578,7 @@ typedef struct hip_api_data_s { struct { int* value; int value__val; - hipFuncAttribute attrib; + hipFunction_attribute attrib; hipFunction_t hfunc; } hipFuncGetAttribute; struct { @@ -3713,10 +3713,10 @@ typedef struct hip_api_data_s { #define INIT_hipFreeMipmappedArray_CB_ARGS_DATA(cb_data) { \ cb_data.args.hipFreeMipmappedArray.mipmappedArray = (hipMipmappedArray_t)mipmappedArray; \ }; -// hipFuncGetAttribute[('int*', 'value'), ('hipFuncAttribute ', 'attrib'), ('hipFunction_t', 'hfunc')] +// hipFuncGetAttribute[('int*', 'value'), ('hipFunction_attribute', 'attrib'), ('hipFunction_t', 'hfunc')] #define INIT_hipFuncGetAttribute_CB_ARGS_DATA(cb_data) { \ cb_data.args.hipFuncGetAttribute.value = (int*)value; \ - cb_data.args.hipFuncGetAttribute.attrib = (hipFuncAttribute )attrib; \ + cb_data.args.hipFuncGetAttribute.attrib = (hipFunction_attribute)attrib; \ cb_data.args.hipFuncGetAttribute.hfunc = (hipFunction_t)hfunc; \ }; // hipFuncGetAttributes[('hipFuncAttributes*', 'attr'), ('const void*', 'func')] @@ -5851,7 +5851,7 @@ static inline void hipApiArgsInit(hip_api_id_t id, hip_api_data_t* data) { // hipFreeMipmappedArray[('hipMipmappedArray_t', 'mipmappedArray')] case HIP_API_ID_hipFreeMipmappedArray: break; -// hipFuncGetAttribute[('int*', 'value'), ('hipFuncAttribute ', 'attrib'), ('hipFunction_t', 'hfunc')] +// hipFuncGetAttribute[('int*', 'value'), ('hipFunction_attribute', 'attrib'), ('hipFunction_t', 'hfunc')] case HIP_API_ID_hipFuncGetAttribute: if (data->args.hipFuncGetAttribute.value) data->args.hipFuncGetAttribute.value__val = *(data->args.hipFuncGetAttribute.value); break; diff --git a/hipamd/include/hip/nvidia_detail/nvidia_hip_runtime_api.h b/hipamd/include/hip/nvidia_detail/nvidia_hip_runtime_api.h index c7508ba716..11c4d03862 100644 --- a/hipamd/include/hip/nvidia_detail/nvidia_hip_runtime_api.h +++ b/hipamd/include/hip/nvidia_detail/nvidia_hip_runtime_api.h @@ -444,7 +444,7 @@ typedef struct cudaArray* hipArray_const_t; typedef struct cudaFuncAttributes hipFuncAttributes; typedef struct cudaLaunchParams hipLaunchParams; typedef CUDA_LAUNCH_PARAMS hipFunctionLaunchParams; -#define hipFuncAttribute CUfunction_attribute +#define hipFunction_attribute CUfunction_attribute #define hipPointer_attribute CUpointer_attribute #define hip_Memcpy2D CUDA_MEMCPY2D #define HIP_MEMCPY3D CUDA_MEMCPY3D @@ -2764,7 +2764,7 @@ inline static hipError_t hipFuncGetAttributes(hipFuncAttributes* attr, const voi return hipCUDAErrorTohipError(cudaFuncGetAttributes(attr, func)); } -inline static hipError_t hipFuncGetAttribute (int* value, hipFuncAttribute attrib, hipFunction_t hfunc) { +inline static hipError_t hipFuncGetAttribute (int* value, hipFunction_attribute attrib, hipFunction_t hfunc) { return hipCUResultTohipError(cuFuncGetAttribute(value, attrib, hfunc)); } diff --git a/hipamd/src/hip_formatting.hpp b/hipamd/src/hip_formatting.hpp index 57b7205ffc..00a27476be 100644 --- a/hipamd/src/hip_formatting.hpp +++ b/hipamd/src/hip_formatting.hpp @@ -257,43 +257,43 @@ inline std::ostream& operator<<(std::ostream& os, const hipResourceViewFormat& s return os; } -inline std::ostream& operator<<(std::ostream& os, const hipFuncAttribute& s) { +inline std::ostream& operator<<(std::ostream& os, const hipFunction_attribute& s) { switch (s) { - case hipFuncAttributeMaxThreadsPerBlock: - os << "hipFuncAttributeMaxThreadsPerBlock"; + case HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: + os << "HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK"; break; - case hipFuncAttributeSharedSizeBytes: - os << "hipFuncAttributeSharedSizeBytes"; + case HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: + os << "HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES"; break; - case hipFuncAttributeConstSizeBytes: - os << "hipFuncAttributeConstSizeBytes"; + case HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: + os << "HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES"; break; - case hipFuncAttributeLocalSizeBytes: - os << "hipFuncAttributeLocalSizeBytes"; + case HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: + os << "HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES"; break; - case hipFuncAttributeNumRegs: - os << "hipFuncAttributeNumRegs"; + case HIP_FUNC_ATTRIBUTE_NUM_REGS: + os << "HIP_FUNC_ATTRIBUTE_NUM_REGS"; break; - case hipFuncAttributePTXVersion: - os << "hipFuncAttributePTXVersion"; + case HIP_FUNC_ATTRIBUTE_PTX_VERSION: + os << "HIP_FUNC_ATTRIBUTE_PTX_VERSION"; break; - case hipFuncAttributeBinaryVersion: - os << "hipFuncAttributeBinaryVersion"; + case HIP_FUNC_ATTRIBUTE_BINARY_VERSION: + os << "HIP_FUNC_ATTRIBUTE_BINARY_VERSION"; break; - case hipFuncAttributeCacheModeCA: - os << "hipFuncAttributeCacheModeCA"; + case HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA: + os << "HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA"; break; - case hipFuncAttributeMaxDynamicSharedMemorySize: - os << "hipFuncAttributeMaxDynamicSharedSizeBytes"; + case HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: + os << "HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES"; break; - case hipFuncAttributePreferredSharedMemoryCarveout: - os << "hipFuncAttributePreferredSharedMemoryCarveout"; + case HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: + os << "HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT"; break; - case hipFuncAttributeMax: - os << "hipFuncAttributeMax"; + case HIP_FUNC_ATTRIBUTE_MAX: + os << "HIP_FUNC_ATTRIBUTE_MAX"; break; default: - os << "hipFuncAttributeMax"; + os << "HIP_FUNC_ATTRIBUTE_MAX"; }; return os; } diff --git a/hipamd/src/hip_module.cpp b/hipamd/src/hip_module.cpp index 7d99cb5210..eea5efd41b 100644 --- a/hipamd/src/hip_module.cpp +++ b/hipamd/src/hip_module.cpp @@ -111,7 +111,7 @@ hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t h HIP_RETURN(hipSuccess); } -hipError_t hipFuncGetAttribute(int* value, hipFuncAttribute attrib, hipFunction_t hfunc) { +hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc) { HIP_INIT_API(hipFuncGetAttribute, value, attrib, hfunc); if ((value == nullptr)) { @@ -135,34 +135,34 @@ hipError_t hipFuncGetAttribute(int* value, hipFuncAttribute attrib, hipFunction } switch (attrib) { - case hipFuncAttributeSharedSizeBytes: + case HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: *value = static_cast(wrkGrpInfo->localMemSize_); break; - case hipFuncAttributeMaxThreadsPerBlock: + case HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: *value = static_cast(wrkGrpInfo->size_); break; - case hipFuncAttributeConstSizeBytes: + case HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: *value = 0; break; - case hipFuncAttributeLocalSizeBytes: + case HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: *value = static_cast(wrkGrpInfo->privateMemSize_); break; - case hipFuncAttributeNumRegs: + case HIP_FUNC_ATTRIBUTE_NUM_REGS: *value = static_cast(wrkGrpInfo->usedVGPRs_); break; - case hipFuncAttributePTXVersion: + case HIP_FUNC_ATTRIBUTE_PTX_VERSION: *value = 30; // Defaults to 3.0 as HCC break; - case hipFuncAttributeBinaryVersion: + case HIP_FUNC_ATTRIBUTE_BINARY_VERSION: *value = static_cast(kernel->signature().version()); break; - case hipFuncAttributeCacheModeCA: + case HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA: *value = 0; break; - case hipFuncAttributeMaxDynamicSharedMemorySize: + case HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: *value = static_cast(wrkGrpInfo->availableLDSSize_ - wrkGrpInfo->localMemSize_); break; - case hipFuncAttributePreferredSharedMemoryCarveout: + case HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: *value = 0; break; default: