Commit Graph

520 Commits

Author SHA1 Message Date
Jared Duke
1f530076d1 Fix TFLite builds on Windows/MacOS
Avoid using `--enable_platform_specific_config` when cross-compiling for
iOS/Android, as this pulls in host build flags, which may not be
appropriate (e.g., when cross-compiling for Android on a Windows host).

Also fix an issue when building tensorflowlite_c for iOS.

Fixes .

PiperOrigin-RevId: 311767770
Change-Id: I80b817fd89a6889dc78be50f1def8b899f091cb6
2020-05-15 11:26:35 -07:00
A. Unique TensorFlower
2ffde8a339 This breaks multi-python:
The local gen_build_info rule calls into find_cuda_config, which only works in the remote image.

This is additionally brittle: relying on TF_CUDA_VERSION being an action_env is poisoning our caches, and running find_cuda_conifg multiple times is bugprone.

I think the better way to do this is to put the information from the repo_rule into a file template as part of the repo rule configuration (cuda_configure.bzl). Then we can just include that file, instead of trying to do that as part of the action.

PiperOrigin-RevId: 311148754
Change-Id: I80daa8652a85b2a1897c15117e6422bfd21cee6a
2020-05-12 10:12:04 -07:00
TensorFlower Gardener
94c821c0ef Merge pull request from angerson:master
PiperOrigin-RevId: 311025598
Change-Id: Ib47f014000e9183bd25b413ebeb43a4adf543d82
2020-05-11 17:21:17 -07:00
A. Unique TensorFlower
1514dd4025 Internal change only.
PiperOrigin-RevId: 310919530
Change-Id: I001957cc435c019c3611d728c8954cfe610ea6c8
2020-05-11 08:47:08 -07:00
Geeta Chavan
85fb70ad19 Merge release notes and version updates to master
PiperOrigin-RevId: 310596034
Change-Id: Icdd7dabb0fc2f6e56c4ce7c7a9be70cdc643cc68
2020-05-08 11:38:16 -07:00
Austin Anderson
642dc30aca Fix typos from the latest version 2020-04-30 17:45:36 -07:00
Austin Anderson
df1ee5d551 Convert build_info to dict format and expose it.
Since this module now generates a dictionary to expose in tf.config, it
doesn't make much sense to store only certain values in the build_info
dictionary and others as module variables. This obsoletes a lot of code
in gen_build_info.py and I've removed it.

I also updated all the in-code references I've found to the build_info
module. I think this may break whomever used to be using the build_info
library, but since it wasn't part of the API, there was no guarantee
that it would continue to be available.
2020-04-29 16:17:38 -07:00
A. Unique TensorFlower
9ca9a4f8e9 Roll forward with fix for Windows & PPC.
PiperOrigin-RevId: 308975869
Change-Id: I22abc77396e8d2a9c8f6a0907bf9d1d22169cc93
2020-04-29 00:43:38 -07:00
TensorFlower Gardener
436323c564 Merge pull request from Intel-tensorflow:agramesh/enable_cpu_tests
PiperOrigin-RevId: 308412644
Change-Id: I5367d98259227ff75644c460de5a5e827915e007
2020-04-25 07:02:39 -07:00
Mihai Maruseac
40d3f089be Roll forward with fix for tf-serving.
PiperOrigin-RevId: 308282593
Change-Id: I947d78592a9ca5c481f98a95946bb4acbbb0437f
2020-04-24 10:48:45 -07:00
Rick Chao
5194a4e1a1 Ensure TFLite shared libs have resolved symbols
Ensure all TFLite binary targets have fully resolved symbols at link
time. Also enabling building of .dylib targets for iOS.

PiperOrigin-RevId: 308144394
Change-Id: I8cea13a8721447e27baff99c8dcf2166d9ed1c3c
2020-04-23 15:47:48 -07:00
A. Unique TensorFlower
45e0468e02 Roll forward with fix for tf-serving.
PiperOrigin-RevId: 308011159
Change-Id: I91cffa1f10e8fcb621d18578225be7cc870b6839
2020-04-23 03:00:38 -07:00
Ran Chen
32fc2c717f Internal change
PiperOrigin-RevId: 307918448
Change-Id: I5d9cfd73919b4536fc4e88f982190a7ddf0de174
2020-04-22 15:54:56 -07:00
Jared Duke
eaca795c24 Ensure TFLite shared libs have resolved symbols
Ensure all TFLite binary targets have fully resolved symbols at link
time. Also enabling building of .dylib targets for iOS.

