Commit Graph

1599 Commits

Author SHA1 Message Date
A. Unique TensorFlower
63a277f28a First phase of nest.py migration to cc: move flatten_dict_items implementation from python to C++
PiperOrigin-RevId: 357815150
Change-Id: I3689d5f7b80a621ea3696d44b7b00116bcff6ee9
2021-02-16 15:20:09 -08:00
Mihai Maruseac
48ce4de8bf First phase of nest.py migration to cc: move flatten_dict_items implementation from python to C++
PiperOrigin-RevId: 357269999
Change-Id: Idf5366b6a72269c32e3b28697981551e8c6eda40
2021-02-12 14:39:47 -08:00
A. Unique TensorFlower
a320c3cd7d First phase of nest.py migration to cc: move flatten_dict_items implementation from python to C++
PiperOrigin-RevId: 357229554
Change-Id: Id835ddec89957c7670a2bacdf543673d19fa42d3
2021-02-12 11:23:11 -08:00
Allen Lavoie
36f19f2bcf Parallel device: support cancellation
Threads through a CancellationManager, and uses it to cancel all associated operations on failure.

PiperOrigin-RevId: 356806701
Change-Id: I7c41c6242f40018ec9385ed65771d08b3763365d
2021-02-10 13:06:10 -08:00
Chuanhao Zhuge
364fcf7c72 Fix the issue that test_util isn't allowed in keras tests.
PiperOrigin-RevId: 356611633
Change-Id: I60084c435466b27e9bd8586f539a91dcc9ab9ccb
2021-02-09 15:59:51 -08:00
A. Unique TensorFlower
26ed22700d Disable a few more Python tests that TFRT doesn't support.
PiperOrigin-RevId: 356605918
Change-Id: Ib8b5fcdb5203e3497a18e62d396ad2b7453fd0ff
2021-02-09 15:35:23 -08:00
Chuanhao Zhuge
18d86872ff Disable a few more Python tests that TFRT doesn't support.
PiperOrigin-RevId: 356578473
Change-Id: I5eaece2460d130a66ea7045e9f98697df1066538
2021-02-09 13:39:51 -08:00
Chuanhao Zhuge
0f26396d81 Disable a few tests that TFRT doesn't support.
PiperOrigin-RevId: 355663937
Change-Id: Iee2de395a6876c4b28165a056f02e2bce5a55caa
2021-02-04 11:35:56 -08:00
A. Unique TensorFlower
7da93d6761 Internal BUILD file change.
PiperOrigin-RevId: 354950370
Change-Id: Ie2b5dbc8e81051febc1951edf51aad4bfcea6455
2021-02-01 09:08:54 -08:00
Jiri Simsa
222861851e Remove unused RPC op kernels.
PiperOrigin-RevId: 354639187
Change-Id: I302f2cfc9b386f53cf0641461b699f3730a63150
2021-01-29 17:17:34 -08:00
Keith Rush
85d50ab3a0 Adds proto comparators and options for nan-equivalence to graph util.
PiperOrigin-RevId: 353883024
Change-Id: I05423b52de13571294867b9284901f1567577b2f
2021-01-26 09:35:06 -08:00
Christian Sigg
4838793e12 Comment out a number of google-internal targets when copybara-exporting instead of removing them.
PiperOrigin-RevId: 353848826
Change-Id: I0801c0e713a0c63597deb5aed31c8bdb37999c6a
2021-01-26 05:47:31 -08:00
TensorFlower Gardener
b444969f2a Merge pull request from ROCmSoftwarePlatform:google_upstream_rocm_misc_update_210118
PiperOrigin-RevId: 353101032
Change-Id: I1250b4f0b23ae581d10f33a461986c1f31fc7372
2021-01-21 14:21:02 -08:00
A. Unique TensorFlower
985ad0276a PY2 removal cleanup
PiperOrigin-RevId: 352907145
Change-Id: I82de30d92dc9c2b53215d6d5732c67afe339c23d
2021-01-20 17:11:44 -08:00
Deven Desai
4871a1c963 Removing no_rocm tag from the unit-tests that are now passing on the ROCm platform 2021-01-20 03:32:35 +00:00
Christian Sigg
daa61db597 [NFC] Expose a number of BUILD differences between Google and OSS through copybara:comment directives.
PiperOrigin-RevId: 352646325
Change-Id: I1d8923a574cdccb58dbc4d38d7d0aadb3171f5e7
2021-01-19 13:54:08 -08:00
Haoliang Zhang
489609b610 Temporarily disable cuda_asan test for //third_party/tensorflow/python:batch_ops_test_gpu.
PiperOrigin-RevId: 352621799
Change-Id: I692bd229c01a37fceccda6281d14e733fbee0d89
2021-01-19 12:05:25 -08:00
A. Unique TensorFlower
034633f23b PY2 removal cleanup
PiperOrigin-RevId: 352106691
Change-Id: I382d53c64f0d29da430b8cb6d2395a2cb281509e
2021-01-15 16:48:57 -08:00
A. Unique TensorFlower
1c4e662c7c This is internal change.
PiperOrigin-RevId: 351997884
Change-Id: I10aa5642a1a763acc0a1562006c5aa5431afcd3d
2021-01-15 06:41:47 -08:00
Allen Lavoie
571c19440d Allow components of parallel device tensors to have different shapes
Throws an error if the shape of the overall tensor is queried for now. The plumbing required to make the shape information look like not-fully-defined-shape graph tensors looks very shallow if we want to go that route.

This means that querying the shape of a parallel tensor is now a blocking operation (and needs a status return) rather than creation itself blocking.

PiperOrigin-RevId: 351907155
Change-Id: I2610613efd4bb6aafa44fc78ee53824fb6020b6a
2021-01-14 17:22:46 -08:00
Yanhua Sun
987e514e22 add more dep on core target
PiperOrigin-RevId: 350864534
Change-Id: I771b7ccb9b868ffec238333b114211952819e028
2021-01-08 17:26:56 -08:00
Jacques Pienaar
ef06907104 Use flib of attached context.
Stacks not part of proto. Moved to TF2 only test and run with TF2_BEHAVIOR env set.

PiperOrigin-RevId: 350861872
Change-Id: Id7e7f0c502e0acfd1c7d45a3ef64e4d99034a04e
2021-01-08 17:06:47 -08:00
Jacques Pienaar
133a9711dd Use flib of attached context.
Stacks not part of proto. Moved to TF2 only test and run with TF2_BEHAVIOR env set.

PiperOrigin-RevId: 350832704
Change-Id: I342bdf724a9842e9f1b3c49095d8db1ec0c56076
2021-01-08 14:10:33 -08:00
Pankaj Kanwar
c4f8aa9853 fixed the breakage. Re-submit plumbing of the enable_v2_behavior() call to C++
PiperOrigin-RevId: 350478865
Change-Id: Ib5baae7e822f646bbcd796f6760c9f7239f021af
2021-01-06 20:35:51 -08:00
A. Unique TensorFlower
74bf0bb671 Plumb the enable_v2_behavior() call to C++
PiperOrigin-RevId: 350202966
Change-Id: I5266b8e3259a041018875d1bd87b4fdeb41fbc98
2021-01-05 13:10:28 -08:00
Pankaj Kanwar
390e2deb75 Plumb the enable_v2_behavior() call to C++
PiperOrigin-RevId: 350174156
Change-Id: Ibb48a95bf8b0ca89e3a8e84ba8df0df204540a06
2021-01-05 10:58:18 -08:00
Dan Moldovan
9b83b647b9 Move stack more of the trace mappers and filters to C++. Simplify the API surface of extract_stack, and clean up its docstring.
PiperOrigin-RevId: 348459279
Change-Id: I1ae8afde96a7220df5fb6a95ace62f7c940a1e71
2020-12-21 06:45:42 -08:00
TensorFlower Gardener
ee11cf13ea Merge pull request from ROCmSoftwarePlatform:google_upstream_rocm_add_remove_no_rocm_tag
PiperOrigin-RevId: 348425014
Change-Id: I1f4ec5ab94f27ea201a9dbc8b53d337d03e01d6c
2020-12-21 00:32:48 -08:00
Yanhua Sun
112778a924 add BUILD file for python/util and refactor python/BUILD
PiperOrigin-RevId: 347652147
Change-Id: I97aa24d6a109ed5aec8fca9a9b5e3b2b1a96b760
2020-12-15 11:43:18 -08:00
Reed Wanderman-Milne
ba28d6de31 Support GPUs in BatchFunction.
Now multiple devices are supported within BatchFunction. Currently, inputs and outputs must still be on the CPU, as the concatenation/splitting is done on the CPU.

