Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GPU] Revised unique ID setting scheme. #10548

Merged

Conversation

yeonbok
Copy link
Contributor

@yeonbok yeonbok commented Feb 21, 2022

Details:

Revised unique ID setting scheme. Previously it was using program id to distinguish the loop body networks' id.
However, it results in cl cache miss for same network loaded multiple time, because program ids are differnt.
Now revised it to use parent primitive id instead of program_id for unique id of nodes in body networks.

Tickets:

  • 79614

@yeonbok yeonbok requested review from a team as code owners February 21, 2022 05:38
@openvino-pushbot openvino-pushbot added the category: GPU OpenVINO GPU plugin label Feb 21, 2022
@yeonbok yeonbok changed the title Revised unique ID setting scheme. [GPU] Revised unique ID setting scheme. Feb 21, 2022
@yeonbok yeonbok added this to the 2022.1 milestone Feb 21, 2022
@yeonbok yeonbok force-pushed the taylor_fix_entry_point branch from 9f4c366 to 46f9abb Compare February 21, 2022 05:46
if (myprog.get_parent_primitive() != "") {
auto loop_prim = myprog.get_parent_primitive();
std::replace(loop_prim.begin(), loop_prim.end(), '/', '_');
std::replace(loop_prim.begin(), loop_prim.end(), ':', '_');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think those two are not the only prohibited symbols for kernel name... Is it possible to use processing ID of parent primitive instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no processing id -like thing currently, but I was thinking of changing this to be "body_network_id" like thing, how do you think?
I.e.,

  • Let the program have body_prog_id (e.g., if the program has 3 loops, ids 0-2 exists for that program)
  • when build_body_network, set the body_prog_id
  • Use it in its unique_id

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just decided to use unique_id as a temporally generated number same as the original behavior to make it simple. I tried the above mentioned impl but thought again, there are too many "_id"s .. maybe it will be better to let the program have parent / body impl more structured way. However at this moment it is only needed for distinguish the entry point, no other usage for them. Please take a look..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I am gonna revert the changes w.r.t the parent_id things, too, soon

…to distinguish the loop body networks' id.

However, it results in cl cache miss for same network loaded multiple time, because program ids are differnt.
Now revised it to use parent primitive id instead of program_id for unique id of nodes in body networks.
@yeonbok yeonbok force-pushed the taylor_fix_entry_point branch from 5d3cf09 to 4afc08a Compare February 21, 2022 15:47
@yeonbok yeonbok requested review from a team and vladimir-paramuzov February 21, 2022 15:47
@vladimir-paramuzov vladimir-paramuzov merged commit 746b77c into openvinotoolkit:master Feb 22, 2022
kelvinchoi-intel pushed a commit to kelvinchoi-intel/openvino that referenced this pull request Mar 17, 2022
* Revised unique ID setting scheme. Previously it was using program id to distinguish the loop body networks' id.
However, it results in cl cache miss for same network loaded multiple time, because program ids are differnt.
Now revised it to use parent primitive id instead of program_id for unique id of nodes in body networks.

* Revised adding unique_id to entry points to have a temporal number as unique id

* Revert the canceld change

* Added test to check whether two networks loaded from same function creates same cl cache
yeonbok added a commit to yeonbok/openvino that referenced this pull request Mar 17, 2022
* Revised unique ID setting scheme. Previously it was using program id to distinguish the loop body networks' id.
However, it results in cl cache miss for same network loaded multiple time, because program ids are differnt.
Now revised it to use parent primitive id instead of program_id for unique id of nodes in body networks.

* Revised adding unique_id to entry points to have a temporal number as unique id

* Revert the canceld change

* Added test to check whether two networks loaded from same function creates same cl cache

Co-authored-by: Taylor Yeonbok Lee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: GPU OpenVINO GPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants