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

Tensor type indent fix #2196

Merged
merged 4 commits into from
Aug 23, 2024
Merged

Tensor type indent fix #2196

merged 4 commits into from
Aug 23, 2024

Conversation

mepatrick73
Copy link
Contributor

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

#2151
#2115
Dependant on #2195

Changes

If a TensorType name is a number, adding _ in front to make it a valid Ident for proc_macro2

Testing

Ran user model mentionned in #2151

@mepatrick73 mepatrick73 self-assigned this Aug 22, 2024
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.08%. Comparing base (e1fed79) to head (c3ea79d).
Report is 6 commits behind head on main.

Files Patch % Lines
crates/burn-import/src/burn/ty.rs 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2196      +/-   ##
==========================================
+ Coverage   86.04%   86.08%   +0.03%     
==========================================
  Files         695      695              
  Lines       88882    89002     +120     
==========================================
+ Hits        76480    76618     +138     
+ Misses      12402    12384      -18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than the pad related changes from #2195

Comment on lines 771 to 781
fn get_input_values(node: &Node, index: usize) -> Vec<i64> {
// If the input is not provided, return an empty vector
if node.inputs.get(index).is_none() {
return Vec::new();
}

match &node.inputs[index].value {
Some(Data::Int64s(shape)) => shape.clone(),
_ => panic!("Tensor data type must be int64"),
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to include pad related changes? I see you have #2195 open. Perhaps, this is based on that branch and that's why these changes appear?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had to make the pad related changes in order to test the user model.

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix 🙂

Changes for the type ident look good to me! But we should remove the pad changes from this PR before merging (especially since the pad PR needs some minor adjustments).

@mepatrick73 mepatrick73 merged commit c94e743 into main Aug 23, 2024
15 checks passed
@mepatrick73 mepatrick73 deleted the tensor-type-indent-fix branch August 23, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants