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

Method Iota

tensorflow/compiler/xla/client/xla_builder.cc:678–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678XlaOp XlaBuilder::Iota(const Shape& shape, int64 iota_dimension) {
679 return ReportErrorOrReturn([&]() -> StatusOr<XlaOp> {
680 HloInstructionProto instr;
681 *instr.mutable_shape() = shape.ToProto();
682 instr.add_dimensions(iota_dimension);
683 return AddInstruction(std::move(instr), HloOpcode::kIota);
684 });
685}
686
687XlaOp XlaBuilder::Iota(PrimitiveType type, int64 size) {
688 return Iota(ShapeUtil::MakeShape(type, {size}), /*iota_dimension=*/0);

Callers 1

IotaFunction · 0.45

Calls 5

MakeShapeFunction · 0.85
add_dimensionsMethod · 0.80
IotaFunction · 0.70
mutable_shapeMethod · 0.45
ToProtoMethod · 0.45

Tested by

no test coverage detected