Modify variant registry to have UnaryOp and BinaryOp registrations. Speed 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
Loading
Please sign in to comment