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

Update shared memory bound checking for infer requests #565

Merged
merged 9 commits into from
Apr 12, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,8 @@ TritonLoader::Infer(
TRITONSERVER_MemoryType memory_type;
int64_t memory_type_id;
RETURN_IF_ERROR(shm_manager_->GetMemoryInfo(
shm_name, offset, &buf, &memory_type, &memory_type_id));
shm_name, offset, shm_byte_size, &buf, &memory_type,
jbkyang-nvi marked this conversation as resolved.
Show resolved Hide resolved
&memory_type_id));

alloc_payload.output_map_.emplace(
std::piecewise_construct, std::forward_as_tuple(output->Name()),
Expand Down Expand Up @@ -1149,7 +1150,8 @@ TritonLoader::AddInputs(
TRITONSERVER_MemoryType memory_type;
int64_t memory_type_id;
RETURN_IF_ERROR(shm_manager_->GetMemoryInfo(
shm_name, offset, &buf, &memory_type, &memory_type_id));
shm_name, offset, shm_byte_size, &buf, &memory_type,
&memory_type_id));
RETURN_IF_TRITONSERVER_ERROR(
inference_request_append_input_data_fn_(
irequest, input_name, buf, byte_size,
Expand Down
Loading