Skip to content

Merge main -> google - #5575

Merged
copybara-service[bot] merged 14 commits into
iree-org:googlefrom
GMNGeoffrey:main-to-google
Apr 23, 2021
Merged

copybara-service[bot] merged 14 commits into
iree-org:googlefrom
GMNGeoffrey:main-to-google

Conversation

@GMNGeoffrey

@GMNGeoffrey GMNGeoffrey commented Apr 22, 2021 •

Copy link
Copy Markdown
Member

hanhanW and others added 10 commits April 22, 2021 16:17
We can see the regression on Mako webpages. It's annoying to see badges
being red because of "regressions". Turn it off for now. It will still
complain about it if it fails at other stages.
According to the definition of linalg.conv_2d_input_nhwc_filter_hwcf, the output shape should be 1x1x1x1xf32.
Add the build tool to generate c embed data for testing. The code is
used to bypass fileIO and it can be used with the C API.

Change the build rule of iree_bytecode_module to include the c embed
codegen. The user needs to assign a non-empty value in the "c_output"
field.

build_tools/embed_data/generate_embed_data_main.cc now can produce
either c code or c++ code, controlled by --c_output flag.
This wasn't working on our internal 32-bit arm architecture for some
reason. Unlike many methods one can find on the internet, the one used
here doesn't require listing every possible architecture. It has the
disadvantage (like the one used previously) that it requires uintptr_t,
which is not technically required by the standard and it requires that
`uintptr_t` be the size of a void pointer, which is also not
technically required. Both these properties are checked at compile time
though, so if we ever have to deal with some weird architecture where
that isn't true, I guess we can find some other way.
This can be used in the future if we decide to pass in CPU info or
something.
The current shared objects we produce from the LLVM AOT backend match
the same ABI as written by hand here in _demo.c.
Adding a little demo library to show both sides of the ABI.
This will let us substitute other benchmarking frameworks for use on
bare-metal platforms or other places the full benchmark library can't run.
This initial pass exposes what we use in iree-benchmark-module today and
additional features can be added as needed (like range parameters).
The bufferization pass on the linalg on tensors path was an arbitrary
set of methods put in place to connect linalg on tensors to the post
tile+distribute codegeneration on CPU and GPU. This PR cleans up the
logic to better handle the tensor -> memref conversion.
In particular

Adds an analysis step to figure out which tensors can be mapped to
the same memref object. This also provides information of what
tensors are eventually mapped to the output of the dispatch
region. In such cases, the output is used to compute the values in
place reducing the need for copies and intermediate allocations.
Use this analysis step to convert operations from tensors to memrefs.
Use the readonly, readwrite and writeonly attributes to avoid
copies when possible.
All of this uses logic similar to the Tied operands/results approach
that the bufferization in the sandbox uses. Indeed this pass might
eventually subsumed by a bufferization pass in the sandbox and to be
upstreamed. Till that happens, this rewrite gives something that
is similar in spirit.

Fixes iree-org#4734
Fixes iree-org#5013
* 97a7c8e Synchronize submodules with LLVM at llvm/llvm-project@2f69975683f5
* 3c09f24 Integrate LLVM at llvm/llvm-project@2f69975683f5
* 44d1063 Merge pull request iree-org#5551 from GMNGeoffrey:main-to-google
* 1243070 Integrate LLVM at llvm/llvm-project@1a3f88658a02
* 361e47b Integrate LLVM at llvm/llvm-project@4bb60c285cb3
* eaeb09d Integrate LLVM at llvm/llvm-project@9430efa18b02
* dc0af0c Synchronize submodules with LLVM at llvm/llvm-project@e0adf7e06a9e
* 678b1e1 Integrate LLVM at llvm/llvm-project@e0adf7e06a9e
* 98cf087 Integrate LLVM at llvm/llvm-project@01ace074fcb6
* 307cef0 Integrate LLVM at llvm/llvm-project@aa80ea8a617b
* 297f730 Integrate LLVM at llvm/llvm-project@fb69b92c7b33
* 5f1f4fe Integrate LLVM at llvm/llvm-project@f549176ad976
* bda62f0 Merge main -> google
* 0adee0f Merge pull request iree-org#5520 from GMNGeoffrey:main-to-google
* e302cb3 Synchronize submodules with LLVM at llvm/llvm-project@80e166f81abd
* 6c94570 Integrate LLVM at llvm/llvm-project@80e166f81abd
* ce364ae Integrate LLVM at llvm/llvm-project@517c3aee4de5
* 32792f7 Merge pull request iree-org#5500 from rsuderman:main-to-google
@google-cla google-cla Bot added the cla: yes label Apr 22, 2021
antiagainst and others added 4 commits April 22, 2021 17:03
Without it, we can see failures like:

```
CMake Error at build_tools/cmake/iree_copts.cmake:297 (string):
  string sub-command REPLACE requires at least four arguments.
```
Implementation of the IREE Java TFLIte API. This API is designed to provide a similar interface and as much compatibility as possible with Tensorflow's Interpreter.java, but there are a few key unsupported features:

Delegates and the NNAPI
Advanced interpreter options
Interrupting or canceling inference before its complete
Tensor method signatures
In addition, some features aren't fully fleshed out yet or tested:

Dynamic shape support
String input/output
This compatibility layer will only accept java.nio.Buffer type classes as input. Javadoc details how to convert from non buffer based inputs into buffers and vice versa.

For API brevity, all features/methods IREE cannot support aren't included in this shim. Comments are updated to reflect differences in the behavior of the underlying IREE runtime.

Includes Java classes for the API as well as an Android implementation test. Built by Gradle.
In C, we've got no namespaces, and in particular in Google's internal
source, something in the toolchain links in an alternative definition
for this struct which causes *extremely* confusing errors.
This is just a starting point for the macros based on what was present;
code golf will happen to make them better as part of iree-org#2843.
@copybara-service
copybara-service Bot merged commit 22c33a2 into iree-org:google Apr 23, 2021
GMNGeoffrey added a commit that referenced this pull request Apr 24, 2021
* eeef486 Fix include sort order
* 04b1fce Merge pull request #5595 from GMNGeoffrey:main-to-google
* a81fb9b Synchronize submodules with LLVM at llvm/llvm-project@91d3f73937b6
* 798f6ba Integrate LLVM at llvm/llvm-project@91d3f73937b6
* 91c5f7b Integrate LLVM at llvm/llvm-project@37e145812855
* 22c33a2 Merge pull request #5575 from GMNGeoffrey:main-to-google
* 49dc151 Move ModelBuilder out of IREE and into iree-llvm-sandbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants