- client: add code for faking ATI GPUs

svn path=/trunk/boinc/; revision=19024
This commit is contained in:
David Anderson 2009-09-08 18:42:24 +00:00
parent b631ce3fe6
commit b129e71f20
5 changed files with 32 additions and 4 deletions

View File

@ -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

View File

@ -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");

View File

@ -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) {

View File

@ -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; i<count; i++) {
cc->device_nums[i] = i;
}
coprocs.coprocs.push_back(cc);
}

View File

@ -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,