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

Function InputIndex

tensorflow/compiler/tf2xla/xla_op_kernel.cc:145–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145static xla::StatusOr<int> InputIndex(XlaOpKernelContext* context,
146 absl::string_view name) {
147 int start, stop;
148 TF_RETURN_IF_ERROR(context->op_kernel().InputRange(name, &start, &stop));
149 if (stop != start + 1) {
150 return errors::InvalidArgument("OpKernel used list-valued input name '",
151 name,
152 "' when single-valued input was "
153 "expected");
154 }
155 return start;
156}
157
158Status XlaOpKernelContext::ConstantInput(absl::string_view name,
159 xla::Literal* constant_literal) {

Callers

nothing calls this directly

Calls 2

InvalidArgumentFunction · 0.85
InputRangeMethod · 0.80

Tested by

no test coverage detected