PiperOrigin-RevId: 307902313
Change-Id: I6ec48fbd7e8f51b8b786eba9d13118cb51638fde
2020-04-22 14:49:54 -07:00
Christina Sorokin
a659b93433 rollback of change
Add two repository rules:
- @local_execution_config_platform: local platform to allow selecting locally
  executed tools on
- @local_execution_config_python: python configured for execution...

PiperOrigin-RevId: 307862682
Change-Id: Ie0320f2f137a40b418632989981c9dc072ef80e6
2020-04-22 11:47:06 -07:00
A. Unique TensorFlower
f5bb643360 Add two repository rules:
- @local_execution_config_platform: local platform to allow selecting locally
  executed tools on
- @local_execution_config_python: python configured for execution on the local
  machine during otherwise remote builds

Mark rules that are required to run locally to require our local platform.

This allows pyth...

PiperOrigin-RevId: 307771596
Change-Id: If1f0013ec88a35d507b2b622894208aab2416fe5
2020-04-22 01:47:55 -07:00
Kibeom Kim
86fd918743 Move tfrt_enabled target duplication logic to tf_py_test
The tfrt_enabled target duplication logic was initially added to cuda_py_test,
but there are tests that directly use tf_py_test, so add to tf_py_test instead.

PiperOrigin-RevId: 307719942
Change-Id: I90bb1009c5cadf1a5a0a3d036a3a174d31b84eac
2020-04-21 18:14:20 -07:00
Taehee Jeong
0f631f8fb1 Add two repository rules:
- @local_execution_config_platform: local platform to allow selecting locally
  executed tools on
- @local_execution_config_python: python configured for execution on the local
  machine during otherwise remote builds

Mark rules that are required to run locally to require our local platform.

This allows python paths to differ between the remote docker image and local
machine.

For example, the local machine might have python 3.7 installed in
/usr/bin/python3, while the remote docker should use a python installed
in /usr/local/bin/python3.8.

PiperOrigin-RevId: 307585019
Change-Id: I29313121beb967b77ae123e7d1b614c688cb40ca
2020-04-21 05:20:54 -07:00
A. Unique TensorFlower
d68284a16f Add two repository rules:
- @local_execution_config_platform: local platform to allow selecting locally
  executed tools on
- @local_execution_config_python: python configured for execution on the local
  machine during otherwise remote builds

Mark rules that are required to run locally to require our local platform.

This allows python paths to differ between the remote docker image and local
machine.

For example, the local machine might have python 3.7 installed in
/usr/bin/python3, while the remote docker should use a python installed
in /usr/local/bin/python3.8.

PiperOrigin-RevId: 307558811
Change-Id: I0dc2d877a7c26b294bf2b569b4f121cf6506e7fc
2020-04-21 01:10:05 -07:00
Amit Patankar
7fd9e941e1 Remove the tf_py_wrap_cc macros from TensorFlow .bzl files.
As of the implementation of https://github.com/tensorflow/community/blob/master/rfcs/20190208-pybind11.md we have removed all usage of SWIG as a language and compiler from TensorFlow.

PiperOrigin-RevId: 307098689
Change-Id: I999f9d7d53b886f4c43f8fc974717f5a5c2b4211
2020-04-17 12:59:54 -07:00
ag.ramesh
7fc0c18fec Make tf_gpu_cc_test always execute the test in CPU only build, and fixed a bug exposed in c_api_test by this change. 2020-04-14 17:37:00 -07:00
Chao Mei
ec7d51c3bf Remove -pthread when compiling for WebAssembly.
PiperOrigin-RevId: 306357429
Change-Id: Id5c88a72da6eb6e5b7a9af291211a587c06605d8
2020-04-13 19:11:06 -07:00
Allen Lavoie
109fd384bd Add a way to register custom devices with the Python TFE_Context
Reapplying cl/305762978 / 17b7bc01bc

PiperOrigin-RevId: 305796963
Change-Id: Ic2e8e962a04600bf0847ae081887343edc32c918
2020-04-09 17:50:19 -07:00
Mihai Maruseac
3f70de8266 Automated rollback of 17b7bc01bc
PiperOrigin-RevId: 305779485
Change-Id: Ifa9eda9d594916b0e9ddb57d52cb69cb534ae56a
2020-04-09 16:07:38 -07:00
Allen Lavoie
17b7bc01bc Add a way to register custom devices with the Python TFE_Context
The API accepts TFE_RegisterCustomDevice arguments as PyCapsules, so each custom device will need some method to create those. Presumably most custom devices will end up wrapping the PyCapsule creation+registration rather than exposing it to the user.

No public API yet, but this is roughly what I have in mind at the moment.

This only works with --config=monolithic or when the custom device registration is bundled with pywrap_tensorflow.so right now since that has its own copy of the C API. Something like this could work if we switched pywrap_tensorflow.so to instead rely on libtensorflow.so for the C API, then custom device extensions could link against that.

