Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/os_gpu/linux_ptx/vm/gpu_linux.cpp Sun Nov 10 11:42:31 2013 +0100 +++ b/src/os_gpu/linux_ptx/vm/gpu_linux.cpp Sun Nov 10 13:18:09 2013 +0100 @@ -42,6 +42,19 @@ static unsigned int amd_vendor_id = 0x1002; bool gpu::Linux::probe_gpu() { + + /* + * The simulator only depends on shared libraries. + * That linkage is checked in a later step. + */ + if (UseHSAILSimulator) { + set_target_il_type(gpu::HSAIL); + if (TraceGPUInteraction) { + tty->print_cr("Setup HSAIL Simulator"); + } + return true; + } + /* * Open /proc/bus/pci/devices to look for the first GPU device. For * now, we will just find the first GPU device. Will need to revisit