PiperOrigin-RevId: 347524478
Change-Id: Ib329987bf09513570c3c260e4c0834d6102a4364
2020-12-14 20:07:44 -08:00
Feng Liu
75643bde9d disable //tensorflow/python:tf_stack_test on windows
PiperOrigin-RevId: 347023357
Change-Id: Id2391dfd2067860c094ad6f73daa9099f38551b9
2020-12-11 10:23:24 -08:00
Yanhua Sun
2800f688ff Add python/lib BUILD and refactor python/BUILD
PiperOrigin-RevId: 346841489
Change-Id: Id8c9e27ccf012c7b9668e7fd56d5d97d3ff09370
2020-12-10 12:42:17 -08:00
A. Unique TensorFlower
82738f8e3c Visibility changes for Launchpad.
PiperOrigin-RevId: 346778231
Change-Id: I67202c31a247cfbe0ab3bc30e26e390d34a3345b
2020-12-10 07:26:26 -08:00
George Karpenkov
20d69d0834 Copy stack traces to instantiated functions.
Otherwise, instantiated functions have no Python stack traces, and one has to
get them manually through FunctionDefinitionLibrary.

More importantly, it makes it impossible to assign different stack traces in
cases where it is actually required: namely, inlining.

PiperOrigin-RevId: 346435458
Change-Id: I41a3188e453566fbae6d29b261eefe4d24cf6453
2020-12-08 16:33:18 -08:00
Peter Hawkins
24ffe9f729 Merge JAX and TF bfloat16 numpy extensions.
Some years back, I forked the TF bfloat16 numpy extension to create a JAX version of the same NumPy extension. The TF version has not been actively maintained, whereas the JAX version is substantially more feature-complete (e.g., it implements most of the NumPy ufuncs).

However, having two different NumPy extensions that register the same type causes problems, e.g., if someone loads the (less complete) TF implementation first it takes priority over the (more complete) JAX implementation. Fix this by merging the two implementations and replacing the TF bfloat16 implementation with the JAX version.

The best case would be to go one step further and move the bfloat16 code into its own pip package that can be shared by TF and JAX (and other systems), but we leave this for future work.

A side effect of this change is that calls to numpy.testing.assert_allclose require an explicit cast to a non-bfloat16 type.

PiperOrigin-RevId: 346350783
Change-Id: Ic4d26457f9c9f50ef4c31b4adc3e938101c8e037
2020-12-08 10:22:04 -08:00
Yanhua Sun
95bc751efa add BUILD file within python/platform/
PiperOrigin-RevId: 345708401
Change-Id: I47a9678ae0b51640e61c9c9b670361dc6edafde8
2020-12-04 10:48:47 -08:00
George Karpenkov
1943e58d29 Rollback of rollback of "Move the ownership of Python stack traces to Graph object, make them accessible from C++ API"
Move the ownership of Python stack traces to Graph object, make them accessible from C++ API

Expose stack printing options, implement common prefix filtering.

