From 475591057baa3c376c46052fb8b03e82ad5a3fdf Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 30 May 2018 11:24:48 +0530 Subject: [PATCH 1/2] Add signature for hipFuncGetAttributes to nvcc_details Change-Id: I06d5b50028fcfe3ea9d81f749b02be6b094c0977 [ROCm/hip commit: 7fd92d471bf786d1b68c7032b06cf623f54f99c8] --- projects/hip/include/hip/nvcc_detail/hip_runtime_api.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h b/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h index d54a8de99c..fbff263295 100644 --- a/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h +++ b/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h @@ -150,6 +150,7 @@ typedef CUfunction hipFunction_t; typedef CUdeviceptr hipDeviceptr_t; typedef struct cudaArray hipArray; typedef struct cudaArray* hipArray_const_t; +typedef cudaFuncAttributes hipFuncAttributes; #define hipMemcpy3DParms cudaMemcpy3DParms #define hipArrayDefault cudaArrayDefault @@ -1107,6 +1108,10 @@ inline static hipError_t hipModuleGetFunction(hipFunction_t* function, hipModule return hipCUResultTohipError(cuModuleGetFunction(function, module, kname)); } +inline static hipError_t hipFuncGetAttributes(hipFuncAttributes* attr, const void* func) { + return hipCUDAErrorTohipError(cudaFuncGetAttributes(attr, func)); +} + inline static hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t hmod, const char* name) { return hipCUResultTohipError(cuModuleGetGlobal(dptr, bytes, hmod, name)); From 9d97f114b74ccd793c6f7b9fa24f8193777e4e46 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Wed, 30 May 2018 11:26:11 +0530 Subject: [PATCH 2/2] [dtests] Fix nvcc path build errors in hipFuncGetAttributes.tst Change-Id: I000bed69162897f7b6edd733ed6e9acc93beb0ed [ROCm/hip commit: 8b93cd67a6208f45cac5293435877efd0bef49c4] --- .../hip/tests/src/runtimeApi/module/hipFuncGetAttributes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hip/tests/src/runtimeApi/module/hipFuncGetAttributes.cpp b/projects/hip/tests/src/runtimeApi/module/hipFuncGetAttributes.cpp index 7d3eff5f73..6af87edb25 100644 --- a/projects/hip/tests/src/runtimeApi/module/hipFuncGetAttributes.cpp +++ b/projects/hip/tests/src/runtimeApi/module/hipFuncGetAttributes.cpp @@ -18,7 +18,7 @@ THE SOFTWARE. */ /* HIT_START - * BUILD: %t %s ../../test_common.cpp + * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 * RUN: %t * HIT_END */