Skip to content

Commit

Permalink
Avoid duplication
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Jankowski <tomasz1.jankowski@intel.com>
  • Loading branch information
t-jankowski committed Feb 11, 2025
1 parent 98895b5 commit 79368e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@ TEST_P(SDPAToPATest, SDPAToPA_Baichuan2_13b_General) {
}
}

// clang-format off
TEST_P(SDPAToPATest, SDPAToPA_nanoLLaVA_General) {
{
auto beam_idx = make_param(PartialShape{DYN}, element::i32, "beam_idx");
Expand Down
9 changes: 2 additions & 7 deletions src/core/include/openvino/core/type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,8 @@ typename std::enable_if_t<
decltype(std::declval<std::shared_ptr<From>>()->get_type_info().is_castable(To::get_type_info_static())),
bool>,
bool>
is_type(std::shared_ptr<From> ptr) {
if constexpr (compile::use_ov_dynamic_cast<From>()) {
return ptr && ptr->get_type_info().is_castable(To::get_type_info_static());
} else {
static_assert(!std::is_volatile_v<To> && !std::is_volatile_v<From>, "is_type does not support volatile types");
return dynamic_cast<std::add_const_t<To>*>(ptr.get()) != nullptr;
}
is_type(const std::shared_ptr<From>& ptr) {
return is_type<To>(ptr.get());
}

/// Casts a Value* to a Type* if it is of type Type, nullptr otherwise
Expand Down

0 comments on commit 79368e7

Please sign in to comment.