Skip to content

Conversation

@pnehrer
Copy link
Contributor

@pnehrer pnehrer commented May 14, 2024

Minor improvements to ElementType ergonomics:

  • derive Copy, Clone to make it easier to pass around as a type vs. u32
  • derive PartialEq, Eq to make instances comparable
  • implement TryFrom with a custom error
  • implement conversion Into u32
  • implement Display

If you accept, I have a follow-up PR that would change some of the u32 return values to ElementType in Node and Tensor, but this would be a breaking change.

@abrown
Copy link
Contributor

abrown commented May 14, 2024

@pnehrer, thanks again for the contribution! I'm going to merge #99 first since that was sitting in the queue and that might cause you a bit of rebasing headache — hopefully not too much. And feel free to replace those u32s with ElementType since we haven't yet published a version that contains these new 2.0 changes.

@pnehrer
Copy link
Contributor Author

pnehrer commented May 15, 2024

@abrown I resolved the merge conflict and this is now ready to go

Copy link
Contributor

@abrown abrown left a comment

Choose a reason for hiding this comment

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

Makes sense to me — thanks!

@abrown abrown merged commit 0ccb3bf into intel:main May 15, 2024
@pnehrer
Copy link
Contributor Author

pnehrer commented May 15, 2024

Thank you again!

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.

2 participants