comparison src/os_gpu/linux_ptx/vm/gpu_linux.cpp @ 11485:49bb1bc983c6

Implement several missing PTX codegen features; return value capture and method args passing of java method executed on GPU.
author bharadwaj
date Fri, 30 Aug 2013 16:39:05 -0400
parents 5040ec3ff3aa
children 4f69a5189e77
comparison
equal deleted inserted replaced
11484:2aac62d79af4 11485:49bb1bc983c6
37 * not rely on CUDA tool kit being installed. We will check if CUDA 37 * not rely on CUDA tool kit being installed. We will check if CUDA
38 * library is installed later. 38 * library is installed later.
39 */ 39 */
40 40
41 static unsigned int nvidia_vendor_id = 0x10de; 41 static unsigned int nvidia_vendor_id = 0x10de;
42 static unsigned int nvidia_gk110_dev_id = 0x1005;
43 42
44 bool gpu::Linux::probe_gpu() { 43 bool gpu::Linux::probe_gpu() {
45 /* 44 /*
46 * Open /proc/bus/pci/devices to look for the first CUDA enabled 45 * Open /proc/bus/pci/devices to look for the first CUDA enabled
47 * device. For now, finding the first CUDA device. Will need to 46 * device. For now, finding the first CUDA device. Will need to
60 } 59 }
61 60
62 while (fgets(contents, sizeof(contents)-1, pci_devices)) { 61 while (fgets(contents, sizeof(contents)-1, pci_devices)) {
63 sscanf(contents, "%04x%04x%04x", &bus_num_devfn_ign, &vendor, &device); 62 sscanf(contents, "%04x%04x%04x", &bus_num_devfn_ign, &vendor, &device);
64 /* Break after finding the first CUDA device. */ 63 /* Break after finding the first CUDA device. */
65 if ((vendor == nvidia_vendor_id) && (device = nvidia_gk110_dev_id)) { 64 if (vendor == nvidia_vendor_id) {
66 cuda_device_exists = true; 65 cuda_device_exists = true;
67 if (TraceGPUInteraction) { 66 if (TraceGPUInteraction) {
68 tty->print_cr("Found supported nVidia CUDA device vendor : 0x%04x device 0x%04x", vendor, device); 67 tty->print_cr("Found supported nVidia CUDA device vendor : 0x%04x device 0x%04x", vendor, device);
69 } 68 }
70 break; 69 break;