diff --git a/Samples/cudaNvSci/cudaNvSci.cpp b/Samples/cudaNvSci/cudaNvSci.cpp index 7789e05f7..367a60e4e 100644 --- a/Samples/cudaNvSci/cudaNvSci.cpp +++ b/Samples/cudaNvSci/cudaNvSci.cpp @@ -113,7 +113,12 @@ class cudaNvSciSignal { "%d.%d\n\n", m_cudaDeviceId, _ConvertSMVer2ArchName(major, minor), major, minor); +#ifdef cuDeviceGetUuid_v2 + CUresult res = cuDeviceGetUuid_v2(&m_devUUID, m_cudaDeviceId); +#else CUresult res = cuDeviceGetUuid(&m_devUUID, m_cudaDeviceId); +#endif + if (res != CUDA_SUCCESS) { fprintf(stderr, "Driver API error = %04d \n", res); exit(EXIT_FAILURE); @@ -387,7 +392,11 @@ class cudaNvSciWait { checkCudaErrors(cudaSetDevice(m_cudaDeviceId)); checkCudaErrors( cudaStreamCreateWithFlags(&streamToRun, cudaStreamNonBlocking)); +#ifdef cuDeviceGetUuid_v2 + CUresult res = cuDeviceGetUuid_v2(&m_devUUID, m_cudaDeviceId); +#else CUresult res = cuDeviceGetUuid(&m_devUUID, m_cudaDeviceId); +#endif if (res != CUDA_SUCCESS) { fprintf(stderr, "Driver API error = %04d \n", res); exit(EXIT_FAILURE); diff --git a/Samples/cudaNvSci/imageKernels.cu b/Samples/cudaNvSci/imageKernels.cu index 4537dce86..0e8f8d313 100644 --- a/Samples/cudaNvSci/imageKernels.cu +++ b/Samples/cudaNvSci/imageKernels.cu @@ -93,7 +93,7 @@ void launchGrayScaleKernel(unsigned int *d_rgbaImage, d_rgbaImage, imageWidth, imageHeight); unsigned int *outputData; - checkCudaErrors(cudaMallocHost(&outputData, sizeof(unsigned int) * imageWidth * imageHeight)); + checkCudaErrors(cudaMallocHost((void**)&outputData, sizeof(unsigned int) * imageWidth * imageHeight)); checkCudaErrors(cudaMemcpyAsync( outputData, d_rgbaImage, sizeof(unsigned int) * imageWidth * imageHeight, cudaMemcpyDeviceToHost, stream));