| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
* Fix comment issue created by clang-format
* Fix friend declaration for clang
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
A followup PR will have the actual modifications to the shape ops that
make use of this registry.
PiperOrigin-RevId: 166077425
|