7, జులై 2026, మంగళవారం

LAB-3/12 PROG-1....CUDA/NVIDIA..GUP HPC

 #include <stdio.h>


int main() {
  int nDevices;

  cudaGetDeviceCount(&nDevices);
  for (int i = 0; i < nDevices; i++) {
    cudaDeviceProp prop;
    cudaGetDeviceProperties(&prop, i);
    printf("Device Number: %d\n", i);
    printf("  Device name: %s\n", prop.name);
    printf("  Memory Clock Rate (KHz): %d\n",
           prop.memoryClockRate);
    printf("  Memory Bus Width (bits): %d\n",
           prop.memoryBusWidth);
    printf("  Peak Memory Bandwidth (GB/s): %f\n\n",
           2.0*prop.memoryClockRate*(prop.memoryBusWidth/8)/1.0e6);
  }
}
MY CUDA PROGRAM RAM.A.DAYINABOYINA........... Device Number: 0 Device name: Tesla T4 Memory Clock Rate (KHz): 5001000 Memory Bus Width (bits): 256 Peak Memory Bandwidth (GB/s): 320.064000 [exit 0 · 2070 ms]

కామెంట్‌లు లేవు:

కామెంట్‌ను పోస్ట్ చేయండి