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

Avoid a copy of ExpressionEvaluator. #3831

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Avoid a copy of ExpressionEvaluator. #3831

wants to merge 1 commit into from

Conversation

wujingyue
Copy link
Collaborator

No description provided.

@wujingyue
Copy link
Collaborator Author

!test

Copy link

github-actions bot commented Feb 5, 2025

Description

  • Changed ExpressionEvaluator to const ExpressionEvaluator& in tensor_metadata.cpp

  • Updated function signature in tensor_metadata.h


Changes walkthrough 📝

Relevant files
Enhancement
tensor_metadata.cpp
Use const reference for ExpressionEvaluator                           

csrc/tensor_metadata.cpp

  • Changed ExpressionEvaluator& to const ExpressionEvaluator& in
    ForwardTraverseFromLogicalToAlloc constructor
  • Changed ExpressionEvaluator& to const ExpressionEvaluator& in
    BackwardTraverseFromLogicalToAlloc constructor
  • Changed ExpressionEvaluator to const ExpressionEvaluator& in
    inferAndValidateAllocationSizesAndStrides function
  • +5/-5     
    tensor_metadata.h
    Update function signature for ExpressionEvaluator               

    csrc/tensor_metadata.h

  • Changed ExpressionEvaluator to const ExpressionEvaluator& in
    inferAndValidateAllocationSizesAndStrides function
  • +1/-1     

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🧪 No relevant tests
    ⚡ Recommended focus areas for review

    Const Reference

    The change from ExpressionEvaluator& to const ExpressionEvaluator& should be validated to ensure that no modifications are attempted on the ExpressionEvaluator object within the methods.

    const ExpressionEvaluator& ee_;
    Const Reference

    The change from ExpressionEvaluator& to const ExpressionEvaluator& should be validated to ensure that no modifications are attempted on the ExpressionEvaluator object within the methods.

    const ExpressionEvaluator& ee_;
    Const Reference

    The change from ExpressionEvaluator& to const ExpressionEvaluator& should be validated to ensure that no modifications are attempted on the ExpressionEvaluator object within the methods.

    const ExpressionEvaluator& ee,
    Const Reference

    The change from ExpressionEvaluator to const ExpressionEvaluator& should be validated to ensure that no modifications are attempted on the ExpressionEvaluator object within the methods.

    const ExpressionEvaluator& ee) {
    Const Reference

    The change from ExpressionEvaluator to const ExpressionEvaluator& should be validated to ensure that no modifications are attempted on the ExpressionEvaluator object within the methods.

    const ExpressionEvaluator& ee);

    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.

    1 participant