PiperOrigin-RevId: 305762978
Change-Id: I4d2d9bd9c01ba22391e138244a3948bae8963c5c
2020-04-09 14:42:08 -07:00
Amit Patankar
5fb9558424 Removing the stale py_wrap_cc and swig compiler rules from TensorFlow.
PiperOrigin-RevId: 305535788
Change-Id: I86032bdb11c08e8a647ded3def75423bace80ca9
2020-04-08 12:56:03 -07:00
Amit Patankar
3b7ba8030f Adding comments to deprecate tf_py_wrap_cc.
PiperOrigin-RevId: 305510947
Change-Id: I9576c50bae9798d3c68fa327e162b1f315f2972b
2020-04-08 10:58:55 -07:00
Andrew Audibert
5a890478b7 Use tf_grpc_cc_dependency in tensorflow/core/distributed_runtime
Also create a similar tf_grpc_dependency function for the third_party/tensorflow:grpc dependency.

PiperOrigin-RevId: 304494463
Change-Id: I7a8684a5283ce10d7d586cfe0fb0b4a6506a6866
2020-04-02 15:55:02 -07:00
Rohan Jain
811cd600ee Creates a tfrt_enabled flag for TF python tests which if set will run the test with TFRT enabled. It creates a new BUILD target for tests when this flag is set which ensures that the EagerContext for that test has tfrt_enabled.
PiperOrigin-RevId: 304278801
Change-Id: I03c61c997d2be126399040cfabb600c62b5cf4cc
2020-04-01 16:03:33 -07:00
Andrew Audibert
c1f9a95117 [tf.data service] Implement dataset registration and iteration creation ops.
PiperOrigin-RevId: 304264765
Change-Id: Iaaa3ea3f8e125f287b67a985bef4d8f8fb658803
2020-04-01 14:43:42 -07:00
Alexander Grund
cc2f3e2ccf Guard -lrt adding in check for linux variant 2020-03-20 09:32:14 +01:00
Alexander Grund
1751e3c8de Add -lrt to linkflags
Fixes compilation on e.g. older CentOS, see for details 
2020-03-20 09:32:14 +01:00
Mihai Maruseac
b8cdd18825 Roll back
Breaks on MacOS:

