This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Replace pass-by-value with pass-by-memref for C interface routines to fix Windows build.
ClosedPublic

Authored by bixia on Oct 12 2022, 12:56 PM.

Diff Detail

Event Timeline

bixia created this revision.Oct 12 2022, 12:56 PM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Oct 12 2022, 12:56 PM
wrengr accepted this revision.Oct 12 2022, 1:03 PM
wrengr added inline comments.
mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp
634

Be sure to add vref to the non-null assertion at the beginning of the function

679

be sure to add vref to the non-null assertion at the beginning of the function.

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_file_io.mlir
67–68

Since the %v is just going to be stored here anyways, I wonder if there isn't some way to pass %vs[%i] directly to @getSparseTensorReaderNextF32 to avoid needing to allocate %value and then load %v.

This revision is now accepted and ready to land.Oct 12 2022, 1:03 PM
aartbik accepted this revision.Oct 12 2022, 1:23 PM
bixia updated this revision to Diff 467254.Oct 12 2022, 1:58 PM
bixia marked 2 inline comments as done.

Add assert for the value memref. Add a TODO to investigate the posibility of using memref.subview for the test.

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_file_io.mlir
67–68

Add a TODO to explore this.