Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/shape_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ ShapeTensor::SetDataFromShapeValues(
datatype_ = ShapeTensorDataType::INT32;
data_.reset(new char[size_]);
int32_t* data_ptr = reinterpret_cast<int32_t*>(data_.get());
std::memcpy(data_ptr, shape_values, size_);
for (size_t i = 0; i < nb_shape_values_; ++i) {
data_ptr[i] = static_cast<int32_t>(shape_values[i]);
}
} else if (datatype == TRITONSERVER_DataType::TRITONSERVER_TYPE_INT64) {
datatype_ = ShapeTensorDataType::INT64;
data_.reset(new char[size_]);
int64_t* data_ptr = reinterpret_cast<int64_t*>(data_.get());
for (size_t i = 0; i < nb_shape_values_; ++i) {
data_ptr[i] = static_cast<int64_t>(shape_values[i]);
}
std::memcpy(data_ptr, shape_values, size_);
} else {
return TRITONSERVER_ErrorNew(
TRITONSERVER_ERROR_INVALID_ARG,
Expand Down
2 changes: 1 addition & 1 deletion src/shape_tensor.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Forgot to update copyrights in #112

// Copyright 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
Expand Down