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 | */ |
Christophe Favergeon | 6777b20 | 2019-09-10 10:51:56 +0200 | [diff] [blame] | 45 | select otherCores.ID as ID, |
Christophe Favergeon | 5cacf9d | 2019-08-14 10:41:17 +0200 | [diff] [blame] | 46 | CATEGORY.category as CATEGORY, |
Christophe Favergeon | 6777b20 | 2019-09-10 10:51:56 +0200 | [diff] [blame] | 47 | otherCores.NAME as NAME, |
| 48 | (1.0*refCore.MAX / otherCores.MAX) as MAXRATIO, |
| 49 | (1.0*refCore.MAXREGCOEF / otherCores.MAXREGCOEF) as REGRESSIONRATIO, |
Christophe Favergeon | 5cacf9d | 2019-08-14 10:41:17 +0200 | [diff] [blame] | 50 | PLATFORM.platform as PLATFORM, |
| 51 | CORE.core as CORE, |
| 52 | COMPILERKIND.compiler as COMPILER, |
| 53 | COMPILER.version as COMPILERVERSION, |
| 54 | TYPE.type as TYPE, |
Christophe Favergeon | 6777b20 | 2019-09-10 10:51:56 +0200 | [diff] [blame] | 55 | otherCores.DATE as DATE |
| 56 | from otherCores |
| 57 | INNER JOIN refCore ON refCore.ID = otherCores.ID AND refCore.categoryid = otherCores.categoryid AND refCore.NAME = otherCores.NAME |
| 58 | INNER JOIN CATEGORY ON CATEGORY.categoryid = otherCores.categoryid |
| 59 | INNER JOIN PLATFORM ON PLATFORM.platformid = otherCores.platformid |
| 60 | INNER JOIN CORE ON CORE.coreid = otherCores.coreid |
| 61 | INNER JOIN COMPILER ON COMPILER.compilerid = otherCores.compilerid |
| 62 | INNER JOIN COMPILERKIND ON COMPILERKIND.compilerkindid = COMPILER.compilerkindid |
| 63 | INNER JOIN TYPE ON TYPE.typeid = otherCores.typeid; |