Commit Graph

15 Commits

Author SHA1 Message Date
Kazuaki Ishizaki
775a828aad minor spelling tweaks 2020-02-27 15:42:16 +09:00
Srinivas Vasudevan
5396e7a3cd Allow RandomBinomial op to broadcast parameters.
- Add multiple parameter broadcasting support for BCast. This will allow it to be used in multiparameter broadcasting contexts. This is specifically for ternary ops, but will be used to make other samplers like ParameterizedTruncatedNormal broadcast.

- Add batch index methods for generating a list of batch indices when the input vectors are flattened. This is used to get broadcasting on flattened inputs (which is used in the RandomBinomial sampler).

- Shard on the number of outputs. This allows us to scale better to Tensor inputs.

PiperOrigin-RevId: 281202841
Change-Id: I0b276e983bf31056677a67b4d5ce8ebc98d77930
2019-11-18 20:18:33 -08:00
A. Unique TensorFlower
99121926a8 Implement tf.broadcast_to in a way the can handle higher ranks. This version uses the broadcast optimizations in core/util/bcast.h, which is used for most broadcasting ops in TensorFlow.
PiperOrigin-RevId: 232975751
2019-02-07 17:29:26 -08:00
A. Unique TensorFlower
7817237d58 fix C++ header guards.
PiperOrigin-RevId: 209679086
2018-08-21 16:22:05 -07:00
A. Unique TensorFlower
c8b59c0468 Update copyright for 3p/tf/core.
Change: 123900938
2016-06-02 13:39:22 -07:00
Zongheng Yang
923fca5468 Introduce common cwise code for "sparse <op> dense"; use for cdiv, cmul.
Currently it supports broadcasting the dense side to the sparse side only.
Change: 121602996
2016-05-05 12:20:43 -07:00
Zongheng Yang
90caf0e179 Allow BCast to disable the optimization of grouping consecutive dimensions.
Also move a few helper functions into the BCast class.

Before:

Benchmark         Time(ns)    CPU(ns) Iterations
------------------------------------------------
BM_BCastSetup/0        114        114    6062466  different_shapes
BM_BCastSetup/1         20         20   34863786  same_shapes

After:

Benchmark         Time(ns)    CPU(ns) Iterations
------------------------------------------------
BM_BCastSetup/0        126        126    5562646  different_shapes
BM_BCastSetup/1         32         32   21627499  same_shapes

The performance hit likely stems from 1-2 branch mispredictions (~7ns per misprediction).
Change: 121437477
2016-05-03 18:01:30 -07:00
A. Unique TensorFlower
938902bade Sped up construction of BCast helper class for the very common case
where both shapes are the same by using much more straightforward
code to achieve the same ultimate initialization of the various
instance variables with simpler code.

Added benchmark for this to bcast_test.cc.  Speeds up the same_shape
case by 65% (67 ns to 23 ns for a two-dimensional shape) without
any real effect on the different shape case.

Run on machine with (40 X 2801 MHz CPUs); 2016/01/28-11:12:26
CPU: Intel Ivybridge with HyperThreading (20 cores) dL1:32KB dL2:256KB dL3:25MB
Benchmark                          Base (ns)  New (ns) Improvement
------------------------------------------------------------------
BM_BCastSetup/0                          122       122     +0.0%
BM_BCastSetup/1                           67        23    +65.7%
Change: 113374076
2016-01-29 20:15:44 -08:00
Josh Levenberg
351e028909 Global search & replace to move to the new location for
tensorflow/core/ files and build targets.
Change: 113073090
2016-01-26 11:00:22 -08:00
Josh Levenberg
b481783fe0 Move #include <vector> out of port.h to users of std::vector<>.
After this we can replace port.h with types.h.
Change: 112727463
2016-01-21 18:00:14 -08:00
Josh Levenberg
60bccf654a Drop macros.h from port.h now that everything that needs
macros.h #includes it directly.
Change: 111775240
2016-01-11 11:36:43 -08:00
Josh Levenberg
3ffa307e49 #include third_party/tensorflow/core/platform/macros.h
directly so we can drop it from port.h.
Change: 111621646
2016-01-07 13:25:55 -08:00
A. Unique TensorFlower
1c579361cd Added 'logging' import to control_flow_ops which is used in the file but not imported.
Change: 110842260
2016-01-05 14:05:27 -08:00
Manjunath Kudlur
9c3043ff3b TensorFlow: Improve performance of Alexnet
Changes:

* error message that refers to removed `DefaultSession` method.
* -Wnull-conversion warnings
* the "_start_time" attr for recvs when the flag "--brain_enable_scheduling_for_recvs" is set.
* typo in tutorial data download progress message.
* a typo ("however their installing"=>"however installing").
* typo, rename "TensorFlow Mechanics" to "How To" to be consistent with the website.
* a typo ("subtact"=>"subtract").
* protobuf examples in comments in tensorflow::Example.proto.
* formula formatting in MNIST beginner tutorial
* negative fraction-of-queue-full stats
* protobuf inclusion path so that Android demo will build under Blaze.
* small typo (moderatly > moderately)
* Session.run() to check that tensor arguments come from the session's graph.
* another six import
* seq2seq typo in bazel command

Base CL: 108349164
2015-11-20 10:30:41 -08:00
Manjunath Kudlur
f41959ccb2 TensorFlow: Initial commit of TensorFlow library.
TensorFlow is an open source software library for numerical computation
using data flow graphs.

Base CL: 107276108
2015-11-06 16:27:58 -08:00