Skip to content

[CPU] StackAllocator for JIT kernels#13790

Closed
lohika-vmostovy wants to merge 25 commits into
openvinotoolkit:masterfrom
lohika-vmostovy:feature/dekotov_stack_allocator
Closed

[CPU] StackAllocator for JIT kernels#13790
lohika-vmostovy wants to merge 25 commits into
openvinotoolkit:masterfrom
lohika-vmostovy:feature/dekotov_stack_allocator

Conversation

@lohika-vmostovy
Copy link
Copy Markdown

This PR is a clone of #13132 and is intended to be merged instead, because we don't have an option to modify original PR.
All commits from original PR are preserved without any modification.
Additional commits are added on top in order to address PR comments.

Comment thread src/plugins/intel_cpu/tests/unit/nodes/kernels/stack_allocator.cpp Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have a time to comment on this renaming ...

As for me this name RegAddress raise more questions ...
What does it mean to have address of register ?

This renaming provide inconsistency with RegisterPool::Reg<...>
With previous name it was possible to write the general helper function like this:

template <typename TAllocator, typename TReg>
void custom_gather(TAllocator::Reg<TReg>& arg0, ...) {
   ...
}

But with such naming convention it is not possible ...
Anyway as for me it is enough to have prefix before class name that describe where it was allocated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What does it mean to have address of register ?

This means the address of a data block of a certain register type size.

With previous name it was possible to write the general helper function like this:

The problem is that the StackAllocator::Reg is not the same entity as RegisterPool::Reg since it is not a hardware register, but an memory address, with completely different access metrics (latency could be equal to DRAM access time in a worst case), so it should not be used interchangeably by default, but only intentionally when the developer understand all the drawbacks. So such generic templated code may lead to unexpected performance drop due to memory access instead of register, but it would not be obvious from the source code. That is why, at least in my understanding, we should highlight this difference using slightly different name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think StackAllocator:: prefix is enough.
Anyway as for me this renaming is very subjective ...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Such change make it inconsistent with namespace x64 = dnnl::impl::cpu::x64; in RegisterPool file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually that would be great to get read of this alias in RegisterPool as well, just to avoid possible namespace conflicts, but in case of RegisterPool it is so tightly coupled with cpu_isa_t, that we should leave it for a while ad try to address this issue on the jit_base level.

@lohika-vmostovy lohika-vmostovy force-pushed the feature/dekotov_stack_allocator branch from d182e8a to 8291200 Compare November 3, 2022 09:49
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread src/plugins/intel_cpu/src/nodes/kernels/stack_allocator.hpp Outdated
@lohika-vmostovy lohika-vmostovy force-pushed the feature/dekotov_stack_allocator branch from 8291200 to 0a6d50a Compare November 3, 2022 23:14
@lohika-vmostovy
Copy link
Copy Markdown
Author

@maxnick ci/jenkins, build_macos_release and build_ubuntu20_release jobs are failing. I have no permissions to see logs and try to fix them. Could you please take a look on those jobs and give me some insights?

@lohika-vmostovy lohika-vmostovy force-pushed the feature/dekotov_stack_allocator branch from 0a6d50a to 68e5f7b Compare November 4, 2022 16:04
@ceciliapeng2011
Copy link
Copy Markdown
Contributor

ceciliapeng2011 commented Nov 5, 2022

@maxnick ci/jenkins, build_macos_release and build_ubuntu20_release jobs are failing. I have no permissions to see logs and try to fix them. Could you please take a look on those jobs and give me some insights?

@lohika-vmostovy I will help on this build. It is a known issue of CI, fixing is on the way. Will let you know once it is merged. Yaroslav can also get CI logs and retirgger via VPN.

@lohika-vmostovy lohika-vmostovy force-pushed the feature/dekotov_stack_allocator branch from 68e5f7b to b8f94d5 Compare November 6, 2022 12:49
@lohika-vmostovy lohika-vmostovy force-pushed the feature/dekotov_stack_allocator branch from b8f94d5 to 7546c42 Compare November 7, 2022 22:12
@dmitry-gorokhov dmitry-gorokhov added this to the 2023.0 milestone Dec 23, 2022
@ilya-lavrenov ilya-lavrenov modified the milestones: 2023.0, 2023.1 Apr 24, 2023
@akladiev
Copy link
Copy Markdown
Collaborator

This PR will be closed in 2 weeks in case of no activity.

@akladiev akladiev added the Stale label May 11, 2023
@akladiev
Copy link
Copy Markdown
Collaborator

This PR was closed because it has been stalled for 2 week with no activity.

@akladiev akladiev closed this May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: CPU OpenVINO CPU plugin ExternalPR External contributor Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants