Skip to content

Commit

Permalink
Fix OSL issue due to PA not removing first 4 bytes from output
Browse files Browse the repository at this point in the history
  • Loading branch information
lkomali committed Jan 9, 2025
1 parent 14b4610 commit 2441ba8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/client_backend/triton_c_api/triton_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1048,10 +1048,6 @@ TritonLoader::GetOutputs(

std::string data_type{datatype};
std::vector<uint8_t> data_copy;
if (data_type == "BYTES" && byte_size >= 4) {
base = static_cast<const uint8_t*>(base) + 4;
byte_size -= 4;
}

if (memory_type == TRITONSERVER_MEMORY_GPU) {
CUDARuntimeLibraryManager cuda_manager;
Expand Down
4 changes: 4 additions & 0 deletions src/infer_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ InferContext::GetOutputs(const cb::InferResult& infer_result)
std::vector<uint8_t> buf{};
infer_result.RawData(requested_output->Name(), buf);

if (data_type == "BYTES" && buf.size() >= 4) {
buf.erase(buf.begin(), buf.begin() + 4);
}

output.emplace(
requested_output->Name(), RecordData(std::move(buf), data_type));
}
Expand Down

0 comments on commit 2441ba8

Please sign in to comment.