Christophe Favergeon | 5cacf9d | 2019-08-14 10:41:17 +0200 | [diff] [blame] | 1 | .headers ON |
| 2 | /* |
| 3 | |
| 4 | Select the core to be used as reference. Only last day of measurements is used. |
| 5 | |
| 6 | */ |
| 7 | CREATE TEMP VIEW if not exists refCore AS select * |
| 8 | from Unary |
| 9 | where coreid=5 AND DATE BETWEEN datetime('now','localtime','-23 hours') AND datetime('now', 'localtime'); |
| 10 | ; |
| 11 | |
| 12 | /* |
| 13 | |
| 14 | Select the cores to be benchmarked compared with the reference. Only last day of measurements is used. |
| 15 | |
| 16 | */ |
| 17 | CREATE TEMP VIEW if not exists otherCores AS select * |
| 18 | from Unary |
| 19 | where coreid != 5 AND DATE BETWEEN datetime('now','localtime','-23 hours') AND datetime('now', 'localtime'); |
| 20 | ; |
| 21 | |
| 22 | /* |
| 23 | |
| 24 | Using regression database, compute the ratio using max cycles |
| 25 | and max degree regression coefficient. |
| 26 | |
| 27 | Change name of columns for result |
| 28 | |
Christophe Favergeon | 86bc9ec | 2019-08-14 10:47:28 +0200 | [diff] [blame^] | 29 | USING(ID,categoryid,NAME) : would have to be extended with any parameter defining the regression |
| 30 | formula. |
| 31 | For instamce, for FFT, if ifft is an external parameter then ifft flag should be |
| 32 | here. |
| 33 | |
| 34 | Here we assume ref and others are generated with same settings and currentConfig.csv |
| 35 | If not the case, the parameters which may be different (like LOOPUNROLL, OPTIMIZED...) |
| 36 | should be added here so that we join the ref and other cores on common benchmark definition. |
| 37 | |
| 38 | We should not compute ratio between configuration of benchmarks which are |
| 39 | not matching. |
| 40 | |
| 41 | If we want to compute ratio between CORE AND PLATFORM then the view above should |
| 42 | be using CORE AND PLATFORM to filter and define the references. |
| 43 | |
Christophe Favergeon | 5cacf9d | 2019-08-14 10:41:17 +0200 | [diff] [blame] | 44 | */ |
| 45 | select temp.otherCores.ID as ID, |
| 46 | CATEGORY.category as CATEGORY, |
| 47 | temp.otherCores.NAME as NAME, |
| 48 | PLATFORM.platform as PLATFORM, |
| 49 | CORE.core as CORE, |
| 50 | COMPILERKIND.compiler as COMPILER, |
| 51 | COMPILER.version as COMPILERVERSION, |
| 52 | TYPE.type as TYPE, |
| 53 | temp.otherCores.DATE as DATE, |
| 54 | (1.0*temp.refCore.MAX / temp.otherCores.MAX) as MAXRATIO, |
| 55 | (1.0*temp.refCore.MAXREGCOEF / temp.otherCores.MAXREGCOEF) as REGRESSIONRATIO |
| 56 | from temp.otherCores |
| 57 | INNER JOIN temp.refCore USING(ID,categoryid,NAME) |
| 58 | INNER JOIN CATEGORY USING(categoryid) |
| 59 | INNER JOIN PLATFORM USING(platformid) |
| 60 | INNER JOIN CORE USING(coreid) |
| 61 | INNER JOIN COMPILER USING(compilerid) |
| 62 | INNER JOIN COMPILERKIND USING(compilerkindid) |
| 63 | INNER JOIN TYPE USING(typeid) |