diff --git a/checkin_notes b/checkin_notes index 64e24c669a..1b9ec7d421 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7560,3 +7560,12 @@ David 7 Sept 2009 tools/ make_project + +David 8 Sept 2009 + - client: add code for faking ATI GPUs + + client/ + client_state.cpp + work_fetch.cpp + lib/ + coproc.cpp,h diff --git a/client/client_state.cpp b/client/client_state.cpp index 59952accf0..6f6314581f 100644 --- a/client/client_state.cpp +++ b/client/client_state.cpp @@ -262,7 +262,11 @@ int CLIENT_STATE::init() { } #if 0 fake_cuda(coprocs, 2); - msg_printf(NULL, MSG_INFO, "Faking a CUDA device"); + msg_printf(NULL, MSG_INFO, "Faking an NVIDIA GPU"); +#endif +#if 0 + fake_ati(coprocs, 2); + msg_printf(NULL, MSG_INFO, "Faking an ATI GPU"); #endif if (coprocs.coprocs.size() == 0) { msg_printf(NULL, MSG_INFO, "No coprocessors"); diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index 052b3f7a7c..d80f5fa9d3 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -385,7 +385,7 @@ static bool has_a_job(PROJECT* p) { return false; } -// we're going to contact this project reasons other than work fetch; +// we're going to contact this project for reasons other than work fetch; // decide if we should piggy-back a work fetch request. // void WORK_FETCH::compute_work_request(PROJECT* p) { diff --git a/lib/coproc.cpp b/lib/coproc.cpp index f38aea9235..464b8de54f 100644 --- a/lib/coproc.cpp +++ b/lib/coproc.cpp @@ -439,7 +439,7 @@ void COPROC_CUDA::description(char* buf) { ); } -// add a non-existent CUDA coproc (for debugging) +// fake a NVIDIA GPU (for debugging) // void fake_cuda(COPROCS& coprocs, int count) { COPROC_CUDA* cc = new COPROC_CUDA; @@ -450,7 +450,7 @@ void fake_cuda(COPROCS& coprocs, int count) { } cc->display_driver_version = 18000; cc->cuda_version = 2020; - strcpy(cc->prop.name, "CUDA NVIDIA chip"); + strcpy(cc->prop.name, "Fake NVIDIA GPU"); cc->prop.totalGlobalMem = 256*1024*1024; cc->prop.sharedMemPerBlock = 100; cc->prop.regsPerBlock = 8; @@ -946,3 +946,17 @@ void COPROC_ATI::description(char* buf) { name, version, attribs.localRAM/1024.*1024., flops()/1.e9 ); } + +void fake_ati(COPROCS& coprocs, int count) { + COPROC_ATI* cc = new COPROC_ATI; + strcpy(cc->type, "ATI"); + strcpy(cc->version, "1.2.3"); + cc->count = count; + cc->attribs.numberOfSIMD = 32; + cc->attribs.wavefrontSize = 32; + cc->attribs.engineClock = 500; + for (int i=0; idevice_nums[i] = i; + } + coprocs.coprocs.push_back(cc); +} diff --git a/lib/coproc.h b/lib/coproc.h index 9586777d82..75dfaab554 100644 --- a/lib/coproc.h +++ b/lib/coproc.h @@ -253,6 +253,7 @@ struct COPROC_CUDA : public COPROC { }; void fake_cuda(COPROCS&, int); +void fake_ati(COPROCS&, int); enum CUdevice_attribute_enum { CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1,