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

Validating QAT Hardware Support before QAT Codecs are available #169

Merged

Conversation

sarthakaggarwal97
Copy link
Collaborator

@sarthakaggarwal97 sarthakaggarwal97 commented Jul 26, 2024

Description

Validates that we only load the QAT codecs if QAT library is loaded

Issues Resolved

#168

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@sarthakaggarwal97 sarthakaggarwal97 changed the title Calidating QAT Hardware support before making codecs available Validating QAT Hardware Support before QAT Codecs are available Jul 26, 2024
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Looks straightforward, thanks.

@mgodwan
Copy link
Member

mgodwan commented Jul 26, 2024

@sarthakaggarwal97 Thanks for the PR. Can we check if the SPI registered name is also blocked?

@sarthakaggarwal97 sarthakaggarwal97 force-pushed the validate-qat-codec branch 2 times, most recently from 45e8cda to 466968d Compare July 26, 2024 09:26
Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
@andrross
Copy link
Member

@sarthakaggarwal97 Should we memoize the result of this method into a static boolean? I think that value can't change for the life of the JVM so it should be okay to compute once and store in a static boolean.

Signed-off-by: Andrew Ross <andrross@amazon.com>
@andrross
Copy link
Member

@sarthakaggarwal97 Should we memoize the result of this method into a static boolean? I think that value can't change for the life of the JVM so it should be okay to compute once and store in a static boolean.

@sarthakaggarwal97 FYI I pushed a commit to do this

@sarthakaggarwal97
Copy link
Collaborator Author

@andrross thanks for the commit! looks good to me. We can proceed if you think PR is alright.

@andrross andrross merged commit 3ab314b into opensearch-project:main Jul 26, 2024
11 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/custom-codecs/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/custom-codecs/backport-2.x
# Create a new branch
git switch --create backport/backport-169-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3ab314b7b6e7a8f57d1fc4e565f97fa3104cfbde
# Push it to GitHub
git push --set-upstream origin backport/backport-169-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/custom-codecs/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-169-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.16 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/custom-codecs/backport-2.16 2.16
# Navigate to the new working tree
pushd ../.worktrees/custom-codecs/backport-2.16
# Create a new branch
git switch --create backport/backport-169-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3ab314b7b6e7a8f57d1fc4e565f97fa3104cfbde
# Push it to GitHub
git push --set-upstream origin backport/backport-169-to-2.16
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/custom-codecs/backport-2.16

Then, create a pull request where the base branch is 2.16 and the compare/head branch is backport/backport-169-to-2.16.

andrross pushed a commit to andrross/custom-codecs that referenced this pull request Jul 26, 2024
…search-project#169)

* validating QAT hardware support before making codecs available

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>

* Store result of `isQatAvailable` in static field

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit 3ab314b)
andrross pushed a commit to andrross/custom-codecs that referenced this pull request Jul 26, 2024
…search-project#169)

* validating QAT hardware support before making codecs available

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>

* Store result of `isQatAvailable` in static field

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit 3ab314b)
sarthakaggarwal97 added a commit that referenced this pull request Jul 26, 2024
#172)

* validating QAT hardware support before making codecs available

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>

* Store result of `isQatAvailable` in static field

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit 3ab314b)

Co-authored-by: Sarthak Aggarwal <sarthagg@amazon.com>
sarthakaggarwal97 added a commit that referenced this pull request Jul 26, 2024
#171)

* validating QAT hardware support before making codecs available

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>

* Store result of `isQatAvailable` in static field

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit 3ab314b)

Co-authored-by: Sarthak Aggarwal <sarthagg@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 26, 2024
#172)

* validating QAT hardware support before making codecs available

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>

* Store result of `isQatAvailable` in static field

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
Signed-off-by: Andrew Ross <andrross@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit 3ab314b)

Co-authored-by: Sarthak Aggarwal <sarthagg@amazon.com>
(cherry picked from commit 7f5181c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
sarthakaggarwal97 added a commit that referenced this pull request Jul 27, 2024
#172) (#173)

* validating QAT hardware support before making codecs available



* Store result of `isQatAvailable` in static field



---------




(cherry picked from commit 3ab314b)


(cherry picked from commit 7f5181c)

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sarthak Aggarwal <sarthagg@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants