comparison src/os_gpu/linux_ptx/vm/gpu_linux.cpp @ 12743:f1a55428a8d7

more HSAIL support in the C++ layer for executing HSAIL code on the simulator Contributed-by: Eric Caspole <eric.caspole@amd.com>
author Doug Simon <doug.simon@oracle.com>
date Sun, 10 Nov 2013 13:18:09 +0100
parents 4f69a5189e77
children 5465ba051280
comparison
equal deleted inserted replaced
12742:40924dbc623b 12743:f1a55428a8d7
40 40
41 static unsigned int nvidia_vendor_id = 0x10de; 41 static unsigned int nvidia_vendor_id = 0x10de;
42 static unsigned int amd_vendor_id = 0x1002; 42 static unsigned int amd_vendor_id = 0x1002;
43 43
44 bool gpu::Linux::probe_gpu() { 44 bool gpu::Linux::probe_gpu() {
45
46 /*
47 * The simulator only depends on shared libraries.
48 * That linkage is checked in a later step.
49 */
50 if (UseHSAILSimulator) {
51 set_target_il_type(gpu::HSAIL);
52 if (TraceGPUInteraction) {
53 tty->print_cr("Setup HSAIL Simulator");
54 }
55 return true;
56 }
57
45 /* 58 /*
46 * Open /proc/bus/pci/devices to look for the first GPU device. For 59 * Open /proc/bus/pci/devices to look for the first GPU device. For
47 * now, we will just find the first GPU device. Will need to revisit 60 * now, we will just find the first GPU device. Will need to revisit
48 * this to support execution on multiple GPU devices, if they exist. 61 * this to support execution on multiple GPU devices, if they exist.
49 */ 62 */