This is an archive of the discontinued LLVM Phabricator instance.

[mlir][runner] Add more printMemref functions.
ClosedPublic

Authored by bixia on Dec 6 2022, 3:40 PM.

Details

Summary

Add printMemref for complex data types and index type. Add printMemref for 1d
type beyond f32.

Diff Detail

Event Timeline

bixia created this revision.Dec 6 2022, 3:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2022, 3:40 PM
bixia requested review of this revision.Dec 6 2022, 3:40 PM
bixia updated this revision to Diff 481087.Dec 7 2022, 3:31 PM

Add more printMemref functions.

bixia retitled this revision from [mlir][runner] Add PrintMemref functions for ranked MemrRef of F64. to [mlir][runner] Add more printMemref functions..Dec 7 2022, 3:32 PM
bixia edited the summary of this revision. (Show Details)
aartbik accepted this revision.Dec 9 2022, 4:03 PM
aartbik added inline comments.
mlir/include/mlir/ExecutionEngine/RunnerUtils.h
76

Note that you may want to add a

// Assume index_type is in fact uint64_t.
static_assert(std::is_same<index_type, uint64_t>::value,

"Expected index_type == uint64_t");

in the CPP file for this, so that header and CPP file cannot go out of sync in their view of index_type.

This revision is now accepted and ready to land.Dec 9 2022, 4:03 PM
bixia updated this revision to Diff 482143.Dec 12 2022, 8:28 AM
bixia marked an inline comment as done.

Add static_assert to check index_type assumption.

mlir/include/mlir/ExecutionEngine/RunnerUtils.h
76

Thanks! Added.

This revision was automatically updated to reflect the committed changes.