@@ -377,7 +377,7 @@ void build_graph(it_lab_ai::Tensor& input, it_lab_ai::Tensor& output,
377377}
378378
379379ParseResult parse_json_model (const std::string& json_path, bool comments,
380- bool parallel, bool use_onednn ) {
380+ bool parallel, bool onednn ) {
381381 ParseResult result;
382382
383383 auto & layers = result.layers ;
@@ -495,15 +495,15 @@ ParseResult parse_json_model(const std::string& json_path, bool comments,
495495 } else if (layer_type.find (" Relu" ) != std::string::npos ||
496496 layer_type.find (" relu" ) != std::string::npos) {
497497 std::shared_ptr<it_lab_ai::Layer> ew_layer;
498- if (use_onednn ) {
498+ if (onednn ) {
499499 ew_layer = std::make_shared<it_lab_ai::EWLayer_oneDNN>(" relu" );
500500 } else {
501501 ew_layer = std::make_shared<it_lab_ai::EWLayer>(" relu" );
502502 }
503503 layer = ew_layer;
504504 } else if (layer_type.find (" Sigmoid" ) != std::string::npos) {
505505 std::shared_ptr<it_lab_ai::Layer> ew_layer;
506- if (use_onednn ) {
506+ if (onednn ) {
507507 ew_layer = std::make_shared<it_lab_ai::EWLayer_oneDNN>(" sigmoid" );
508508 } else {
509509 ew_layer = std::make_shared<it_lab_ai::EWLayer>(" sigmoid" );
@@ -733,7 +733,7 @@ ParseResult parse_json_model(const std::string& json_path, bool comments,
733733 if (layer_type == " Mul" ) {
734734 ew_operation = " linear" ;
735735 std::shared_ptr<it_lab_ai::Layer> ew_layer;
736- if (use_onednn ) {
736+ if (onednn ) {
737737 ew_layer = std::make_shared<it_lab_ai::EWLayer_oneDNN>(
738738 ew_operation, value, 0 .0F );
739739 } else {
@@ -744,7 +744,7 @@ ParseResult parse_json_model(const std::string& json_path, bool comments,
744744 } else if (layer_type == " Add" ) {
745745 ew_operation = " linear" ;
746746 std::shared_ptr<it_lab_ai::Layer> ew_layer;
747- if (use_onednn &&
747+ if (onednn &&
748748 it_lab_ai::EWLayer_oneDNN::is_function_supported (" linear" )) {
749749 ew_layer = std::make_shared<it_lab_ai::EWLayer_oneDNN>(
750750 ew_operation, 1 .0F , value);
@@ -756,7 +756,7 @@ ParseResult parse_json_model(const std::string& json_path, bool comments,
756756 } else if (layer_type == " Sub" ) {
757757 ew_operation = " linear" ;
758758 std::shared_ptr<it_lab_ai::Layer> ew_layer;
759- if (use_onednn &&
759+ if (onednn &&
760760 it_lab_ai::EWLayer_oneDNN::is_function_supported (" linear" )) {
761761 ew_layer = std::make_shared<it_lab_ai::EWLayer_oneDNN>(
762762 ew_operation, 1 .0F , -value);
0 commit comments