This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Moving integration tests that merely use the Python API
ClosedPublic

Authored by wrengr on Nov 18 2021, 1:07 PM.

Diff Detail

Event Timeline

wrengr created this revision.Nov 18 2021, 1:07 PM
wrengr requested review of this revision.Nov 18 2021, 1:07 PM
wrengr updated this revision to Diff 388303.Nov 18 2021, 1:12 PM

rebasing

I think we need a little more than just moving the file. Don't we need to set up some dependences to make this work?
Also, we have asan leak detection disabled (for now) for these kinds of tests that use exec engine, with something like

config.environment['ASAN_OPTIONS'] = 'detect_leaks=0'

aartbik added a comment.EditedNov 18 2021, 1:48 PM

In the first time set-up in any build directory, pass the following:

cmake -G Ninja ../llvm \
   -DLLVM_ENABLE_PROJECTS=mlir \
   ....
  -DMLIR_INCLUDE_INTEGRATION_TESTS=ON \
   ...

after that one-time setup, make sure to always test with

cmake --build . --target check-mlir

or for just integration

cmake --build . --target check-mlir-integration
wrengr updated this revision to Diff 388662.Nov 19 2021, 4:23 PM

Adding lit.local.cfg

aartbik added inline comments.Nov 22 2021, 11:40 AM
mlir/test/Integration/Dialect/SparseTensor/python/lit.local.cfg
2

can you please add comments for each section (as we do in the other lit.local.cfg files in Integration) explaining what every part does.

For example

Disable ASAN's leak detection for python OpsDSL tests.

config.environment['ASAN_OPTIONS'] = 'detect_leaks=0'

Only run when python bindings are enabled.

if not config.enable_bindings_python:

config.unsupported = True
  1. I am not sure about the last part so a comment would help ;-)

Oh, my use of "#" clearly gave an undesirable mark up in my comments ;-)

wrengr updated this revision to Diff 389005.Nov 22 2021, 12:49 PM

Adding comments

mlir/test/Integration/Dialect/SparseTensor/python/lit.local.cfg
2

Re the last part ::shrug:: I just copied the file from another place with python tests, as mentioned in the only documentation I could find

aartbik added inline comments.Nov 22 2021, 1:23 PM
mlir/test/Integration/Dialect/SparseTensor/python/lit.local.cfg
2

I think that was only needed in the mlir test/python context
It seems safe to me to remove here

wrengr updated this revision to Diff 389050.Nov 22 2021, 3:04 PM

Removing unnecessary Lit config line

wrengr marked 2 inline comments as done.Nov 22 2021, 3:09 PM
aartbik accepted this revision.Nov 22 2021, 4:17 PM
This revision is now accepted and ready to land.Nov 22 2021, 4:17 PM