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

Validate the memory requested for the infer request is not out of bounds #7083

Merged
merged 11 commits into from
Apr 12, 2024

Conversation

jbkyang-nvi
Copy link
Contributor

@jbkyang-nvi jbkyang-nvi commented Apr 8, 2024

Previously in #6914 we checked out of bounds offset for shared memory requests. This PR updates to a more comprehensive test of verifying that the block of memory is in fact in bounds.
Client change: triton-inference-server/client#565

@jbkyang-nvi jbkyang-nvi requested review from Tabrizian and kthui April 8, 2024 17:28
qa/L0_shared_memory/shared_memory_test.py Outdated Show resolved Hide resolved
qa/L0_shared_memory/shared_memory_test.py Outdated Show resolved Hide resolved
Copy link
Contributor

@kthui kthui left a comment

Choose a reason for hiding this comment

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

LGTM! apart from things @Tabrizian pointed out

@jbkyang-nvi jbkyang-nvi changed the title validate shm byte size Validate the memory requested for the infer request is not out of bounds Apr 10, 2024
qa/L0_shared_memory/test.sh Show resolved Hide resolved
qa/L0_shared_memory/test.sh Outdated Show resolved Hide resolved
@jbkyang-nvi jbkyang-nvi requested review from Tabrizian and kthui April 10, 2024 23:06
@@ -295,7 +317,7 @@ def test_too_big_shm(self):
def test_mixed_raw_shm(self):
# Mix of shared memory and RAW inputs
error_msg = []
shm_handles = self._configure_sever()
shm_handles = self._configure_sever(shm_byte_size=256)
Copy link
Contributor

Choose a reason for hiding this comment

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

My PR will have some conflicts with this PR, but you should be able to use the create_byte_size and register_byte_size args in the same way. Let me know if you're good with it: #7093

Copy link
Contributor

Choose a reason for hiding this comment

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

Francesco's PR will also likely have some merge conflicts: #7048

Tabrizian
Tabrizian previously approved these changes Apr 11, 2024
kthui
kthui previously approved these changes Apr 11, 2024
@jbkyang-nvi jbkyang-nvi dismissed stale reviews from kthui and Tabrizian via 2ba988a April 12, 2024 00:22
@jbkyang-nvi jbkyang-nvi merged commit 9140bba into main Apr 12, 2024
3 checks passed
@jbkyang-nvi jbkyang-nvi deleted the kyang-validate-shm-byte-size branch April 12, 2024 18:23
jbkyang-nvi added a commit to triton-inference-server/client that referenced this pull request Apr 12, 2024
@@ -292,7 +328,7 @@ def test_too_big_shm(self):
def test_mixed_raw_shm(self):
# Mix of shared memory and RAW inputs
error_msg = []
shm_handles = self._configure_sever(shm_byte_size=256)
shm_handles = self._configure_server()
Copy link
Contributor

@rmccorm4 rmccorm4 Apr 12, 2024

Choose a reason for hiding this comment

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

Was this supposed to have a value of 256 passed to it? or doesn't matter for this test case?

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 think it was only needed because I had a bug so I removed it..

jbkyang-nvi added a commit that referenced this pull request Apr 12, 2024
…nds (#7083)

Validate that memory offset and byte size requested is not out of bounds 
of registered memory. 
Previously in #6914 we checked out of bounds offset for shared memory
requests. This PR also adds more testing to verify the block of memory 
is in fact in bounds.
Client change: triton-inference-server/client#565
jbkyang-nvi added a commit to triton-inference-server/client that referenced this pull request Apr 12, 2024
mc-nv pushed a commit to triton-inference-server/client that referenced this pull request Apr 12, 2024
mc-nv pushed a commit that referenced this pull request Apr 12, 2024
…nds (#7083) (#7111)

Validate that memory offset and byte size requested is not out of bounds 
of registered memory. 
Previously in #6914 we checked out of bounds offset for shared memory
requests. This PR also adds more testing to verify the block of memory 
is in fact in bounds.
Client change: triton-inference-server/client#565
jbkyang-nvi added a commit that referenced this pull request Apr 19, 2024
fpetrini15 pushed a commit to triton-inference-server/perf_analyzer that referenced this pull request Jun 26, 2024
fpetrini15 pushed a commit to triton-inference-server/perf_analyzer that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants