Commit graph

16 commits

Author SHA1 Message Date
Advait Jain
699c5178b9
Explicit load for py_library. (#2127)
BUG=http://b/291306662
2023-07-14 21:59:36 +00:00
Steven Toribio
8ee06dcbac
Energy op (#2121)
`port c++ energy op to open source in tflm_signal`

-port energy op and corresponding to new open source location for C++

BUG=[b/289422411](https://b.corp.google.com/issues/289422411)
2023-07-13 19:27:06 +00:00
Steven Toribio
296b818583
Stacker Op (#2118)
`port c++ stacker op to open source in tflm_signal`

-port stacker op and corresponding to new open source location for C++

BUG=[b/289298641](https://b.corp.google.com/issues/289298641)
2023-07-12 22:46:54 +00:00
Steven Toribio
7781c4979c
Delay Op (#2117)
`port c++ delay op to open source in tflm_signal`

-port delay op and corresponding to new open source location for C++

BUG=[b/289296081](https://b.corp.google.com/issues/289296081)
2023-07-12 20:35:09 +00:00
Steven Toribio
597ccf786c
Overlapp_add (#2116)
`port c++ Overlapp_Add op to open source in tflm_signal`

-port Overlapp_Add op and corresponding to new open source location for C++

BUG=[b/289291202](https://b.corp.google.com/issues/289291202)
2023-07-11 23:32:40 +00:00
Steven Toribio
29d8dbfd4e
port c++ framer op to open source in tflm_signal (#2104)
`port c++ framer op to open source in tflm_signal`

-port framer op and corresponding to new open source location for C++

BUG=[b/288965505](https://b.corp.google.com/288965505)
2023-07-11 17:03:45 +00:00
suleshahid
360f05d294
Signal Library OPs python BUILD update (#2088)
This is needed to properly build all the ops together. Since we are calling into a singular utils function to load the ops, if it checks for any other ops, it would break before this.

Now we make it build all ops everytime utils.py is built.

BUG=[288938993](http://b/288938993)
2023-06-27 20:25:59 +00:00
suleshahid
f22888af65
Adds Signal Library RFFT OP (#2056)
Second OP for the TFLM Signal library, Real-Valued Fast Fourier Transform.

The RFFT OP provides three resolutions: `FLOAT, INT16, INT32`

Similar usage as to previous Window OP:
* `op_resolver.AddRfft()` (which will add all resolutions, and determine the type at runtime)
* `op_resolver.AddRfftFloat()`, `op_resolver.AddRfftInt16()`, `op_resolver.AddRfftInt32()` for a specific resolution type.
* or via python as can be seen in `fft_ops_test.py`

3 testing options are provided:
* Micro(C++): bazel run signal/micro/kernels:fft_test
* Tensorflow/Micro(Python): bazel run python/tflite_micro/signal:fft_ops_test
* Makefile(C++): make -f tensorflow/lite/micro/tools/make/Makefile test_kernel_fft_test

BUG=[287346710](http://b/287346710)
2023-06-21 20:36:55 +00:00
Ryan Kuester
52c9568156
build(bazel): use --std=c++17 by default (#2060)
Make all bazel builds use --std=c++17 by default.

BUG=fixes #2058
2023-06-15 20:22:54 +00:00
Advait Jain
69d15a0124
Remove extra space in todo. (#2059)
BUG=cleanup
2023-06-15 17:56:21 +00:00
Ryan Kuester
b5da836410
refactor(python): move runtime to package-friendly directory structure (#2051)
To package the module `runtime` as `tflite_micro.runtime`, put `runtime` under
a directory representing the Python namespace package `tflite_micro`. For
organization's sake, move it all to the top-level directory `python/`. Adjust
tests and docs to match.

Some code outside of the Python extension module has come to depend on
`python/tflite_micro:python_ops_resolver` as a replacement for
`all_ops_resolver` (e.g.:`t/l/m/integration_tests/seanet/add/integration_tests.cc`).
`python_ops_resolver` is intended to be a private implementation detail of the
Python extension module. For now, grandfather in the dependent code by updating
its references to the resolver's location; however, soon the dependent code
should be migrated away to a different resolver. (#2033,
https://issuetracker.google.com/286508251)

BUG=part of #1484
2023-06-15 06:25:19 +00:00
suleshahid
925909cf6b
Update internal name for Window OP (#2054)
We have some name clash issues with the current Window OP name.

We will be changing it from "Window"->"SignalWindow" until the names clashes are resolved and revert back afterwards.

This is an internal implementation detail, so user level API has no change from current usage, i.e. still use (op_resolver.AddWindow() and window_op.window)

BUG=[286250473](http://b/286250473)
2023-06-14 20:33:41 +00:00
suleshahid
c306ff6084
Adds Signal Library Window Op (#2019)
First Op for the TFLM Signal Processing Ops library.
Doc linked in bug.

The Window OP is a custom signal processing OP similar to what is found in tf.signal library, but specific for integer (int16) purposes.

You can directly use this as a builtin op via the op resolver as:
* `op_resolver.AddWindow()` 
* or via python as shown in `window_op_test.py`

3 testing options are provided:
* Micro(C++): `bazel run signal/micro/kernels:window_test`
* Tensorflow/Micro(Python): `bazel run python/tflite_micro/signal:window_op_test`
* Makefile(C++): `make -f tensorflow/lite/micro/tools/make/Makefile test_kernel_window_test`  

BUG=[259145369](http://b/259145369)
2023-06-14 00:25:02 +00:00
Ryan Kuester
10924c4403
build: upgrade C++ std used in py/cc_deps_link_test (#1967)
In preparation for upgrading the Tensorflow Python package dependency, upgrade
the C++ standard used when compiling //python/tests:cc_deps_link_test from
C++14 to C++17. cc_deps_link_test tests linking against the Tensorflow Python
package's extension module.

Bug=#1966.
2023-05-12 16:47:20 +00:00
TANMAY DAS
20d202fa43
Fixing google3 presubmit buildify errors. (#1809)
This changes are required to import the files to google3. They are failing the checks in presubmit.
BUG=http://b/271870585
2023-03-08 21:06:49 +00:00
Ryan Kuester
17aae9e35d
build: add means of linking with C libs in Py packages (#1668)
Extend the Python repository_rule used to create external repositories, adding targets for C-language binary libraries shipped inside Python packages; e.g., that shipped in package tensorflow-gpu.

These targets are to be used as dependencies by C-language targets.

Note: when debugging the build, it can be helpful to examine the repository directory and BUILD file this repository_rule generates in the bazel cache.

Begin using a python/ directory at the root of the project for code that is specific to Python.

Upgrade to the latest version of rules_python first. Note that the unit test to keep requirements.in and requirements.txt is disabled (specifically with 
ec6bdc5d4443285d28a44076f06c203d9582e4a1)

Add a unit test for this feature.

BUG=see description
2023-03-05 06:25:58 +00:00