-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBarkerHW1_Query.cu
91 lines (82 loc) · 2.74 KB
/
BarkerHW1_Query.cu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
Mary Barker
Homework 1
to compile: nvcc BarkerHW1_Query.cu
OUTPUT (When run on GreyJoy):
--- General Information for device 0 ---
Name: GeForce GTX 580
Compute capability: 2.0
Clock rate: 1600000
Device copy overlap: Enabled
Kernel execution timeout : Enabled
--- Memory Information for device 0 ---
Total global mem: 1542324224
Total constant mem: 65536
Max mem pitch: 2147483647
Texture Alignment: 512
--- MP Information for device 0 ---
Multiprocessor count: 16
Shared mem per mp: 49152
Registers per mp: 32768
Threads in warp: 32
Max threads per block: 1024
Max thread dimensions: (1024, 1024, 64)
Max grid dimensions: (65535, 65535, 65535)
--- General Information for device 1 ---
Name: GeForce GTX 580
Compute capability: 2.0
Clock rate: 1600000
Device copy overlap: Enabled
Kernel execution timeout : Disabled
--- Memory Information for device 1 ---
Total global mem: 1545469952
Total constant mem: 65536
Max mem pitch: 2147483647
Texture Alignment: 512
--- MP Information for device 1 ---
Multiprocessor count: 16
Shared mem per mp: 49152
Registers per mp: 32768
Threads in warp: 32
Max threads per block: 1024
Max thread dimensions: (1024, 1024, 64)
Max grid dimensions: (65535, 65535, 65535)
*/
#include <stdio.h>
int main(void){
cudaDeviceProp prop;
int count;
cudaGetDeviceCount( &count );
for(int i = 0; i < count; i++)
{
cudaGetDeviceProperties( &prop, i );
printf(" --- General Information for device %d ---\n", i);
printf( "Name: %s\n", prop.name);
printf( "Compute capability: %d.%d\n", prop.major, prop.minor);
printf( "Clock rate: %d\n", prop.clockRate);
printf( "Device copy overlap: ");
if(prop.deviceOverlap)
printf("Enabled\n");
else
printf("Disabled\n");
printf("Kernel execution timeout : ");
if(prop.kernelExecTimeoutEnabled)
printf("Enabled\n");
else
printf("Disabled\n");
printf(" --- Memory Information for device %d ---\n", i);
printf("Total global mem: %ld\n", prop.totalGlobalMem);
printf("Total constant mem: %ld\n", prop.totalConstMem);
printf("Max mem pitch: %ld\n", prop.memPitch);
printf("Texture Alignment: %ld\n", prop.textureAlignment);
printf(" --- MP Information for device %d ---\n", i);
printf("Multiprocessor count: %d\n", prop.multiProcessorCount);
printf("Shared mem per mp: %ld\n", prop.sharedMemPerBlock);
printf("Registers per mp: %d\n", prop.regsPerBlock);
printf("Threads in warp: %d\n", prop.warpSize);
printf("Max threads per block: %d\n", prop.maxThreadsPerBlock);
printf("Max thread dimensions: (%d, %d, %d)\n", prop.maxThreadsDim[0], prop.maxThreadsDim[1], prop.maxThreadsDim[2]);
printf("Max grid dimensions: (%d, %d, %d)\n", prop.maxGridSize[0], prop.maxGridSize[1], prop.maxGridSize[2]);
printf("\n");
}
}