Skip to content

Conversation

aobolensk
Copy link
Contributor

Details:

Fix snippets headers exclusion from 'misc-include-cleaner' clang-tidy checks

Tickets:

  • N/A

@aobolensk aobolensk requested review from a team as code owners September 10, 2025 06:19
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Sep 10, 2025
}

const auto& loops = linear_ir.get_loop_manager()->get_map();
const lowered::LoopManagerPtr& loop_manager = linear_ir.get_loop_manager();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain why do we have to specify types in such cases? Is it clang-tidy limitation/bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, clang-tidy thinks that the header is unneeded because auto is being used and this type is nit being properly inferred for some reason

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding LoopManagerPtr: I noticed that this using is duplicated in linear_ir.hpp. Can it be the root cause of such clang-tidy behavior?

Copy link
Contributor Author

@aobolensk aobolensk Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. I have tried it, but these things are not related. I have removed using for one case, but the problem when header is considered missing, but after removal compilation fails due to error: member access into incomplete type 'element_type' (aka 'ov::snippets::lowered::LoopManager') is still happening


// Before code gen we have to reset KernelExecutor Table - it should be empty
target->get_runtime_configurator()->reset_kernel_executor_table();
const std::shared_ptr<ov::snippets::RuntimeConfigurator>& runtime_configurator = target->get_runtime_configurator();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can class RuntimeConfigurator; forward declaration in target_machine.hpp be a reason why clang-tidy supposes we don't need runtime_configurator.hpp header here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error: member access into incomplete type 'element_type' (aka 'ov::snippets::RuntimeConfigurator') [clang-diagnostic-error]
   55 |     target->get_runtime_configurator()->reset_kernel_executor_table();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for the next occurrence on the line 91

@aobolensk aobolensk closed this Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants