Repository navigation
Merge main -> google - #3925
Merged
Merged
Merge main -> google#3925
Conversation
Add Half library to be able to use f16 to/from f32 conversion in IREE tools.
* b37d8f0 Merge pull request iree-org#3901 from GMNGeoffrey:main-to-google * 818077e Synchronize submodules * 8d0c66e Synchronize submodules with LLVM at llvm/llvm-project@2be569870486 * f06260b Synchronize submodules * 6809621 Integrate LLVM at llvm/llvm-project@2be569870486 * 05bab61 Synchronize submodules * 3111eb7 Integrate LLVM at llvm/llvm-project@b2613fb2f0f5
…ble (iree-org#3882) Add new tile size for fp16 and fallback to none vector version for size not aligned on tile size.
Convert `llvm.intr.exp` into a sequence of ops that computes an approximation to exp(x).
This is using the fact that:
```
exp(x) = exp(x - floor(x \ ln(2) * ln(2)) 2^(floor(x \ ln(2))
= exp(x - k * ln(2)) * 2^k
```
exp(x - k * ln(2)) range is [0, ln(2)] which is approximated with 4degree polynomial.
The real number 2^k is computed with integer bitwise arithmetic.
MobileBert benchmarks:
Before:
```
------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------------------------------------
BM_serving_default/process_time/real_time 907 ms 905 ms 1
```
After:
```
------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------------------------------------
BM_serving_default/process_time/real_time 819 ms 815 ms 1
```
Adds tests for the functions in the `tf.math` API, with dynamic and complex variants. To avoid adding another 1332 tests of `bazel` overhead to the CI while still generating coverage tables, I created two versions of the test suites: one that CI will run that detects any new errors, and one that creates a test for each function and backend. The tests that this change adds to the CI are: ```bazel //integrations/tensorflow/e2e/math:math_complex_tests_multiple__iree_llvmjit PASSED in 26.9s //integrations/tensorflow/e2e/math:math_complex_tests_multiple__iree_vmla PASSED in 15.3s //integrations/tensorflow/e2e/math:math_complex_tests_multiple__iree_vulkan PASSED in 72.1s //integrations/tensorflow/e2e/math:math_complex_tests_multiple__tf PASSED in 38.1s //integrations/tensorflow/e2e/math:math_dynamic_dims_tests_multiple__iree_llvmjit PASSED in 7.9s //integrations/tensorflow/e2e/math:math_dynamic_dims_tests_multiple__iree_vmla PASSED in 13.9s //integrations/tensorflow/e2e/math:math_dynamic_dims_tests_multiple__iree_vulkan PASSED in 4.5s //integrations/tensorflow/e2e/math:math_dynamic_dims_tests_multiple__tf PASSED in 38.0s //integrations/tensorflow/e2e/math:math_tests_multiple__iree_llvmjit PASSED in 41.5s //integrations/tensorflow/e2e/math:math_tests_multiple__iree_vmla PASSED in 19.7s //integrations/tensorflow/e2e/math:math_tests_multiple__iree_vulkan PASSED in 106.6s //integrations/tensorflow/e2e/math:math_tests_multiple__tf PASSED in 38.2s //integrations/tensorflow/e2e/math:math_tests_multiple__tflite PASSED in 21.1s ``` The following tests are deleted: - `bool_test.py` - `complex_test.py` - `finite_test.py` - `logical_ops_test.py` `math_test.py` and `math_dyn_test.py` are replaced by `quantization_test.py` and `quantization_dyn_test.py`, since a fake quant test was added to them after the PR was made. Supporting changes: - Allow `tf.Tensor`s to be passed to traces. (Numpy's unchangeable `float64` default is cumbersome). - Add `set_minus` to `bazel`. - Expand support for input generation (e.g. uniform bools).
- Make xla_ops only tests individual ops in the XLA HLO dialect. - Move slice_add.mlir to structural because we intend to test the fusion functionality. - Add more tests to slice_add.mlir
This passes on Swiftshader but fails on real Turing GPUs. https://source.cloud.google.com/results/invocations/aead115c-3aab-4499-9a91-efa304f85a5e/
This is required internally at the moment. We could consider setting PY3 in the iree_py* rules as well.
While it's good to not have a thousand test targets with one function each, these tests are also pretty slow at the moment (in particular with swiftshader they can be quite slow). This shards the tests into approximately 5 functions per instance, which gives a reasonable tradeoff between startup overhead and test latency.
Merged
GMNGeoffrey
added a commit
that referenced
this pull request
Nov 20, 2020
* 87fa757 Add missing license header * 56c814c Merge pull request #3925 from GMNGeoffrey:main-to-google * fbaf776 List pffft in repo aliases * 31ece19 Synchronize submodules * d62d0a3 Synchronize submodules with LLVM at llvm/llvm-project@620adacf87a3 * a4084cb Synchronize submodules * 399d87d Integrate LLVM at llvm/llvm-project@620adacf87a3 * 29235b3 Use rewriter in ConvertVariableOps * edcb46e Replace some IR modifications with rewriter usage. * 94ed85c Synchronize submodules * c43936b Integrate LLVM at llvm/llvm-project@1983acce7c4d * 44ab843 Synchronize submodules * 1dfb20b Integrate LLVM at llvm/llvm-project@6b1341eb5bb7 * 6e166cd Synchronize submodules * 000c13a Integrate LLVM at llvm/llvm-project@5824a572adb5 * 23f5787 Synchronize submodules * 905f831 Integrate LLVM at llvm/llvm-project@8c1e3cbebfe9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.