diff --git a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/alexnet2_piped.cc b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/alexnet2_piped.cc index 95db5a0c481545e765cb76ba31f9e90e595ab5ea..653d2e7bdf7f7d006dc89fb99027ac58bd336c45 100644 --- a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/alexnet2_piped.cc +++ b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/alexnet2_piped.cc @@ -57,8 +57,7 @@ int main(int argc, char* argv[]){ llvm_hpvm_initTensorRt(0); - - std::string dir_prefix = std::string("../model_params/alexnet2_cifar10_test/"); + std::string dir_prefix = std::string("../model_params/alexnet2_cifar10/"); std::string input_path = dir_prefix + std::string("input.bin"); std::string labels_path = dir_prefix + std::string("labels.bin"); std::string labels32_path = dir_prefix + std::string("labels32.bin"); diff --git a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/alexnet_piped.cc b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/alexnet_piped.cc index 99b784d83d1a049eeddedeeca710a37e216048fe..22fe979cb5bbae5964ff33444ab0fbe9dec82cf1 100644 --- a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/alexnet_piped.cc +++ b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/alexnet_piped.cc @@ -59,7 +59,8 @@ int main(int argc, char* argv[]){ llvm_hpvm_initTensorRt(0); - std::string dir_prefix = std::string("../model_params/alexnet_cifar10_test/"); + std::string dir_prefix = std::string("../model_params/alexnet_cifar10/"); + //std::string dir_prefix = std::string("../model_params/alexnet_cifar10_test/"); std::string input_path = dir_prefix + std::string("input.bin"); std::string labels_path = dir_prefix + std::string("labels.bin"); std::string labels32_path = dir_prefix + std::string("labels32.bin"); diff --git a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/lenet_piped.cc b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/lenet_piped.cc index b0feb1fc07a5563e14bfc15a182a412371603ea5..c246822a094faffebe01f58fa8fd2c15f004cea1 100644 --- a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/lenet_piped.cc +++ b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/lenet_piped.cc @@ -30,30 +30,30 @@ int* predictedLabels; void testLenetTanh(){ printf("********* Lenet-5 Architecture ********** \n"); - - std::string dir_prefix = std::string("../model_params/lenet_params/"); + + std::string dir_prefix = std::string("../model_params/lenet_mnist/"); std::string input_path = dir_prefix + std::string("input.bin"); std::string labels_path = dir_prefix + std::string("labels.bin"); std::string labels32_path = dir_prefix + std::string("labels32.bin"); - void* conv1_filter = readTrainedWeights("../model_params/lenet_keras/conv1.bin", + // Loading Weights + void* conv1_filter = readTrainedWeights("../model_params/lenet_mnist/conv1.bin", float_type, 32, 1, 5, 5); - void* conv1_bias = readTrainedWeights("../model_params/lenet_keras/conv1_bias.bin", + void* conv1_bias = readTrainedWeights("../model_params/lenet_mnist/conv1_bias.bin", float_type, 1, 32, 1, 1); - void* conv2_filter = readTrainedWeights("../model_params/lenet_keras/conv2.bin", + void* conv2_filter = readTrainedWeights("../model_params/lenet_mnist/conv2.bin", float_type, 64, 32, 5, 5); - void* conv2_bias = readTrainedWeights("../model_params/lenet_keras/conv2_bias.bin", + void* conv2_bias = readTrainedWeights("../model_params/lenet_mnist/conv2_bias.bin", float_type, 1, 64, 1, 1); - void* fc1_weights = readTrainedWeights("../model_params/lenet_keras/fc1.bin", + void* fc1_weights = readTrainedWeights("../model_params/lenet_mnist/fc1.bin", float_type, 1, 1, 7*7*64, 1024); - void* fc1_bias = readTrainedWeights("../model_params/lenet_keras/fc1_bias.bin", + void* fc1_bias = readTrainedWeights("../model_params/lenet_mnist/fc1_bias.bin", float_type, 1, 1024, 1, 1); - void* fc2_weights = readTrainedWeights("../model_params/lenet_keras/fc2.bin", + void* fc2_weights = readTrainedWeights("../model_params/lenet_mnist/fc2.bin", float_type, 1, 1, 1024, 10); - void* fc2_bias = readTrainedWeights("../model_params/lenet_keras/fc2_bias.bin", + void* fc2_bias = readTrainedWeights("../model_params/lenet_mnist/fc2_bias.bin", float_type, 1, 10, 1, 1); - clearTensorMap(); diff --git a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/resnet18_piped.cc b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/resnet18_piped.cc index b2e737d674039cffbdb1454e114bd826e4e5c129..8446e1f2583c99758f9fdd84c71dd0c8d31cd182 100644 --- a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/resnet18_piped.cc +++ b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/resnet18_piped.cc @@ -18,7 +18,7 @@ int to_skip = 5; int main(int argc, char* argv[]){ int test_input_size = 5000; - int batch_size = 500; + int batch_size = 250; int offset = 5000; if (argc > 1){ @@ -58,7 +58,7 @@ int main(int argc, char* argv[]){ llvm_hpvm_initTensorRt(0); - std::string dir_prefix = std::string("../model_params/resnet18_cifar10_promise/"); + std::string dir_prefix = std::string("../model_params/resnet18_cifar10/"); std::string input_path = dir_prefix + std::string("input.bin"); std::string labels_path = dir_prefix + std::string("labels.bin"); std::string labels32_path = dir_prefix + std::string("labels32.bin"); diff --git a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/vgg16_cifar100_piped.cc b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/vgg16_cifar100_piped.cc index 87f9923d321170a0e6fc9aa751aec6c884ad1a7a..1765f133353e127cfff9b6b45ea482a9b6e678b5 100644 --- a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/vgg16_cifar100_piped.cc +++ b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/vgg16_cifar100_piped.cc @@ -61,7 +61,7 @@ int main(int argc, char* argv[]){ llvm_hpvm_initTensorRt(0); - std::string dir_prefix = std::string("../model_params/vgg16_cifar100_front/"); + std::string dir_prefix = std::string("../model_params/vgg16_cifar100/"); std::string input_path = dir_prefix + std::string("input.bin"); std::string labels_path = dir_prefix + std::string("labels.bin"); std::string labels32_path = dir_prefix + std::string("labels32.bin"); diff --git a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/vgg16_cifar10_piped.cc b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/vgg16_cifar10_piped.cc index a71a462bc4f62b6e8209f3baf1aa93387fba3ed8..19c802dc88bb9a140bf5022ee07ab55f408ac53f 100644 --- a/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/vgg16_cifar10_piped.cc +++ b/llvm/projects/hpvm-tensor-rt/dnn_sources/src/promise/vgg16_cifar10_piped.cc @@ -58,157 +58,157 @@ int main(int argc, char* argv[]){ - llvm_hpvm_initTensorRt(0); - - - std::string dir_prefix = std::string("../model_params/vgg16_cifar10_2/"); - std::string input_path = dir_prefix + std::string("input.bin"); - std::string labels_path = dir_prefix + std::string("labels.bin"); - std::string labels32_path = dir_prefix + std::string("labels32.bin"); - - std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin"); - void* conv2d_1_w = readTrainedWeights(conv2d_1_w_path.c_str(), 0,64,3,3,3); - std::string conv2d_1_b_path = dir_prefix + std::string("conv2d_1_b.bin"); - void* conv2d_1_b = readTrainedWeights(conv2d_1_b_path.c_str(), 0,1,64,1,1); - std::string conv2d_2_w_path = dir_prefix + std::string("conv2d_2_w.bin"); - void* conv2d_2_w = readTrainedWeights(conv2d_2_w_path.c_str(), 0,64,64,3,3); - std::string conv2d_2_b_path = dir_prefix + std::string("conv2d_2_b.bin"); - void* conv2d_2_b = readTrainedWeights(conv2d_2_b_path.c_str(), 0,1,64,1,1); - std::string conv2d_3_w_path = dir_prefix + std::string("conv2d_3_w.bin"); - void* conv2d_3_w = readTrainedWeights(conv2d_3_w_path.c_str(), 0,128,64,3,3); - std::string conv2d_3_b_path = dir_prefix + std::string("conv2d_3_b.bin"); - void* conv2d_3_b = readTrainedWeights(conv2d_3_b_path.c_str(), 0,1,128,1,1); - std::string conv2d_4_w_path = dir_prefix + std::string("conv2d_4_w.bin"); - void* conv2d_4_w = readTrainedWeights(conv2d_4_w_path.c_str(), 0,128,128,3,3); - std::string conv2d_4_b_path = dir_prefix + std::string("conv2d_4_b.bin"); - void* conv2d_4_b = readTrainedWeights(conv2d_4_b_path.c_str(), 0,1,128,1,1); - std::string conv2d_5_w_path = dir_prefix + std::string("conv2d_5_w.bin"); - void* conv2d_5_w = readTrainedWeights(conv2d_5_w_path.c_str(), 0,256,128,3,3); - std::string conv2d_5_b_path = dir_prefix + std::string("conv2d_5_b.bin"); - void* conv2d_5_b = readTrainedWeights(conv2d_5_b_path.c_str(), 0,1,256,1,1); - std::string conv2d_6_w_path = dir_prefix + std::string("conv2d_6_w.bin"); - void* conv2d_6_w = readTrainedWeights(conv2d_6_w_path.c_str(), 0,256,256,3,3); - std::string conv2d_6_b_path = dir_prefix + std::string("conv2d_6_b.bin"); - void* conv2d_6_b = readTrainedWeights(conv2d_6_b_path.c_str(), 0,1,256,1,1); - std::string conv2d_7_w_path = dir_prefix + std::string("conv2d_7_w.bin"); - void* conv2d_7_w = readTrainedWeights(conv2d_7_w_path.c_str(), 0,256,256,3,3); - std::string conv2d_7_b_path = dir_prefix + std::string("conv2d_7_b.bin"); - void* conv2d_7_b = readTrainedWeights(conv2d_7_b_path.c_str(), 0,1,256,1,1); - std::string conv2d_8_w_path = dir_prefix + std::string("conv2d_8_w.bin"); - void* conv2d_8_w = readTrainedWeights(conv2d_8_w_path.c_str(), 0,512,256,3,3); - std::string conv2d_8_b_path = dir_prefix + std::string("conv2d_8_b.bin"); - void* conv2d_8_b = readTrainedWeights(conv2d_8_b_path.c_str(), 0,1,512,1,1); - std::string conv2d_9_w_path = dir_prefix + std::string("conv2d_9_w.bin"); - void* conv2d_9_w = readTrainedWeights(conv2d_9_w_path.c_str(), 0,512,512,3,3); - std::string conv2d_9_b_path = dir_prefix + std::string("conv2d_9_b.bin"); - void* conv2d_9_b = readTrainedWeights(conv2d_9_b_path.c_str(), 0,1,512,1,1); - std::string conv2d_10_w_path = dir_prefix + std::string("conv2d_10_w.bin"); - void* conv2d_10_w = readTrainedWeights(conv2d_10_w_path.c_str(), 0,512,512,3,3); - std::string conv2d_10_b_path = dir_prefix + std::string("conv2d_10_b.bin"); - void* conv2d_10_b = readTrainedWeights(conv2d_10_b_path.c_str(), 0,1,512,1,1); - std::string conv2d_11_w_path = dir_prefix + std::string("conv2d_11_w.bin"); - void* conv2d_11_w = readTrainedWeights(conv2d_11_w_path.c_str(), 0,512,512,3,3); - std::string conv2d_11_b_path = dir_prefix + std::string("conv2d_11_b.bin"); - void* conv2d_11_b = readTrainedWeights(conv2d_11_b_path.c_str(), 0,1,512,1,1); - std::string conv2d_12_w_path = dir_prefix + std::string("conv2d_12_w.bin"); - void* conv2d_12_w = readTrainedWeights(conv2d_12_w_path.c_str(), 0,512,512,3,3); - std::string conv2d_12_b_path = dir_prefix + std::string("conv2d_12_b.bin"); - void* conv2d_12_b = readTrainedWeights(conv2d_12_b_path.c_str(), 0,1,512,1,1); - std::string conv2d_13_w_path = dir_prefix + std::string("conv2d_13_w.bin"); - void* conv2d_13_w = readTrainedWeights(conv2d_13_w_path.c_str(), 0,512,512,3,3); - std::string conv2d_13_b_path = dir_prefix + std::string("conv2d_13_b.bin"); - void* conv2d_13_b = readTrainedWeights(conv2d_13_b_path.c_str(), 0,1,512,1,1); - std::string dense_1_w_path = dir_prefix + std::string("dense_1_w.bin"); - void* dense_1_w = readTrainedWeights(dense_1_w_path.c_str(), 0,1,1,512,512); - std::string dense_1_b_path = dir_prefix + std::string("dense_1_b.bin"); - void* dense_1_b = readTrainedWeights(dense_1_b_path.c_str(), 0,1,512,1,1); - std::string dense_2_w_path = dir_prefix + std::string("dense_2_w.bin"); - void* dense_2_w = readTrainedWeights(dense_2_w_path.c_str(), 0,1,1,512,10); - std::string dense_2_b_path = dir_prefix + std::string("dense_2_b.bin"); - void* dense_2_b = readTrainedWeights(dense_2_b_path.c_str(), 0,1,10,1,1); + llvm_hpvm_initTensorRt(0); + + + std::string dir_prefix = std::string("../model_params/vgg16_cifar10/"); + std::string input_path = dir_prefix + std::string("input.bin"); + std::string labels_path = dir_prefix + std::string("labels.bin"); + std::string labels32_path = dir_prefix + std::string("labels32.bin"); + + std::string conv2d_1_w_path = dir_prefix + std::string("conv2d_1_w.bin"); + void* conv2d_1_w = readTrainedWeights(conv2d_1_w_path.c_str(), 0,64,3,3,3); + std::string conv2d_1_b_path = dir_prefix + std::string("conv2d_1_b.bin"); + void* conv2d_1_b = readTrainedWeights(conv2d_1_b_path.c_str(), 0,1,64,1,1); + std::string conv2d_2_w_path = dir_prefix + std::string("conv2d_2_w.bin"); + void* conv2d_2_w = readTrainedWeights(conv2d_2_w_path.c_str(), 0,64,64,3,3); + std::string conv2d_2_b_path = dir_prefix + std::string("conv2d_2_b.bin"); + void* conv2d_2_b = readTrainedWeights(conv2d_2_b_path.c_str(), 0,1,64,1,1); + std::string conv2d_3_w_path = dir_prefix + std::string("conv2d_3_w.bin"); + void* conv2d_3_w = readTrainedWeights(conv2d_3_w_path.c_str(), 0,128,64,3,3); + std::string conv2d_3_b_path = dir_prefix + std::string("conv2d_3_b.bin"); + void* conv2d_3_b = readTrainedWeights(conv2d_3_b_path.c_str(), 0,1,128,1,1); + std::string conv2d_4_w_path = dir_prefix + std::string("conv2d_4_w.bin"); + void* conv2d_4_w = readTrainedWeights(conv2d_4_w_path.c_str(), 0,128,128,3,3); + std::string conv2d_4_b_path = dir_prefix + std::string("conv2d_4_b.bin"); + void* conv2d_4_b = readTrainedWeights(conv2d_4_b_path.c_str(), 0,1,128,1,1); + std::string conv2d_5_w_path = dir_prefix + std::string("conv2d_5_w.bin"); + void* conv2d_5_w = readTrainedWeights(conv2d_5_w_path.c_str(), 0,256,128,3,3); + std::string conv2d_5_b_path = dir_prefix + std::string("conv2d_5_b.bin"); + void* conv2d_5_b = readTrainedWeights(conv2d_5_b_path.c_str(), 0,1,256,1,1); + std::string conv2d_6_w_path = dir_prefix + std::string("conv2d_6_w.bin"); + void* conv2d_6_w = readTrainedWeights(conv2d_6_w_path.c_str(), 0,256,256,3,3); + std::string conv2d_6_b_path = dir_prefix + std::string("conv2d_6_b.bin"); + void* conv2d_6_b = readTrainedWeights(conv2d_6_b_path.c_str(), 0,1,256,1,1); + std::string conv2d_7_w_path = dir_prefix + std::string("conv2d_7_w.bin"); + void* conv2d_7_w = readTrainedWeights(conv2d_7_w_path.c_str(), 0,256,256,3,3); + std::string conv2d_7_b_path = dir_prefix + std::string("conv2d_7_b.bin"); + void* conv2d_7_b = readTrainedWeights(conv2d_7_b_path.c_str(), 0,1,256,1,1); + std::string conv2d_8_w_path = dir_prefix + std::string("conv2d_8_w.bin"); + void* conv2d_8_w = readTrainedWeights(conv2d_8_w_path.c_str(), 0,512,256,3,3); + std::string conv2d_8_b_path = dir_prefix + std::string("conv2d_8_b.bin"); + void* conv2d_8_b = readTrainedWeights(conv2d_8_b_path.c_str(), 0,1,512,1,1); + std::string conv2d_9_w_path = dir_prefix + std::string("conv2d_9_w.bin"); + void* conv2d_9_w = readTrainedWeights(conv2d_9_w_path.c_str(), 0,512,512,3,3); + std::string conv2d_9_b_path = dir_prefix + std::string("conv2d_9_b.bin"); + void* conv2d_9_b = readTrainedWeights(conv2d_9_b_path.c_str(), 0,1,512,1,1); + std::string conv2d_10_w_path = dir_prefix + std::string("conv2d_10_w.bin"); + void* conv2d_10_w = readTrainedWeights(conv2d_10_w_path.c_str(), 0,512,512,3,3); + std::string conv2d_10_b_path = dir_prefix + std::string("conv2d_10_b.bin"); + void* conv2d_10_b = readTrainedWeights(conv2d_10_b_path.c_str(), 0,1,512,1,1); + std::string conv2d_11_w_path = dir_prefix + std::string("conv2d_11_w.bin"); + void* conv2d_11_w = readTrainedWeights(conv2d_11_w_path.c_str(), 0,512,512,3,3); + std::string conv2d_11_b_path = dir_prefix + std::string("conv2d_11_b.bin"); + void* conv2d_11_b = readTrainedWeights(conv2d_11_b_path.c_str(), 0,1,512,1,1); + std::string conv2d_12_w_path = dir_prefix + std::string("conv2d_12_w.bin"); + void* conv2d_12_w = readTrainedWeights(conv2d_12_w_path.c_str(), 0,512,512,3,3); + std::string conv2d_12_b_path = dir_prefix + std::string("conv2d_12_b.bin"); + void* conv2d_12_b = readTrainedWeights(conv2d_12_b_path.c_str(), 0,1,512,1,1); + std::string conv2d_13_w_path = dir_prefix + std::string("conv2d_13_w.bin"); + void* conv2d_13_w = readTrainedWeights(conv2d_13_w_path.c_str(), 0,512,512,3,3); + std::string conv2d_13_b_path = dir_prefix + std::string("conv2d_13_b.bin"); + void* conv2d_13_b = readTrainedWeights(conv2d_13_b_path.c_str(), 0,1,512,1,1); + std::string dense_1_w_path = dir_prefix + std::string("dense_1_w.bin"); + void* dense_1_w = readTrainedWeights(dense_1_w_path.c_str(), 0,1,1,512,512); + std::string dense_1_b_path = dir_prefix + std::string("dense_1_b.bin"); + void* dense_1_b = readTrainedWeights(dense_1_b_path.c_str(), 0,1,512,1,1); + std::string dense_2_w_path = dir_prefix + std::string("dense_2_w.bin"); + void* dense_2_w = readTrainedWeights(dense_2_w_path.c_str(), 0,1,1,512,10); + std::string dense_2_b_path = dir_prefix + std::string("dense_2_b.bin"); + void* dense_2_b = readTrainedWeights(dense_2_b_path.c_str(), 0,1,10,1,1); - int missed = 0; - for (int i = 0 ; i < total_runs; i++){ + int missed = 0; + for (int i = 0 ; i < total_runs; i++){ - // NOTE: Wait on signal from OpenTuner - stallOnOpenTunerSignal(); + // NOTE: Wait on signal from OpenTuner + stallOnOpenTunerSignal(); - if (missed >= to_skip){ - break; - } + if (missed >= to_skip){ + break; + } - startMemTracking(); + startMemTracking(); - int batch_count = test_input_size / batch_size; - float final_accuracy = 0.0; + int batch_count = test_input_size / batch_size; + float final_accuracy = 0.0; - for(int i = 0; i < batch_count; i++){ + for(int i = 0; i < batch_count; i++){ - int start = i * batch_size + offset; - int end = (i + 1) * batch_size + offset; + int start = i * batch_size + offset; + int end = (i + 1) * batch_size + offset; - void* input = readInputBatch(input_path.c_str(),0,start,end,3,32,32); + void* input = readInputBatch(input_path.c_str(),0,start,end,3,32,32); - void* var_0 = ConvLayer_PROMISE(input, -1.8816367, 2.0934217, conv2d_1_w, -0.53275156, 0.49437004, conv2d_1_b, -0.6403629, 0.2490165, 1, 1, 1, 1, -1, 0, 1, 0.0, 1.3590874671936035, 9); - void* var_1 = ConvLayer_PROMISE(var_0, 0.0, 1.3590874671936035, conv2d_2_w, -0.2688396, 0.20639156, conv2d_2_b, -0.7745511, 0.82006615, 1, 1, 1, 1, 0, 2, 1, 0.0, 2.521231179237361, 9); - void* var_2 = ConvLayer_PROMISE(var_1, 0.0, 2.521231179237361, conv2d_3_w, -0.16776876, 0.14878987, conv2d_3_b, -0.35283303, 0.5154362, 1, 1, 1, 1, -1, 0, 1, 0.0, 1.2011985784769053, 9); - void* var_3 = ConvLayer_PROMISE(var_2, 0.0, 1.2011985784769053, conv2d_4_w, -0.088948585, 0.114222586, conv2d_4_b, -0.30250227, 0.36856708, 1, 1, 1, 1, 0, 2, 1, 0.0, 1.0359880930185312, 9); - void* var_4 = ConvLayer_PROMISE(var_3, 0.0, 1.0359880930185312, conv2d_5_w, -0.07739562, 0.10973293, conv2d_5_b, -0.15568458, 0.17634983, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.3004955950379369, 9); - void* var_5 = ConvLayer_PROMISE(var_4, 0.0, 0.3004955950379369, conv2d_6_w, -0.051649556, 0.05435231, conv2d_6_b, -0.07395447, 0.07996062, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.11490475405007583, 9); - void* var_6 = ConvLayer_PROMISE(var_5, 0.0, 0.11490475405007583, conv2d_7_w, -0.043513633, 0.07577866, conv2d_7_b, -0.06921874, 0.02660573, 1, 1, 1, 1, 0, 2, 1, 0.0, 0.16232508487999475, 9); - void* var_7 = ConvLayer_PROMISE(var_6, 0.0, 0.16232508487999475, conv2d_8_w, -0.033842053, 0.045218028, conv2d_8_b, -0.022827804, 0.023845317, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.12424996573477909, 9); - void* var_8 = ConvLayer_PROMISE(var_7, 0.0, 0.12424996573477909, conv2d_9_w, -0.02211613, 0.032084666, conv2d_9_b, -0.02699063, 0.03773564, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.1746344865113496, 9); - void* var_9 = ConvLayer_PROMISE(var_8, 0.0, 0.1746344865113496, conv2d_10_w, -0.01979376, 0.034854397, conv2d_10_b, -0.036107242, 0.07056531, 1, 1, 1, 1, 0, 2, 1, 0.0, 0.5751757621765137, 9); - void* var_10 = ConvLayer_PROMISE(var_9, 0.0, 0.5751757621765137, conv2d_11_w, -0.03452098, 0.046055835, conv2d_11_b, -0.051925894, 0.07039055, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.7718751144409115, 9); - void* var_11 = ConvLayer_PROMISE(var_10, 0.0, 0.7718751144409115, conv2d_12_w, -0.025946895, 0.040090334, conv2d_12_b, -0.06049362, 0.12658806, 1, 1, 1, 1, -1, 0, 1, 0.0, 1.1728516906499844, 9); - void* var_12 = ConvLayer_PROMISE(var_11, 0.0, 1.1728516906499844, conv2d_13_w, -0.021766115, 0.03315237, conv2d_13_b, -0.20705001, 0.117947325, 1, 1, 1, 1, 0, 2, 1, 0.0, 2.0015769386291495, 9); - void* var_13 = FCLayer_PROMISE(var_12, 0.0, 2.0015769386291495, dense_1_w, -0.042597745, 0.046707444, dense_1_b, -0.21937433, 0.2545502, 1, 0.0, 2.002361118793486, 9); - void* var_14 = FCLayer_PROMISE(var_13, 0.0, 2.002361118793486, dense_2_w, -0.32550547, 0.30829763, dense_2_b, -1.1787822, 1.2378151, -1, -18.251470546722413, 24.17363445281988, 9); - void* var_15 = tensorSoftmax(var_14); + void* var_0 = ConvLayer_PROMISE(input, -1.8816367, 2.0934217, conv2d_1_w, -0.53275156, 0.49437004, conv2d_1_b, -0.6403629, 0.2490165, 1, 1, 1, 1, -1, 0, 1, 0.0, 1.3590874671936035, 9); + void* var_1 = ConvLayer_PROMISE(var_0, 0.0, 1.3590874671936035, conv2d_2_w, -0.2688396, 0.20639156, conv2d_2_b, -0.7745511, 0.82006615, 1, 1, 1, 1, 0, 2, 1, 0.0, 2.521231179237361, 9); + void* var_2 = ConvLayer_PROMISE(var_1, 0.0, 2.521231179237361, conv2d_3_w, -0.16776876, 0.14878987, conv2d_3_b, -0.35283303, 0.5154362, 1, 1, 1, 1, -1, 0, 1, 0.0, 1.2011985784769053, 9); + void* var_3 = ConvLayer_PROMISE(var_2, 0.0, 1.2011985784769053, conv2d_4_w, -0.088948585, 0.114222586, conv2d_4_b, -0.30250227, 0.36856708, 1, 1, 1, 1, 0, 2, 1, 0.0, 1.0359880930185312, 9); + void* var_4 = ConvLayer_PROMISE(var_3, 0.0, 1.0359880930185312, conv2d_5_w, -0.07739562, 0.10973293, conv2d_5_b, -0.15568458, 0.17634983, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.3004955950379369, 9); + void* var_5 = ConvLayer_PROMISE(var_4, 0.0, 0.3004955950379369, conv2d_6_w, -0.051649556, 0.05435231, conv2d_6_b, -0.07395447, 0.07996062, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.11490475405007583, 9); + void* var_6 = ConvLayer_PROMISE(var_5, 0.0, 0.11490475405007583, conv2d_7_w, -0.043513633, 0.07577866, conv2d_7_b, -0.06921874, 0.02660573, 1, 1, 1, 1, 0, 2, 1, 0.0, 0.16232508487999475, 9); + void* var_7 = ConvLayer_PROMISE(var_6, 0.0, 0.16232508487999475, conv2d_8_w, -0.033842053, 0.045218028, conv2d_8_b, -0.022827804, 0.023845317, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.12424996573477909, 9); + void* var_8 = ConvLayer_PROMISE(var_7, 0.0, 0.12424996573477909, conv2d_9_w, -0.02211613, 0.032084666, conv2d_9_b, -0.02699063, 0.03773564, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.1746344865113496, 9); + void* var_9 = ConvLayer_PROMISE(var_8, 0.0, 0.1746344865113496, conv2d_10_w, -0.01979376, 0.034854397, conv2d_10_b, -0.036107242, 0.07056531, 1, 1, 1, 1, 0, 2, 1, 0.0, 0.5751757621765137, 9); + void* var_10 = ConvLayer_PROMISE(var_9, 0.0, 0.5751757621765137, conv2d_11_w, -0.03452098, 0.046055835, conv2d_11_b, -0.051925894, 0.07039055, 1, 1, 1, 1, -1, 0, 1, 0.0, 0.7718751144409115, 9); + void* var_11 = ConvLayer_PROMISE(var_10, 0.0, 0.7718751144409115, conv2d_12_w, -0.025946895, 0.040090334, conv2d_12_b, -0.06049362, 0.12658806, 1, 1, 1, 1, -1, 0, 1, 0.0, 1.1728516906499844, 9); + void* var_12 = ConvLayer_PROMISE(var_11, 0.0, 1.1728516906499844, conv2d_13_w, -0.021766115, 0.03315237, conv2d_13_b, -0.20705001, 0.117947325, 1, 1, 1, 1, 0, 2, 1, 0.0, 2.0015769386291495, 9); + void* var_13 = FCLayer_PROMISE(var_12, 0.0, 2.0015769386291495, dense_1_w, -0.042597745, 0.046707444, dense_1_b, -0.21937433, 0.2545502, 1, 0.0, 2.002361118793486, 9); + void* var_14 = FCLayer_PROMISE(var_13, 0.0, 2.002361118793486, dense_2_w, -0.32550547, 0.30829763, dense_2_b, -1.1787822, 1.2378151, -1, -18.251470546722413, 24.17363445281988, 9); + void* var_15 = tensorSoftmax(var_14); - uint8_t* labels = readLabelsBatch(labels_path.c_str(),start,end); + uint8_t* labels = readLabelsBatch(labels_path.c_str(),start,end); - float accuracy = computeAccuracy2(labels, batch_size, var_15); - final_accuracy += accuracy; + float accuracy = computeAccuracy2(labels, batch_size, var_15); + final_accuracy += accuracy; - if(shouldDumpClassConf){ + if(shouldDumpClassConf){ int relative_start = start - offset; int relative_end = end - offset; copyClassConfsAndLabels(var_15, classConfs, predictedLabels, relative_start, relative_end); - } + } - freeBatchMemory(); + freeBatchMemory(); - } + } - final_accuracy = final_accuracy / batch_count; - dumpFinalAccuracy(final_accuracy); + final_accuracy = final_accuracy / batch_count; + dumpFinalAccuracy(final_accuracy); - if (final_accuracy < bench_acc) - missed += 1; + if (final_accuracy < bench_acc) + missed += 1; - if(shouldDumpClassConf){ + if(shouldDumpClassConf){ int labels_start = offset; int labels_end = offset + test_input_size; uint32_t* goldLabels = readLabelsBatch3(labels32_path.c_str(), labels_start, labels_end); dumpClassConfsAndLabels(classConfs, predictedLabels, goldLabels, test_input_size); - } + } - // NOTE: Signal back to OpenTuner - signalPipeToOpenTuner(); - } + // NOTE: Signal back to OpenTuner + signalPipeToOpenTuner(); + } - dumpExecutionAccuracies(); + dumpExecutionAccuracies(); - llvm_hpvm_cleanupTensorRt(); + llvm_hpvm_cleanupTensorRt(); - return 0; + return 0; }