mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-08-23 23:40:31 +08:00
Merge branch 'shawnz_bugs_fix' into 'master'
Shawnz bugs fix See merge request cuda-samples/cuda-samples!111
This commit is contained in:
commit
494d598f86
@ -138,26 +138,26 @@ static const char *_cudaGetErrorEnum(cufftResult error) {
|
|||||||
case CUFFT_UNALIGNED_DATA:
|
case CUFFT_UNALIGNED_DATA:
|
||||||
return "CUFFT_UNALIGNED_DATA";
|
return "CUFFT_UNALIGNED_DATA";
|
||||||
|
|
||||||
case CUFFT_INCOMPLETE_PARAMETER_LIST:
|
|
||||||
return "CUFFT_INCOMPLETE_PARAMETER_LIST";
|
|
||||||
|
|
||||||
case CUFFT_INVALID_DEVICE:
|
case CUFFT_INVALID_DEVICE:
|
||||||
return "CUFFT_INVALID_DEVICE";
|
return "CUFFT_INVALID_DEVICE";
|
||||||
|
|
||||||
case CUFFT_PARSE_ERROR:
|
|
||||||
return "CUFFT_PARSE_ERROR";
|
|
||||||
|
|
||||||
case CUFFT_NO_WORKSPACE:
|
case CUFFT_NO_WORKSPACE:
|
||||||
return "CUFFT_NO_WORKSPACE";
|
return "CUFFT_NO_WORKSPACE";
|
||||||
|
|
||||||
case CUFFT_NOT_IMPLEMENTED:
|
case CUFFT_NOT_IMPLEMENTED:
|
||||||
return "CUFFT_NOT_IMPLEMENTED";
|
return "CUFFT_NOT_IMPLEMENTED";
|
||||||
|
|
||||||
case CUFFT_LICENSE_ERROR:
|
case CUFFT_MISSING_DEPENDENCY:
|
||||||
return "CUFFT_LICENSE_ERROR";
|
return "CUFFT_MISSING_DEPENDENCY";
|
||||||
|
|
||||||
case CUFFT_NOT_SUPPORTED:
|
case CUFFT_NVRTC_FAILURE:
|
||||||
return "CUFFT_NOT_SUPPORTED";
|
return "CUFFT_NVRTC_FAILURE";
|
||||||
|
|
||||||
|
case CUFFT_NVJITLINK_FAILURE:
|
||||||
|
return "CUFFT_NVJITLINK_FAILURE";
|
||||||
|
|
||||||
|
case CUFFT_NVSHMEM_FAILURE:
|
||||||
|
return "CUFFT_NVSHMEM_FAILURE";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "<unknown>";
|
return "<unknown>";
|
||||||
|
@ -45,10 +45,10 @@ add_custom_command(TARGET matrixMul_nvrtc POST_BUILD
|
|||||||
|
|
||||||
add_custom_command(TARGET matrixMul_nvrtc POST_BUILD
|
add_custom_command(TARGET matrixMul_nvrtc POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||||
${CUDAToolkit_BIN_DIR}/../include/nv ${CMAKE_CURRENT_BINARY_DIR}/nv
|
${CUDAToolkit_BIN_DIR}/../include/cccl/nv ${CMAKE_CURRENT_BINARY_DIR}/nv
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_command(TARGET matrixMul_nvrtc POST_BUILD
|
add_custom_command(TARGET matrixMul_nvrtc POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||||
${CUDAToolkit_BIN_DIR}/../include/cuda ${CMAKE_CURRENT_BINARY_DIR}/cuda
|
${CUDAToolkit_BIN_DIR}/../include/cccl/cuda ${CMAKE_CURRENT_BINARY_DIR}/cuda
|
||||||
)
|
)
|
||||||
|
@ -5,7 +5,7 @@ add_subdirectory(cuDLAHybridMode)
|
|||||||
add_subdirectory(cuDLALayerwiseStatsHybrid)
|
add_subdirectory(cuDLALayerwiseStatsHybrid)
|
||||||
add_subdirectory(cuDLALayerwiseStatsStandalone)
|
add_subdirectory(cuDLALayerwiseStatsStandalone)
|
||||||
add_subdirectory(cuDLAStandaloneMode)
|
add_subdirectory(cuDLAStandaloneMode)
|
||||||
#add_subdirectory(EGLSync_CUDAEvent_Interop)
|
add_subdirectory(EGLSync_CUDAEvent_Interop)
|
||||||
add_subdirectory(fluidsGLES)
|
add_subdirectory(fluidsGLES)
|
||||||
add_subdirectory(nbody_opengles)
|
add_subdirectory(nbody_opengles)
|
||||||
add_subdirectory(simpleGLES)
|
add_subdirectory(simpleGLES)
|
||||||
|
@ -17,7 +17,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Include directories and libraries
|
# Include directories and libraries
|
||||||
include_directories(../../../Common)
|
include_directories(../../../../Common)
|
||||||
|
|
||||||
find_package(EGL)
|
find_package(EGL)
|
||||||
find_package(X11)
|
find_package(X11)
|
||||||
|
@ -260,6 +260,7 @@ void checkSync(int argc, char **argv)
|
|||||||
int integrated;
|
int integrated;
|
||||||
|
|
||||||
CUresult status = CUDA_SUCCESS;
|
CUresult status = CUDA_SUCCESS;
|
||||||
|
CUctxCreateParams ctxCreateParams = {};
|
||||||
|
|
||||||
// Init values for variables
|
// Init values for variables
|
||||||
x = y = 0;
|
x = y = 0;
|
||||||
@ -269,7 +270,7 @@ void checkSync(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
device = findCudaDeviceDRV(argc, (const char **)argv);
|
device = findCudaDeviceDRV(argc, (const char **)argv);
|
||||||
|
|
||||||
if (CUDA_SUCCESS != (status = cuCtxCreate(&context, 0, device))) {
|
if (CUDA_SUCCESS != (status = cuCtxCreate(&context, &ctxCreateParams, 0, device))) {
|
||||||
printf("failed to create CUDA context\n");
|
printf("failed to create CUDA context\n");
|
||||||
}
|
}
|
||||||
cuCtxPushCurrent(context);
|
cuCtxPushCurrent(context);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user