Created
October 31, 2019 17:17
-
-
Save robertleeplummerjr/eba85ef461422fa6fc4f31ff84e00cf2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const benchmark = require('./src/index'), | |
fs = require('fs'); | |
const out = benchmark.multipleBenchmark({ | |
commonOptions: { | |
cpu_benchmark: true, | |
num_benchmarks: 5 | |
}, | |
range: { | |
optionName: 'matrix_size', | |
interval: [2, 16384], | |
commonRatio: 2 | |
} | |
}) | |
const json = out.getChartistJSON([ | |
{ | |
x: 'matrix_size', | |
y: 'gpu_score' | |
}, | |
{ | |
x: 'matrix_size', | |
y: 'cpu_score' | |
}, | |
{ | |
x: 'matrix_size', | |
y: 'pipe_run_time' | |
}, | |
{ | |
x: 'matrix_size', | |
y: 'gpu_run_time_mat_mult' | |
}, | |
{ | |
x: 'matrix_size', | |
y: 'gpu_run_time_mat_conv' | |
}, | |
{ | |
x: 'matrix_size', | |
y: 'cpu_run_time_mat_mult' | |
}, | |
{ | |
x: 'matrix_size', | |
y: 'cpu_run_time_mat_conv' | |
} | |
]) | |
fs.writeFileSync('./benchOut/gpu_score.json', JSON.stringify(json[0])); | |
fs.writeFileSync('./benchOut/cpu_score.json', JSON.stringify(json[1])); | |
fs.writeFileSync('./benchOut/pipe_run_time.json', JSON.stringify(json[2])); | |
fs.writeFileSync('./benchOut/gpu_run_time_mat_mult.json', JSON.stringify(json[3])); | |
fs.writeFileSync('./benchOut/gpu_run_time_mat_conv.json', JSON.stringify(json[4])); | |
fs.writeFileSync('./benchOut/cpu_run_time_mat_mult.json', JSON.stringify(json[5])); | |
fs.writeFileSync('./benchOut/cpu_run_time_mat_conv.json', JSON.stringify(json[6])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment