Skip to content

Commit

Permalink
code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnyoung-paul committed Feb 3, 2025
1 parent e46b537 commit 754456a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
17 changes: 4 additions & 13 deletions src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,18 +456,6 @@ void TransformationsPipeline::apply(std::shared_ptr<ov::Model> func) {

manager.register_pass<ov::pass::CommonOptimizations>();

{ // To convert to f16 input to boolean which is converted to u8, add abs + ceiling + clamp before convert.
type_to_fuse_map type_to_fuse = {{ov::opset10::Convert::get_type_info_static(), fuse_type_to_convert}};
precisions_map convert_precision_map = {{ov::element::boolean, ov::element::u8}};
manager.register_pass<ov::pass::ConvertPrecision>(convert_precision_map,
type_to_fuse,
false,
false,
false);

manager.register_pass<ov::pass::EliminateConvert>();
}

pass_config->set_callback<ov::pass::ScaledDotProductAttentionDecomposition>([&](const std::shared_ptr<const ov::Node> node){
GPU_DEBUG_IF(cldnn::debug_configuration::get_instance()->enable_sdpa != -1) {
GPU_DEBUG_CODE(return cldnn::debug_configuration::get_instance()->enable_sdpa == 1);
Expand Down Expand Up @@ -571,8 +559,11 @@ void TransformationsPipeline::apply(std::shared_ptr<ov::Model> func) {

manager.register_pass<ov::pass::Validate>();
const bool keep_precision_sensitive_in_fp32_2 = true;

// To convert to f16 input to boolean which is converted to u8, add abs + ceiling + clamp before convert.
type_to_fuse_map type_to_fuse = {{ov::opset10::Convert::get_type_info_static(), fuse_type_to_convert}};
manager.register_pass<ov::pass::ConvertPrecision>(int_convert_precision_map,
empty_fuse_map,
type_to_fuse,
keep_precision_sensitive_in_fp32_2,
convert_input_output_precision);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include <vector>

#include "gtest/gtest.h"
#include "common_test_utils/test_constants.hpp"
#include "common_test_utils/data_utils.hpp"
#include "common_test_utils/ov_tensor_utils.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class ConvertToBooleanLayerTest : public ConversionLayerTest {
};

} // namespace test
} // namespace ov
} // namespace ov

0 comments on commit 754456a

Please sign in to comment.