Skip to content
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

Return TensorLayout by const-reference. #5730

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Nov 29, 2024

Category:

Refactoring (Redesign of existing code that doesn't affect functionality)

Description:

To facilitate representation of the TensorLayout in C API as a simple const char *, the layout query functions in TensorList should return a pointer to a persistent storage. In this case, we can simply return the c_str() of the TensorLayout stored inside a Tensor(List).

Additional information:

Affected modules and functionalities:

All and nothing :) This is a small change and should not affect client code, but cases a massive rebuild.

Key points relevant for the review:

Tests:

All tests that use layouts - which is pretty much everything in Python and lots of GTests.

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [20928014]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [20928014]: BUILD PASSED

@mzient mzient merged commit deddbf6 into NVIDIA:main Nov 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants