Skip to content

Merge main -> google - #3012

Closed
rsuderman wants to merge 29 commits into
iree-org:googlefrom
rsuderman:main-to-google
Closed

rsuderman wants to merge 29 commits into
iree-org:googlefrom
rsuderman:main-to-google

Conversation

@rsuderman

Copy link
Copy Markdown
Collaborator

silvasean and others added 21 commits August 20, 2020 13:14
565d174 Synchronize submodules
0c908f2 Integrate TF at tensorflow/tensorflow@051ed1c
6395636 Synchronize submodules
8264509 Integrate LLVM at llvm/llvm-project@bad7d6b
0fbd8fd Synchronize submodules
a44e608 Integrate LLVM at llvm/llvm-project@b999400
6b07b62 Synchronize submodules
249c658 Integrate LLVM at llvm/llvm-project@f6decfa
39c1754 Synchronize submodules
7ae59ed Integrate LLVM at llvm/llvm-project@f164534
a59beac Synchronize submodules
7dcb2d8 Integrate LLVM at llvm/llvm-project@02bf563
65406d3 Synchronize submodules
db185d5 Integrate LLVM at llvm/llvm-project@5e3fd47
2b809ad Synchronize submodules
e57d5cd Integrate LLVM at llvm/llvm-project@50aae46
a8a633d Synchronize submodules
02fdb34 Integrate LLVM at llvm/llvm-project@c1dd5df
fbfe811 Synchronize submodules
f4c60f8 Integrate LLVM at llvm/llvm-project@3f7985e
29c03a5 Synchronize submodules
a926dab Integrate LLVM at llvm/llvm-project@e1cd7ca
a8cc17e Synchronize submodules
be6ac43 Integrate LLVM at llvm/llvm-project@a54eb9b
432cee2 Synchronize submodules
a56db8b Integrate LLVM at llvm/llvm-project@921c1b7
8a801aa Synchronize submodules
82ea34b Integrate LLVM at llvm/llvm-project@87bf0b0
7b2aa16 Synchronize submodules
251c650 Integrate TF at tensorflow/tensorflow@7d04ea3
84e4b20 Merge pull request iree-org#2955 from ScottTodd:main-to-google
8d17ea1 Synchronize submodules
a2ca30b Integrate TF at tensorflow/tensorflow@6787ce3
c20fbe6 Synchronize submodules
a6c27b5 Integrate LLVM at llvm/llvm-project@131b3b9
473933e Synchronize submodules
fa9dcf2 Integrate LLVM at llvm/llvm-project@f9dc2b7
…iree-org#2973)

To reduce complexity of passes downstream, the linalg.tensor_reshape
operations can be fused with the hal.interface.load.tensor and
hal.interface.store.tensor operations. Add these patterns and the
patterns to fuse Linalg operations on tensors into a single pass.
Add a dynamically shaped mhlo.dot lowering example
These sneak in occasionally. Confirmed that all existing tab usages are
in excluded files or should be cleaned up.

Tested:
Added a commit with some tabs
https://github.com/google/iree/pull/2984/checks?check_run_id=1028013402

```
Changed files include tabs. Please use spaces.
iree/compiler/Conversion/LinalgToSPIRV/CooperativeMatrixAnalysis.cpp:24:	if (llvm::size(contract.masks()) != 0) return false;
iree/test/e2e/xla_ops/add.mlir:4:	%result = "mhlo.add"(%0, %1) : (tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32>
iree/test/e2e/xla_ops/add.mlir:5:	check.expect_almost_eq_const(%result, dense<[6.0, 8.0, 10.0, 12.0]> : tensor<4xf32>) : tensor<4xf32>
```

Did some error checking of the script with unknown refs, malformed
commands, etc.
…e-org#2905)

This obviously is required to make sure that when later we acquire
the same TimePointFence, it's not in signaled state to start.

This bug is revealed by a non-deterministic crash on SwiftShader
where a command buffer can be destroyed in the middle of being
executed. This is because in IREE after queue submission we wait
on the TimePointSemaphore to signal to a specific value. Under
the hood, TimePointFence is used to query the status from GPU.
But it's always signaled and it causes IREE side to progress and
delete the command buffer (given it's already submitted and
executed seen by IREE). This triggers command buffer deletion
in SwiftShader, while it's still executing it.
3a874dd Synchronize submodules
a25d2f2 Merge main -> google
0990c32 Synchronize submodules
ee9f2ab Integrate LLVM at llvm/llvm-project@ef76686
e49af89 Synchronize submodules
c3982a0 Integrate TF at tensorflow/tensorflow@101b925
24459c8 Synchronize submodules
91007d8 Integrate LLVM at llvm/llvm-project@f8454d6
c568b62 Synchronize submodules
e920627 Integrate LLVM at llvm/llvm-project@c6fb72d
05f55d8 Synchronize submodules
4926bcd Integrate LLVM at llvm/llvm-project@77e5a19
797d7a9 Merge pull request iree-org#2981 from rsuderman:main-to-google
Allows for low level usage of `pyiree` (e.g. in a colab notebook) without exposing the `SavedModel` roundtrip.
This addresses pages of pages of warnings on macOS like:

ld: warning: direct access in function 'foo' from file 'foo.file' to
global weak symbol 'bar' from file 'bar.file' means the weak symbol
cannot be overridden at runtime. This was likely caused by different
translation units being compiled with different visibility settings.

Besides, this has many benefits like avoiding symbol collision,
reducing library size, improving optimization, etc.
iree.placeholder can be interspeesed with other operations that are to
be split within SplitDispatchFunctionPass.
The file implements compiler code and should roughly follow LLVM style.
This inserts the dialects required in conversion passes by overwriting `getDependentDialects()`.
Makes progress on iree-org#2958.
74991c2 Merge main -> google
11b2a12 Synchronize submodules
1ff5cfd Integrate TF at tensorflow/tensorflow@0650101
e568ce6 Synchronize submodules
d8fa3ae Integrate LLVM at llvm/llvm-project@642cb78
c303acf Synchronize submodules
9897aff Integrate LLVM at llvm/llvm-project@9500a72
9d12a42 Remove IREE_REGISTER_MLIR_PASSES: re-registration is supported in MLIR for a l..
Allows for specification of a `pass_pipeline` and `compiler_context`. Also moved the compiler context arg to the last position in the `tf.compiler` functions, since it is largely unused, and calls can be simplified when it can be omitted.
@google-cla google-cla Bot added the cla: yes label Aug 26, 2020
copybara-service Bot pushed a commit that referenced this pull request Aug 26, 2020
* 6282700 Expand the tf_module_to_compiler_module API (#3009)
* f7e561a Merge pull request #3006 from rsuderman/google-to-main
* 8341d71 Explicitly insert dialects in conversion passes (#3002)
* b7c2b60 Fix format by changing to LLVM style (#3008)
* 4286f17 Merge branch 'main' into google-to-main
* f0a07f6 Allow iree.placeholder as an op between splittable ops. (#2999)
* 6bd3b1d Use hidden visibility for all symbols by default (#2997)
* d650082 VMLA Dynamic Iota support with Shape dialect work. (#2965)
* c724ee4 Add function to hide SavedModel roundtrip (#2995)
* 2fedce6 Merge pull request #2996
* c5f7030 Merge branch 'main' into google-to-main
* cf3211d [vulkan] Reset TimePointFence status when releasing back to pool (#2905)
* ebc6a83 Add lint action to check for tabs (#2984)
* 932339c Merge pull request #2964 from silvasean/add-dynamic-dot-example
* df727ae Integrate MLIR-EmitC at iml130/mlir-emitc@560cd8c (#2990)
* e824d36 Refactor for explicit dialect registration (#2978)
* 38b7d2c Allow ModelRunner to receive an array of extra symbols available during JITing..
* 264a97d Fuse linalg.tensor_reshape operations with hal.interface* operations. (#2973)
* 0e3c737 Fold flow.tensor.update when all operands are constant (#2982)
* c7a21c2 Merge pull request #2983 from rsuderman/google-to-main
* fd55a86 Add a dynamically shaped mhlo.dot lowering example

COPYBARA_INTEGRATE_REVIEW=#3012 from rsuderman:main-to-google 6282700
PiperOrigin-RevId: 328632208
asaadaldien and others added 7 commits August 26, 2020 20:38
This link won't work on GitHub, but will on GitHub Pages. We have the same sort of half-broken link at [gh-pages/docs/developing_iree/index.md](https://github.com/google/iree/blob/gh-pages/docs/developing_iree/index.md).

Fixes iree-org#2029
Fixes iree-org#3014
…#2904)

If we know that the extension is not available, avoid filling in
VkPhysicalDeviceTimelineSemaphoreFeatures and attach it to pNext
when creating the Vulkan device.
…ee-org#2800)

In the emulated timeline semaphore, we use VkFence as a way to
probe the status of submissions. This is needed for both the
emulated timeline semaphores and the serializing queue itself
because we can wait on either the timeline semaphore or the queue.
This requires us to hold ref ptrs to the timepoint fence in both
the timeline semaphore and the queue. The expectation is that when
both releases the ref ptr, the fence can be automatically released
to the pool.

However, the ref ptr held in the queue can typically linger on
longer because we normally don't wait queue/device idle until
the very last when all work are done. Because of the ref hold
there, the fences will not be released.

This commit adds another callback to let the emulated timeline
semaphore to inform the queue when some fences are known to
have signaled (because the timeline signaled passing a certain
value tracked by the fence), so that we can more aggressively
drop the ref ptr inside the serializing queue.

At the same time, reduces the number of initial VkFence requested.

Fixes iree-org#2526
@rsuderman rsuderman closed this Aug 27, 2020
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.