-
Notifications
You must be signed in to change notification settings - Fork 33
ci: Update SetDataFromShapeValues implementation after changing shape_values type #113
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
Conversation
| @@ -1,4 +1,4 @@ | |||
| // Copyright 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the SetDataFromShapeValues implementation after changing the shape_values type to correctly handle data conversion. Key changes include updating the copyright year and modifying the conversion logic in the INT32 and INT64 branches.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/shape_tensor.h | Updated the copyright to reflect the new year range |
| src/shape_tensor.cc | Modified data conversion: INT32 now uses a loop conversion with casting while INT64 uses memcpy |
Comments suppressed due to low confidence (2)
src/shape_tensor.cc:102
- The INT32 branch now uses a loop with casting instead of memcpy. Please add a comment to clarify why element-wise conversion is necessary here compared to the memcpy usage in the INT64 branch.
for (size_t i = 0; i < nb_shape_values_; ++i) {
src/shape_tensor.cc:109
- Ensure that using memcpy for the INT64 branch is safe given the new shape_values type; consider adding a brief comment to explain this decision.
std::memcpy(data_ptr, shape_values, size_);
* ci: Fix shape tensor segfault * ci: Update SetDataFromShapeValues implementation after changing shape_values type (#113) --------- Co-authored-by: Yingge He <157551214+yinggeh@users.noreply.github.com>
Fix patch for #112
Fixes
Pipeline: 30288199