PiperOrigin-RevId: 345579757
Change-Id: I88673891e893b1f71a5b039e44f0bc30f190c18a
2020-12-03 18:39:36 -08:00
Yanhua Sun
77f04991aa Start a build target for core files
PiperOrigin-RevId: 345556110
Change-Id: Id178bd14dd641cb2469b2c34580b246f055d0e1d
2020-12-03 16:11:32 -08:00
A. Unique TensorFlower
90881b041f Move the ownership of Python stack traces to Graph object, make them accessible from C++ API
Expose stack printing options, implement common prefix filtering.

PiperOrigin-RevId: 345153254
Change-Id: Ifc2eb8b5a4208358787db346a06837c6907f409c
2020-12-01 20:13:04 -08:00
George Karpenkov
22220649d3 Move the ownership of Python stack traces to Graph object, make them accessible from C++ API
Expose stack printing options, implement common prefix filtering.

PiperOrigin-RevId: 345147201
Change-Id: Iafb94afc07a8bada1e1f5978a66f692b4a06668e
2020-12-01 19:17:34 -08:00
Kibeom Kim
9876fed313 Change //third_party/tensorflow/python:framework_importer_test test to small.
It was "large" and TAP filtered it so didn't run.  It takes 13 sec to run.

PiperOrigin-RevId: 345130363
Change-Id: Ica00310f2b548c282c3dea42f6218e59d595ce28
2020-12-01 17:20:55 -08:00
Anna R
7e52814467 Add stream_executor and kernel C API targets to libtensorflow_framework.so instead of pywrap_tensorflow so that registered devices/kernels aren't just available in python.
PiperOrigin-RevId: 345115713
Change-Id: I010cd7e7c580d1d615bfa9cced2d841a8b1ec382
2020-12-01 15:54:01 -08:00
Edward Loper
a7eb0f4531 Type converter for Python API parameters.
PiperOrigin-RevId: 344302045
Change-Id: I5a1a2f1ef59660882506a0a28d979aa61b5fc028
2020-11-25 13:02:33 -08:00
Deven Desai
b90cdb966b Adding no_rocm tag from unit-tests that are now failing on the ROCm platform 2020-11-25 02:06:27 +00:00
Meghna Natraj
0c1845ced0 Add a missing dependency to TensorFlow BUILD rule "framework"
PiperOrigin-RevId: 344148817
Change-Id: I6beddc8ca008253022b54b64a8a609572b67e0c5
2020-11-24 16:20:41 -08:00
Haoyu Zhang
f6e0ba743a Support GPUs in BatchFunction.
Now multiple devices are supported within BatchFunction. Currently, inputs and outputs must still be on the CPU, as the concatenation/splitting is done on the CPU.

PiperOrigin-RevId: 343979298
Change-Id: Icc2bd49fe66c4dd80622c921afacea427e87ac16
2020-11-23 20:28:30 -08:00
George Karpenkov
6423b06843 Internal change
PiperOrigin-RevId: 343978999
Change-Id: I570b91e56d27697eddb42015a77910634eb28039
2020-11-23 20:21:48 -08:00
Chuanhao Zhuge
ee886e2418 Disable certain python tests for TFRT.
These tests target features that TFRT don't have plan to support for single host training, including quantization, XLA, clusters.

PiperOrigin-RevId: 343969137
Change-Id: Ib0d3daa1f3b38545a30030b4be321ca40d15062e
2020-11-23 18:53:27 -08:00
A. Unique TensorFlower
2f4d749c04 Internal change
PiperOrigin-RevId: 343600096
Change-Id: I6c8dcf7fe14393116e1519f9c0b4087839f2da39
2020-11-20 18:11:11 -08:00
George Karpenkov
072be27c7b Internal change
PiperOrigin-RevId: 343583358
Change-Id: I034cf3a14216295cb7f920064f1d1af41afb956f
2020-11-20 16:25:46 -08:00