+
Skip to content

Conversation

DaughterOfMars
Copy link
Contributor

Description

Some tensor ops allow using either the Tensor with the Arc data reference or a GhostTensor without it. Currently it uses Result to do this, but this is a bit awkward. I found that a unifying trait Tensorlike is enough to handle all of the current scenarios and is cleaner.

/// Contains everything that comprises a tensor, except possibly for the actual data. This really
/// exists to unify handling of [Tensor] and [GhostTensor].
///
/// *If it looks like a tensor and barks like a tensor, then pet it like a tensor.*
Copy link
Owner

Choose a reason for hiding this comment

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

🤣

Copy link
Owner

@coreylowman coreylowman left a comment

Choose a reason for hiding this comment

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

I like it, using impl TensorLike is much clearer than the result with tensor/GhostTensor, nice! Mind fixing the conflicts & merging main branch in?

@coreylowman coreylowman merged commit d4aaadc into coreylowman:main Apr 11, 2023
@coreylowman
Copy link
Owner

Nice, thanks for the improvement 👍

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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载