Skip to content

Commit

Permalink
remove redundant class
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-esir committed Aug 13, 2023
1 parent a8934af commit 5b559cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,4 @@ class TRANSFORMATIONS_API DisableFP16Compression : public RuntimeAttribute {
}
};

/**
* @ingroup ie_runtime_attr_api
* @brief PostponedFP16Compression class represents runtime info attribute that marks operation
* as prohibitted to convert to FP16 as part of Compressed Only format.
*/
class TRANSFORMATIONS_API PostponedFP16Compression : public RuntimeAttribute {
public:
OPENVINO_RTTI("postponed_fp16_compression", "0");

PostponedFP16Compression() = default;

bool is_copyable() const override {
return false;
}
};

} // namespace ov
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#include "transformations/rt_info/disable_fp16_compression.hpp"

namespace {
const std::string& postponed_fp16_compression_tag = "postponed_fp16_compression";
}

void ov::disable_fp16_compression(const std::shared_ptr<Node>& node) {
auto& rt_info = node->get_rt_info();
rt_info[DisableFP16Compression::get_type_info_static()] = DisableFP16Compression{};
Expand All @@ -20,13 +24,13 @@ bool ov::fp16_compression_is_disabled(const std::shared_ptr<const Node>& node) {
}

void ov::postpone_fp16_compression(ov::RTMap& rt_info) {
rt_info[PostponedFP16Compression::get_type_info_static()] = PostponedFP16Compression{};
rt_info[postponed_fp16_compression_tag] = true;
}

bool ov::is_fp16_compression_postponed(const ov::RTMap& rt_info) {
return rt_info.count(PostponedFP16Compression::get_type_info_static());
return rt_info.count(postponed_fp16_compression_tag);
}

void ov::do_not_postpone_fp16_compression(ov::RTMap& rt_info) {
rt_info.erase(PostponedFP16Compression::get_type_info_static());
rt_info.erase(postponed_fp16_compression_tag);
}

0 comments on commit 5b559cf

Please sign in to comment.