ci: Update SetDataFromShapeValues implementation after changing shape_values type#113
Merged
Merged
Conversation
yinggeh
commented
Jun 18, 2025
| @@ -1,4 +1,4 @@ | |||
| // Copyright 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |||
There was a problem hiding this comment.
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_);
mc-nv
approved these changes
Jun 18, 2025
mc-nv
pushed a commit
that referenced
this pull request
Jun 27, 2025
mc-nv
added a commit
that referenced
this pull request
Jun 28, 2025
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix patch for #112
Fixes
Pipeline: 30288199