This is an archive of the discontinued LLVM Phabricator instance.

Add a test for the MLIR JIT showing the numpy array to memref conversion
Needs ReviewPublic

Authored by mehdi_amini on Mar 29 2021, 10:58 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None

Diff Detail

Event Timeline

mehdi_amini created this revision.Mar 29 2021, 10:58 PM
mehdi_amini requested review of this revision.Mar 29 2021, 10:58 PM
pashu123 added inline comments.
mlir/test/Bindings/Python/execution_engine.py
157

This will always create a pointer to a float and can fail for other dtype.

pashu123 added inline comments.Mar 30 2021, 2:45 AM
mlir/test/Bindings/Python/execution_engine.py
203

Can you expose this? I tried to run the code but it complains: execution_engine.register_runtime("some_callback_into_python", callback)
AttributeError: 'ExecutionEngine' object has no attribute 'register_runtime'

stellaraccident added inline comments.
mlir/test/Bindings/Python/execution_engine.py
203

I think this is from an unlanded diff base: https://reviews.llvm.org/D99562

pashu123 added inline comments.Mar 30 2021, 11:12 AM
mlir/test/Bindings/Python/execution_engine.py
150

For 0d memrefs, shape and strides won't be present.

pashu123 added inline comments.Mar 30 2021, 11:14 AM
mlir/test/Bindings/Python/execution_engine.py
203

Got it.