aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/variant_op_registry.cc
Commit message (Collapse)AuthorAge
* [TF] Variant improvements.Gravatar Eugene Brevdo2018-09-11
| | | | | | | | | | | | | | | | | | 1. Change Variant Decode to accept VariantTensorData (non-ref). This should allow some optimization in the future. In the meantime it means removing the variant.h include from tensor.h, since variant_encode_decode.h now relies on tensor.h and variant.h now relies on that. It also means we found a bunch of places where tensor.proto.h, variant.h, and mutex.h were being imported through tensor.h (along with a bunch of other crap); so now we directly import them in order to compile. 2. Move Variant registry to use TypeIndex instead of a TypeName string; this should speed up registry lookups. PiperOrigin-RevId: 212478896
* Workaround 'too perfect forwarding' issue in variant_op_registry (#16309)Gravatar Sami Kama2018-01-23
| | | | | | | | * Workaround 'too perfect forwarding' issue in variant_op_registry * Fix comment issue created by clang-format * Fix friend declaration for clang
* Internal Variant API allowing registering Variants to be copied from/to GPU.Gravatar Eugene Brevdo2017-10-03
| | | | | | | | | | Adds a test in the variant_op_copy_test. Modifies the base GPUDevice to use this registry if it sees a singleton variant. Modifies the rendezvous manager to do the same. PiperOrigin-RevId: 170908757
* Modify variant registry to have UnaryOp and BinaryOp registrations. Speed ↵Gravatar Eugene Brevdo2017-09-08
| | | | | | | | | | | | | | | up registry lookup. * Op type is described as an enum (separate enums for unary and binary ops). * Modified ZerosLike registrations to unary registrations with ZEROS_LIKE enum. * Added Add(a,b) registrations as binary registrations with ADD enum. * AddN op uses ADD BinaryOp registrations and ZerosLike op modified to use ZEROS_LIKE UnaryOp registrations. * Modified the registry tables' keys from string type to StringPiece type. The reduced copying should speed up registry lookups by ops. Required creating a backing store for device and type_name strings passed in at registration. PiperOrigin-RevId: 168020449
* Added registry for variants for op ZerosLike.Gravatar Eugene Brevdo2017-09-01
| | | | | | | | * Updated tf.zeros_like python wrapper to avoid calling tf.zeros on Variants. * tf.zeros_like for variants calls the appropriate callback for the given device and type_name. PiperOrigin-RevId: 167317274
* Implement Variant changes suggested by Manjunath Kudlur; simplify API.Gravatar Eugene Brevdo2017-08-24
| | | | | | | | | | | | | | | | | 1. Remove the self-mutating MaybeDecodeAndGet<>() in favor of the simple, original get<>(). 2. Remove mutexes and locks from everything. To allow tensorflow RPC to continue working transparently: 3. Add a registration mechanism for Variant decoding -- used by variant_coding within TensorFlow. 4. Add a MaybeDecodeAndCopy<>() const; for use by callers of Session::Run that get Tensors back which may contain encoded Variants. 5. Small bugfixes to Variant Encode impls and tensor FromProtoField and variant_coding. PiperOrigin-RevId: 166383211
* Add variant dtype op registry, first registration mechanism: shape ops.Gravatar Eugene Brevdo2017-08-22
A followup PR will have the actual modifications to the shape ops that make use of this registry. PiperOrigin-RevId: 166077425