comparison src/os_gpu/linux_ptx/vm/gpu_linux.cpp @ 11292:5040ec3ff3aa

Defer PTX on Mac probe to the CUDA driver initialization call
author Morris Meyer <morris.meyer@oracle.com>
date Mon, 12 Aug 2013 15:52:26 -0400
parents d55f24eac4b1
children 49bb1bc983c6
comparison
equal deleted inserted replaced
11291:4a6b03a16808 11292:5040ec3ff3aa
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; 42 static unsigned int nvidia_gk110_dev_id = 0x1005;
43 43
44 bool gpu::Linux::probe_gpu() { 44 bool gpu::Linux::probe_gpu() {
45 /* 45 /*
46 Open /proc/bus/pci/devices to look for the first CUDA enabled 46 * Open /proc/bus/pci/devices to look for the first CUDA enabled
47 device. For now, finding the first CUDA device. Will need to 47 * device. For now, finding the first CUDA device. Will need to
48 revisit this wo support execution on multiple CUDA devices if 48 * revisit this to support execution on multiple CUDA devices if
49 they exist. 49 * they exist.
50 */ 50 */
51 FILE *pci_devices = fopen("/proc/bus/pci/devices", "r"); 51 FILE *pci_devices = fopen("/proc/bus/pci/devices", "r");
52 char contents[4096]; 52 char contents[4096];
53 unsigned int bus_num_devfn_ign; 53 unsigned int bus_num_devfn_ign;
54 unsigned int vendor; 54 unsigned int vendor;
55 unsigned int device; 55 unsigned int device;