Bug 5196362, 5184356, 5212196, 5214258 and 5214259: Update sameples for CUDA13.0 API changes

This commit is contained in:
shawnz
2025-04-10 18:27:18 +08:00
parent 278f4adbd2
commit 02fdb070ad
27 changed files with 181 additions and 116 deletions

View File

@@ -247,7 +247,9 @@ int main(int argc, char **argv)
exit(EXIT_WAIVED);
}
if (device_prop.computeMode == cudaComputeModeProhibited) {
int computeMode;
checkCudaErrors(cudaDeviceGetAttribute(&computeMode, cudaDevAttrComputeMode, dev_id));
if (computeMode == cudaComputeModeProhibited) {
// This sample requires being run with a default or process exclusive mode
fprintf(stderr,
"This sample requires a device in either default or process "