Skip to content

Commit

Permalink
Clean up debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDuplensky committed Nov 29, 2024
1 parent d20d58f commit cef7bc6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//

#include "openvino/core/type/element_type.hpp"
#include "ov_ops/fully_connected.hpp"
#include "convert_matmul_to_fc.hpp"
#include "openvino/op/matmul.hpp"
Expand Down Expand Up @@ -152,12 +153,12 @@ ov::intel_cpu::ConvertMatMulToFC::ConvertMatMulToFC() {
fc_input_b = convert;
}

auto bias_ph = std::make_shared<ov::op::v0::Constant>(element::undefined, Shape{0});
new_ops.push_back(bias_ph);
auto bias = std::make_shared<ov::op::v0::Constant>(element::undefined, Shape{0});
new_ops.push_back(bias);

auto fc = std::make_shared<ov::op::internal::FullyConnected>(fc_input_a,
fc_input_b,
bias_ph,
bias,
matmul->get_output_element_type(0));

fc->set_friendly_name(matmul->get_friendly_name());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ inline void ConvertToCPUSpecificOpset(std::shared_ptr<ov::Model> &model, const C
ov::pass::Manager manager("CPU:ConvertToCPUSpecificOpset");
manager.set_per_pass_validation(false);

// CPU_REGISTER_PASS_COMMON(manager, AlignMatMulInputRanks);
CPU_REGISTER_PASS_COMMON(manager, ConvertMatMulToFC);
if (std::getenv("EXTRA_DUMP")) {
manager.run_passes(model);
ov::pass::Serialize("after_fc.xml", "/dev/null").run_on_model(model);
CPU_DISABLE_PASS_COMMON(manager, ConvertMatMulToFC);
}

CPU_REGISTER_PASS_COMMON(manager, FullyConnectedBiasFusion);

std::vector<ov::element::Type> supported_activation_types {
Expand Down Expand Up @@ -70,12 +63,6 @@ inline void ConvertToCPUSpecificOpset(std::shared_ptr<ov::Model> &model, const C
});

CPU_REGISTER_PASS_X64(manager, pass::ConvertFCToFCQuantizedLegacy);
if (std::getenv("EXTRA_DUMP")) {
manager.run_passes(model);
ov::pass::Serialize("after_fc_quantized.xml", "/dev/null").run_on_model(model);
CPU_DISABLE_PASS_COMMON(manager, ConvertMatMulToFC);
}

CPU_REGISTER_PASS_X64(manager, MoveFCReshapeToWeights);
CPU_REGISTER_PASS_X64(manager, ov::pass::Validate);
CPU_REGISTER_PASS_COMMON(manager, AlignMatMulInputRanks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ endif()
endfunction()

if(ENABLE_CPU_SPECIFIC_TARGET_PER_TEST)
create_target_per_test_for_directory(${CMAKE_CURRENT_SOURCE_DIR}/custom/subgraph_tests/src ov_cpu_func_subgraph)
create_target_per_test_for_directory(${CMAKE_CURRENT_SOURCE_DIR}/custom/subgraph_tests/src/x64 ov_cpu_func_subgraph_x64)
create_target_per_test_for_directory(${CMAKE_CURRENT_SOURCE_DIR}/custom/subgraph_tests/src/common ov_cpu_func_subgraph_common)
create_target_per_test_for_directory(${CMAKE_CURRENT_SOURCE_DIR}/custom/subgraph_tests/src ov_cpu_func_subgraph)
create_target_per_test_for_directory(${CMAKE_CURRENT_SOURCE_DIR}/custom/single_layer_tests ov_cpu_func_slt)
endif()

Expand Down

0 comments on commit cef7bc6

Please sign in to comment.