-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[IE CLDNN] Implement EmbeddingBag operations #623
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
Merged
vladimir-paramuzov
merged 1 commit into
openvinotoolkit:master
from
echuraev:feature/echuraev/embedding_bag
Jun 4, 2020
Merged
[IE CLDNN] Implement EmbeddingBag operations #623
vladimir-paramuzov
merged 1 commit into
openvinotoolkit:master
from
echuraev:feature/echuraev/embedding_bag
Jun 4, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please don't see on the first commit |
3d24531
to
c17f23a
Compare
Implemented three operations: EmbeddingBagPackedSum, EmbeddingBagOffsetsSum and EmbeddingSegmentsSum. These operations do the same work but have a different format of inputs. Details: - EmbeddingBagPackedSum - This is `EmbeddingBagOffsetsSum` with "bags" of equal size. If 3rd input is not provided, this operation is equivalent to *Gather* followed by *ReduceSum(axis=0)*. However, *EmbeddingBagPackedSum* is much more time and memory efficient than using a chain of these operations. - EmbeddingBagOffsetsSum - For each index in `indices` this operator gets values from `data` embedding table and sums all values belonging to each bag. Values in `offsets` define starting index in `indices` tensor of each "bag", e.g. `offsets` with value `[0,3,4,4,6]` define 5 "bags" containing `[3,1,0,2,n-6]` elements. - EmbeddingSegmentsSum - For each index in `indices` this operator gets values from `data` embedding table and sums all values belonging to each segment. Values in `segment_ids` define which segment index in `indices` tensor belong to, e.g. `segments_ids` with value `[0,0,0,1,1,3,5,5]` define 4 non empty segments other segments are empty, the number of segments is defined by `num_segments` input. JIRA: 29994
c17f23a
to
53b5e9c
Compare
vladimir-paramuzov
approved these changes
Jun 4, 2020
redradist
pushed a commit
to redradist/openvino
that referenced
this pull request
Oct 6, 2023
…#623) * Optimize SentencePiece tokenizer Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com> * Add validate_and_infer_types into the constructor Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com> * Add visitor and move SP model to Constant * Optimize cloning of SentencepieceTokenizer * Move to int64 and named output ports * Remove artefacts * Add documentation for the extensions --------- Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 9, 2025
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.11.1 to 6.1.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst">pytest-cov's changelog</a>.</em></p> <blockquote> <h2>6.1.1 (2025-04-05)</h2> <ul> <li>Fixed breakage that occurs when <code>--cov-context</code> and the <code>no_cover</code> marker are used together.</li> </ul> <h2>6.1.0 (2025-04-01)</h2> <ul> <li>Change terminal output to use full width lines for the coverage header. Contributed by Tsvika Shapira in <code>[#678](pytest-dev/pytest-cov#678) <https://github.com/pytest-dev/pytest-cov/pull/678></code>_.</li> <li>Removed unnecessary CovFailUnderWarning. Fixes <code>[#675](pytest-dev/pytest-cov#675) <https://github.com/pytest-dev/pytest-cov/issues/675></code>_.</li> <li>Fixed the term report not using the precision specified via <code>--cov-precision</code>.</li> </ul> <h2>6.0.0 (2024-10-29)</h2> <ul> <li>Updated various documentation inaccuracies, especially on subprocess handling.</li> <li>Changed fail under checks to use the precision set in the coverage configuration. Now it will perform the check just like <code>coverage report</code> would.</li> <li>Added a <code>--cov-precision</code> cli option that can override the value set in your coverage configuration.</li> <li>Dropped support for now EOL Python 3.8.</li> </ul> <h2>5.0.0 (2024-03-24)</h2> <ul> <li>Removed support for xdist rsync (now deprecated). Contributed by Matthias Reichenbach in <code>[#623](pytest-dev/pytest-cov#623) <https://github.com/pytest-dev/pytest-cov/pull/623></code>_.</li> <li>Switched docs theme to Furo.</li> <li>Various legacy Python cleanup and CI improvements. Contributed by Christian Clauss and Hugo van Kemenade in <code>[#630](pytest-dev/pytest-cov#630) <https://github.com/pytest-dev/pytest-cov/pull/630></code><em>, <code>[#631](pytest-dev/pytest-cov#631) <https://github.com/pytest-dev/pytest-cov/pull/631></code></em>, <code>[#632](pytest-dev/pytest-cov#632) <https://github.com/pytest-dev/pytest-cov/pull/632></code>_ and <code>[#633](pytest-dev/pytest-cov#633) <https://github.com/pytest-dev/pytest-cov/pull/633></code>_.</li> <li>Added a <code>pyproject.toml</code> example in the docs. Contributed by Dawn James in <code>[#626](pytest-dev/pytest-cov#626) <https://github.com/pytest-dev/pytest-cov/pull/626></code>_.</li> <li>Modernized project's pre-commit hooks to use ruff. Initial POC contributed by Christian Clauss in <code>[#584](pytest-dev/pytest-cov#584) <https://github.com/pytest-dev/pytest-cov/pull/584></code>_.</li> <li>Dropped support for Python 3.7.</li> </ul> <h2>4.1.0 (2023-05-24)</h2> <ul> <li>Updated CI with new Pythons and dependencies.</li> <li>Removed rsyncdir support. This makes pytest-cov compatible with xdist 3.0. Contributed by Sorin Sbarnea in <code>[#558](pytest-dev/pytest-cov#558) <https://github.com/pytest-dev/pytest-cov/pull/558></code>_.</li> <li>Optimized summary generation to not be performed if no reporting is active (for example, when <code>--cov-report=''</code> is used without <code>--cov-fail-under</code>). Contributed by Jonathan Stewmon in <code>[#589](pytest-dev/pytest-cov#589) <https://github.com/pytest-dev/pytest-cov/pull/589></code>_.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/9463242e3a7bc18a56b8f18c01b4dfb50087e5ed"><code>9463242</code></a> Bump version: 6.1.0 → 6.1.1</li> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/7f2781b47fc9bd4a8e94ff86b4f69f5959c3d907"><code>7f2781b</code></a> Update changelog.</li> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/a59548f3adcb757ea8afcb40d8d849af49f6e925"><code>a59548f</code></a> Allow the context plugin to check if the controller is running or not. Fixes ...</li> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/10f8cde38c3b0aaf2c75d9ed62d4f333d8809d96"><code>10f8cde</code></a> Bump version: 6.0.0 → 6.1.0</li> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/10b14afffcd53b19967785c0b3e8b35ebac70b6f"><code>10b14af</code></a> Update changelog.</li> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/aa57aed273475b4f9975cc9a8a1662b336718662"><code>aa57aed</code></a> Refactor a bit the internals to be a bit less boilerplatey and have more clar...</li> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/e760099a7fd5f49c235dc798bf7f222c0372b7e3"><code>e760099</code></a> Make sure the CLI precision is used when creating report. Fixes <a href="https://redirect.github.com/pytest-dev/pytest-cov/issues/674">#674</a>.</li> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/44540e1e9f02f3b69b62834636cf3057edc960d6"><code>44540e1</code></a> Remove unnecessary CovFailUnderWarning. Closes <a href="https://redirect.github.com/pytest-dev/pytest-cov/issues/675">#675</a>.</li> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/204af146f8f4ff03076825a693ee6aef587deb6b"><code>204af14</code></a> Update changelog.</li> <li><a href="https://github.com/pytest-dev/pytest-cov/commit/089e7bb5c16dcfdedd54f27fda094ccb3eeaae2c"><code>089e7bb</code></a> Upgrade ruff.</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-cov/compare/v2.11.1...v6.1.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> Co-authored-by: Alina Kladieva <alina.kladieva@intel.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented three operations: EmbeddingBagPackedSum,
EmbeddingBagOffsetsSum and EmbeddingSegmentsSum. These operations do
the same work but have a different format of inputs.
Details:
EmbeddingBagOffsetsSum
with "bags"of equal size. If 3rd input is not provided, this operation is
equivalent to Gather followed by ReduceSum(axis=0). However,
EmbeddingBagPackedSum is much more time and memory efficient than
using a chain of these operations.
indices
this operatorgets values from
data
embedding table and sums all values belongingto each bag. Values in
offsets
define starting index inindices
tensor of each "bag", e.g.
offsets
with value[0,3,4,4,6]
define 5"bags" containing
[3,1,0,2,n-6]
elements.indices
this operator getsvalues from
data
embedding table and sums all values belonging toeach segment. Values in
segment_ids
define which segment index inindices
tensor belong to, e.g.segments_ids
with value[0,0,0,1,1,3,5,5]
define 4 non empty segments other segments areempty, the number of segments is defined by
num_segments
input.JIRA: 29994