```
ERROR: /Volumes/BuildData/tmpfs/tensor_flow/tensorflow/cc/BUILD:507:1: Couldn't build file tensorflow/cc/ops/array_ops_gen_cc: Linking of rule '//tensorflow/cc:ops/array_ops_gen_cc' failed (Exit 1)
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
PiperOrigin-RevId: 301890882
Change-Id: I3b98bf8bae271567fa31fccce15269460ef52c81
2020-03-19 14:07:31 -07:00
Alexander Grund
5c90d76d41 Add -lrt to linkflags
Fixes compilation on e.g. older CentOS, see for details 
2020-03-19 16:56:51 +01:00
Tres Popp
1a71a3ac1c Add xla versions of tensorflow python tests.
These tests are marked as manual, so they will not run automatically in testing.
This is in consideration of test timing and resource utilization, but these tests are expected to be passing.

PiperOrigin-RevId: 301185842
Change-Id: I7967440ffa8cd149d43a702ab11c5a3f19cc98a4
2020-03-16 10:30:10 -07:00
Taehee Jeong
373069d559 Export the get_num_test_registerer_calls function from C++ to Python with pybind11 instead of swig. This is part of a larger effort to deprecate swig and eventually with modularization break pywrap_tensorflow into smaller components. It will also make exporting C++ ops to Python significantly easier. Please refer to https://github.com/tensorflow/community/blob/master/rfcs/20190208-pybind11.md for more information.
Also modified pybind_extension to accept additional symbols to export.

PiperOrigin-RevId: 300483745
Change-Id: I7168f25688e52e84679732531c7cb22befe29d85
2020-03-11 23:15:17 -07:00
Eugene Brevdo
6729fb06d3 [TF Build] Bugfix to bugfix: ensure to check clean_dep'd version of to_add in tf_py_test.
PiperOrigin-RevId: 300350219
Change-Id: I482b087bc94528a4aa9b64833d523119a14558c4
2020-03-11 10:13:52 -07:00
Eugene Brevdo
003659ffcc Bugfixes to TF to allow tensorflow_serving to build.
PiperOrigin-RevId: 300195183
Change-Id: I20c40f96400013d507053accb7bf19f1f9083330
2020-03-10 15:50:36 -07:00
Amit Patankar
2b6b5d69cf Make the option to link in framework significantly easier for pybind targets.
PiperOrigin-RevId: 300179250
Change-Id: I126743f13d84e9317dfcd1b9bcb4dbffbca7aa63
2020-03-10 14:37:15 -07:00
A. Unique TensorFlower
f827c02390 Use exec_tools rather than tools in tensorflow.bzl to allow transitive dependencies to use python3 tools and deps in genrules
PiperOrigin-RevId: 299023196
Change-Id: I99981272330b060e9581c5c2a2f3992d524ae287
2020-03-04 22:30:55 -08:00
Eugene Brevdo
5d5b942203 [TF XLA AOT] Make sure required sources are included in pip package.
(bugfix) We thought the previous CL ensured this, but looks like there
were some missing pieces in the genrule & MANIFEST files.

PiperOrigin-RevId: 298715688
Change-Id: Ib0a20cb10fb3b36686419b02c2f8ab6afd438d57
2020-03-03 16:04:46 -08:00
Eugene Brevdo
c8fa5eae14 Add standalone XLA AOT runtime target + relevant .cc sources to pip package.
This target and its src/hdr filegroups can be used as a "single source of truth"
to identify the .cc and .h files necessary to build the XLA AOT runtime.

We export these .cc files as part of the tf pip package so that users
who use e.g. saved_model_cli aot compilation know which additional files are
required to build a library or binary around their object file.

As a followup we'll provide a cmake file that builds these to .o and includes
the correct dependencies on absl and nsync cmake files.

Additionally update the version of abseil so we can get the new cord dependency.

PiperOrigin-RevId: 298391947
Change-Id: I70cab3b5e8de48bcb42c5ec329dd0adf9303136a
2020-03-02 10:56:42 -08:00
A. Unique TensorFlower
dd3824cd33 Internal change
PiperOrigin-RevId: 297987778
Change-Id: I71eb84f8cf01ee16e0a9b23346d567478450dd58
2020-02-28 19:39:59 -08:00
Eugene Brevdo
a7a7e8ae75 Add standalone XLA AOT runtime target + relevant .cc sources to pip package.
This target and its src/hdr filegroups can be used as a "single source of truth"
to identify the .cc and .h files necessary to build the XLA AOT runtime.

We export these .cc files as part of the tf pip package so that users
who use e.g. saved_model_cli aot compilation know which additional files are
required to build a library or binary around their object file.

As a followup we'll provide a cmake file that builds these to .o and includes
the correct dependencies on absl and nsync cmake files.

Additionally update the version of abseil so we can get the new cord dependency.

PiperOrigin-RevId: 297986445
Change-Id: Ia5a4d9a6b0673c9edcd5d889d888235ca5f5453b
2020-02-28 19:26:44 -08:00
A. Unique TensorFlower
5473ad460d Internal refactoring for metrics.
PiperOrigin-RevId: 297214293
Change-Id: I9ef1510677669bc9c21de5839fde7ed42421fb6d
2020-02-25 15:13:16 -08:00
Mihai Maruseac
71b4e840d7 Replaced tools with exec_tools in genrules.
PiperOrigin-RevId: 297150637
Change-Id: I4b807e07a6b9072d53191ee7c2c3634cc0ca8e98
2020-02-25 10:48:49 -08:00
A. Unique TensorFlower
f65d00f2f5 Replaced tools with exec_tools in genrules.
PiperOrigin-RevId: 297015992
Change-Id: I27215c80ef07062faea51ae2cfb366996f19b0f1
2020-02-24 18:16:06 -08:00
A. Unique TensorFlower
f396035891 Upgrade and rename external dependency grpc in workspace for bazel.
Fixes 

Downstream projects depending on TensorFlow: If bazel complains, please substitute `@zlib_archive` with `@zlib`, and `@grpc` with `@com_github_grpc_grpc` in WORKPLACE.

PiperOrigin-RevId: 295824868
Change-Id: If2259d59e9d82543369e5670916b1398374c9889
2020-02-18 14:40:26 -08:00
Amit Patankar
c4c8b17313 Now that we have removed the tensorflow.i file, bazel is doing some link
optimization which causes pywrap_tensorflow_internal.so not to be linked to
libtensorflow_framework.so. To prevent this behavior we have added a dependency
on a cc_import target in tf_cc_shared_object.

PiperOrigin-RevId: 294952433
Change-Id: Id49e7abb1171fbe5c00c0a6389ef57d9bb5713b7
2020-02-13 11:04:59 -08:00
A. Unique TensorFlower
16d4b320f0 More refactoring of the portable builds.
PiperOrigin-RevId: 294873040
Change-Id: Ic1805c0cbfa90e0351c3012a1af47583cd54341c
2020-02-13 03:01:28 -08:00