summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Analysis/NestedMatcher.cpp
diff options
context:
space:
mode:
authorNicolas Vasilache <ntv@google.com>2019-01-28 20:29:46 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 15:59:14 -0700
commit39d81f246a556ef02a26ee239cb097f6d1aec64a (patch)
treeea138d2b367fda0a47f145c4265e32120b3e0d2c /mlir/lib/Analysis/NestedMatcher.cpp
parent0f9436e56a2c366c839cf43784c1c7a74f5c9ee3 (diff)
downloadbcm5719-llvm-39d81f246a556ef02a26ee239cb097f6d1aec64a.tar.gz
bcm5719-llvm-39d81f246a556ef02a26ee239cb097f6d1aec64a.zip
Introduce python bindings for MLIR EDSCs
This CL also introduces a set of python bindings using pybind11. The bindings are exercised using a `test_py2andpy3.py` test suite that works for both python 2 and 3. `test_py3.py` on the other hand uses the more idiomatic, python 3 only "PEP 3132 -- Extended Iterable Unpacking" to implement a rank and type-agnostic copy with transposition. Because python assignment is by reference, we cannot easily make the assignment operator use the same type of sugaring as in C++; i.e. the following: ```cpp Stmt block = edsc::Block({ For(ivs, zeros, shapeA, ones, { C[ivs] = IA[ivs] + IB[ivs] })}); ``` has no equivalent in the native Python EDSCs at this time. However, the sugaring can be built as a simple DSL in python and is left as future work. PiperOrigin-RevId: 231337667
Diffstat (limited to 'mlir/lib/Analysis/NestedMatcher.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud