MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CastExpressionFromTensor

Function CastExpressionFromTensor

tensorflow/compiler/tf2xla/xla_op_kernel.cc:53–59  ·  view source on GitHub ↗

Retrieves an XlaExpression that was allocated by a previous Op.

Source from the content-addressed store, hash-verified

51
52// Retrieves an XlaExpression that was allocated by a previous Op.
53static const XlaExpression* CastExpressionFromTensor(const Tensor& tensor) {
54 const XlaExpression* expression =
55 reinterpret_cast<const XlaExpression*>(tensor.tensor_data().data());
56 CHECK(expression->kind() != XlaExpression::Kind::kInvalid)
57 << expression->HumanString();
58 return expression;
59}
60
61// Assigns an XlaExpression to a tensor on an XLA compilation device.
62static void AssignExpressionToTensor(Tensor* tensor,

Callers 8

xla_op_kernel.ccFile · 0.85
input_typeMethod · 0.85
InputTypeMethod · 0.85
InputListMethod · 0.85
ReadVariableInputTensorFunction · 0.85
GetResourceInputMethod · 0.85
AssignVariableTensorFunction · 0.85

Calls 4

tensor_dataMethod · 0.80
dataMethod · 0.45
kindMethod · 0.45
HumanStringMethod · 0.45

Tested by

no test coverage detected