Bug 5184356: Update the computeMode for remaining 3 samples

This commit is contained in:
shawnz
2025-04-11 10:40:35 +08:00
parent 02fdb070ad
commit 01a62e2bc0
3 changed files with 9 additions and 3 deletions

View File

@@ -247,7 +247,9 @@ static void parentProcess(char *app)
}
// This sample requires two processes accessing each device, so we need
// to ensure exclusive or prohibited mode is not set
if (prop.computeMode != cudaComputeModeDefault) {
int computeMode;
checkCudaErrors(cudaDeviceGetAttribute(&computeMode, cudaDevAttrComputeMode, i));
if (computeMode != cudaComputeModeDefault) {
printf("Device %d is in an unsupported compute mode for this sample\n", i);
continue;
}