This is an archive of the discontinued LLVM Phabricator instance.

[TFUtils] Expose untyped accessor to evaluation result tensors
ClosedPublic

Authored by mtrofin on Aug 4 2020, 5:57 PM.

Details

Summary

These were implementation detail, but become necessary for generic data
copying.

Also added const variations to them, and move assignment, since we had a
move ctor (and the move assignment helps in a subsequent patch).

Diff Detail

Event Timeline

mtrofin created this revision.Aug 4 2020, 5:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2020, 5:57 PM
mtrofin requested review of this revision.Aug 4 2020, 5:57 PM
yundiqian accepted this revision.Aug 5 2020, 12:32 AM
yundiqian added inline comments.
llvm/include/llvm/Analysis/Utils/TFUtils.h
120–122

why making them public?

This revision is now accepted and ready to land.Aug 5 2020, 12:32 AM
mtrofin marked an inline comment as done.Aug 5 2020, 9:34 AM
mtrofin added inline comments.
llvm/include/llvm/Analysis/Utils/TFUtils.h
120–122

See motivation in patch description - they are necessary for generic data copying (for upcoming patch)

MaskRay added a subscriber: MaskRay.Aug 5 2020, 9:50 AM
MaskRay added inline comments.
llvm/include/llvm/Analysis/Utils/TFUtils.h
107

You can write = default

The tag [llvm] can be replaced by a more specific tag, e.g. TFUtils or some other abbreviation for the framework you are working on.

mtrofin updated this revision to Diff 283285.Aug 5 2020, 10:10 AM
mtrofin marked 2 inline comments as done.

updated description

The tag [llvm] can be replaced by a more specific tag, e.g. TFUtils or some other abbreviation for the framework you are working on.

done

llvm/include/llvm/Analysis/Utils/TFUtils.h
107

That doesn't work, the "impl" in the pImpl idiom is not available here. Just like the move ctor, the implementation needs to be in the .cpp file.

mtrofin retitled this revision from [llvm] Expose untyped accessor to evaluation result tensors to [TFUtils] Expose untyped accessor to evaluation result tensors.Aug 5 2020, 10:10 AM
This revision was landed with ongoing or failed builds.Aug 5 2020, 10:22 AM
This revision was automatically updated to reflect the committed changes.