Directed tests: hipDynamicShared now compiles on NVCC
NVCC does not support template in extern __shared__. Compilation is fixed but test still does not run on NVCC. Change-Id: I427c9170812401460d60ef8e3246525eeda38514
This commit is contained in:
@@ -214,11 +214,11 @@ endif()
|
||||
if (${HIP_PLATFORM} STREQUAL "hcc")
|
||||
make_test(hipArray " ")
|
||||
make_test(hipFuncSetDevice " ")
|
||||
make_test(hipDynamicShared " ")
|
||||
endif()
|
||||
|
||||
make_hipify_test(specialFunc.cu )
|
||||
|
||||
make_test(hipDynamicShared " ")
|
||||
|
||||
# Add subdirs here:
|
||||
add_subdirectory(context)
|
||||
|
||||
@@ -27,7 +27,12 @@ template<typename T>
|
||||
__global__ void testExternSharedKernel(hipLaunchParm lp, const T* A_d, const T* B_d, T* C_d, size_t numElements, size_t groupElements) {
|
||||
|
||||
// declare dynamic shared memory
|
||||
#if defined(__HIP_PLATFORM_HCC__)
|
||||
HIP_DYNAMIC_SHARED(T, sdata)
|
||||
#else
|
||||
HIP_DYNAMIC_SHARED(__align__(sizeof(T)) unsigned char, my_sdata)
|
||||
T *sdata = reinterpret_cast<T *>(my_sdata);
|
||||
#endif
|
||||
|
||||
size_t gid = (hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x);
|
||||
size_t tid = hipThreadIdx_x;
|
||||
|
||||
Verwijs in nieuw issue
Block a user