From 67d57f8ec84a55eb46f72797e302a9876df8a046 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Thu, 16 Jun 2016 09:37:10 -0500 Subject: [PATCH] Add include guards for HIP_PLATFORM_NVCC --- tests/src/launch_bounds/hip_launch_bounds.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/src/launch_bounds/hip_launch_bounds.cpp b/tests/src/launch_bounds/hip_launch_bounds.cpp index 78226e8b00..f70327ad96 100644 --- a/tests/src/launch_bounds/hip_launch_bounds.cpp +++ b/tests/src/launch_bounds/hip_launch_bounds.cpp @@ -88,6 +88,7 @@ int main(int argc, char *argv[]) hipLaunchKernel(myKern, dim3(blocks), dim3(p_blockSize), 0, 0, C_d, A_d, N, 0); +#ifdef __HIP_PLATFORM_NVCC__ cudaFuncAttributes attrib; cudaFuncGetAttributes (&attrib, myKern); printf ("binaryVersion = %d\n", attrib.binaryVersion); @@ -98,6 +99,7 @@ int main(int argc, char *argv[]) printf ("numRegs = %d\n", attrib.numRegs); printf ("ptxVersion = %d\n", attrib.ptxVersion); printf ("sharedSizeBytes = %zud\n", attrib.sharedSizeBytes); +#endif HIPCHECK ( hipDeviceSynchronize() );