Add template for tf.Cast
Also generate the kernels for all types of casts between signed int and float types. This requires some adaptations to our build macros so that we can also specify the output type of a kernel. PiperOrigin-RevId: 354067727
This commit is contained in:
parent
44deae2aa1
commit
fa059259bc
|
@ -35,12 +35,13 @@ namespace {
|
|||
|
||||
// TODO(herhut): Generate these out of op definitions.
|
||||
#define MAP_XLA_OPERATION_CWISE_UNARY(fn, sep) \
|
||||
fn(AbsOp) sep fn(CeilOp) sep fn(ClzOp) sep fn(CosOp) sep fn(ExpOp) \
|
||||
sep fn(Expm1Op) sep fn(FloorOp) sep fn(ImagOp) sep fn(IsFiniteOp) \
|
||||
sep fn(LogOp) sep fn(Log1pOp) sep fn(LogisticOp) sep fn(NotOp) \
|
||||
sep fn(NegOp) sep fn(PopulationCountOp) sep fn(RealOp) \
|
||||
sep fn(RoundOp) sep fn(RsqrtOp) sep fn(SignOp) sep fn(SinOp) \
|
||||
sep fn(SqrtOp) sep fn(TanhOp)
|
||||
fn(AbsOp) sep fn(CeilOp) sep fn(ClzOp) sep fn(ConvertOp) sep fn(CosOp) \
|
||||
sep fn(ExpOp) sep fn(Expm1Op) sep fn(FloorOp) sep fn(ImagOp) \
|
||||
sep fn(IsFiniteOp) sep fn(LogOp) sep fn(Log1pOp) sep fn(LogisticOp) \
|
||||
sep fn(NotOp) sep fn(NegOp) sep fn(PopulationCountOp) \
|
||||
sep fn(RealOp) sep fn(RoundOp) sep fn(RsqrtOp) \
|
||||
sep fn(SignOp) sep fn(SinOp) sep fn(SqrtOp) \
|
||||
sep fn(TanhOp)
|
||||
|
||||
// TODO(herhut): Generate these out of op definitions.
|
||||
#define MAP_XLA_OPERATION_CWISE_BINARY(fn, sep) \
|
||||
|
|
Loading…
Reference in New Issue