mirror of https://github.com/BOINC/boinc.git
- client: fix bug in setting GPU peak flops
svn path=/trunk/boinc/; revision=22950
This commit is contained in:
parent
d9f95d08a0
commit
046dc09202
|
@ -305,3 +305,11 @@ Charlie 27 Jan 2011
|
|||
project.pbxproj
|
||||
win_build/
|
||||
boincmgr.vcproj
|
||||
|
||||
David 27 Jan 2011
|
||||
- client: fix bug in setting GPU peak flops
|
||||
|
||||
client/
|
||||
coproc_detect.cpp
|
||||
lib/
|
||||
coproc.cpp,h
|
||||
|
|
|
@ -418,6 +418,7 @@ void COPROC_CUDA::get(
|
|||
#endif
|
||||
cc.cuda_version = cuda_version;
|
||||
cc.device_num = j;
|
||||
cc.set_peak_flops();
|
||||
gpus.push_back(cc);
|
||||
}
|
||||
|
||||
|
@ -493,6 +494,7 @@ void COPROC_CUDA::fake(int driver_version, double ram, int n) {
|
|||
prop.clockRate = 1250000;
|
||||
prop.textureAlignment = 1000;
|
||||
prop.multiProcessorCount = 14;
|
||||
set_peak_flops();
|
||||
}
|
||||
|
||||
// See how much RAM is available on each GPU.
|
||||
|
@ -880,6 +882,7 @@ void COPROC_ATI::get(
|
|||
cc.amdrt_detected = amdrt_detected;
|
||||
cc.atirt_detected = atirt_detected;
|
||||
cc.device_num = i;
|
||||
cc.set_peak_flops();
|
||||
gpus.push_back(cc);
|
||||
}
|
||||
|
||||
|
@ -939,6 +942,7 @@ void COPROC_ATI::fake(double ram, int n) {
|
|||
for (int i=0; i<count; i++) {
|
||||
device_nums[i] = i;
|
||||
}
|
||||
set_peak_flops();
|
||||
}
|
||||
|
||||
void COPROC_ATI::get_available_ram() {
|
||||
|
|
|
@ -245,13 +245,7 @@ int COPROC_CUDA::parse(MIOFILE& fin) {
|
|||
while (fin.fgets(buf, sizeof(buf))) {
|
||||
if (strstr(buf, "</coproc_cuda>")) {
|
||||
if (!peak_flops) {
|
||||
// clock rate is scaled down by 1000;
|
||||
// each processor has 8 or 32 cores;
|
||||
// each core can do 2 ops per clock
|
||||
//
|
||||
int cores_per_proc = (prop.major>=2)?32:8;
|
||||
double x = (1000.*prop.clockRate) * prop.multiProcessorCount * cores_per_proc * 2.;
|
||||
peak_flops = x?x:5e10;
|
||||
set_peak_flops();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -400,9 +394,7 @@ int COPROC_ATI::parse(MIOFILE& fin) {
|
|||
version_num = major*1000000 + minor*1000 + release;
|
||||
|
||||
if (!peak_flops) {
|
||||
double x = attribs.numberOfSIMD * attribs.wavefrontSize * 2.5 * attribs.engineClock * 1.e6;
|
||||
// clock is in MHz
|
||||
peak_flops = x?x:5e10;
|
||||
set_peak_flops();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
14
lib/coproc.h
14
lib/coproc.h
|
@ -207,6 +207,15 @@ struct COPROC_CUDA : public COPROC {
|
|||
void clear();
|
||||
int parse(MIOFILE&);
|
||||
void get_available_ram();
|
||||
void set_peak_flops() {
|
||||
// clock rate is scaled down by 1000;
|
||||
// each processor has 8 or 32 cores;
|
||||
// each core can do 2 ops per clock
|
||||
//
|
||||
int cores_per_proc = (prop.major>=2)?32:8;
|
||||
double x = (1000.*prop.clockRate) * prop.multiProcessorCount * cores_per_proc * 2.;
|
||||
peak_flops = x?x:5e10;
|
||||
}
|
||||
|
||||
bool check_running_graphics_app();
|
||||
void fake(int driver_version, double ram, int count);
|
||||
|
@ -237,6 +246,11 @@ struct COPROC_ATI : public COPROC {
|
|||
void clear();
|
||||
int parse(MIOFILE&);
|
||||
void get_available_ram();
|
||||
void set_peak_flops() {
|
||||
double x = attribs.numberOfSIMD * attribs.wavefrontSize * 2.5 * attribs.engineClock * 1.e6;
|
||||
// clock is in MHz
|
||||
peak_flops = x?x:5e10;
|
||||
}
|
||||
void fake(double, int);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue