Skip to content

Conversation

@yinggeh
Copy link
Contributor

@yinggeh yinggeh commented Jun 18, 2025

Fix patch for #112
Fixes

  • L0_trt_shape_tensors_shm--TensorRT
  • L0_trt_shape_tensors--TensorRT

Pipeline: 30288199

@yinggeh yinggeh requested a review from tanmayv25 June 18, 2025 02:00
@yinggeh yinggeh self-assigned this Jun 18, 2025
@yinggeh yinggeh added the bug Something isn't working label Jun 18, 2025
@yinggeh yinggeh marked this pull request as draft June 18, 2025 02:00
@yinggeh yinggeh changed the base branch from main to r25.06 June 18, 2025 02:00
@@ -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

@yinggeh yinggeh marked this pull request as ready for review June 18, 2025 04:42
@yinggeh yinggeh requested review from Copilot and mc-nv and removed request for Copilot June 18, 2025 04:43

This comment was marked as outdated.

@mc-nv mc-nv requested a review from Copilot June 18, 2025 05:22
Copy link

Copilot AI left a 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_);

@yinggeh yinggeh merged commit 4ea81cd into r25.06 Jun 18, 2025
1 check passed
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>
@yinggeh yinggeh deleted the yinggeh-DLIS-8361-fix-shape-tensor-segfault-2 branch July 28, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

3 participants