def stackoverflow_25()

in Synthesis_incorporation/benchmarks/stackoverflow_benchmarks.py [0:0]


def stackoverflow_25():
    examples = [
        benchmark.Example(
            inputs=[
                3,
                4,
            ],
            output=[
                [1, 0, 0],
                [0, 1, 0],
                [0, 0, 1],
                [1, 0, 0],
                [0, 1, 0],
                [0, 0, 1],
                [1, 0, 0],
                [0, 1, 0],
                [0, 0, 1],
                [1, 0, 0],
                [0, 1, 0],
                [0, 0, 1],
                # [1.0, 0.0, 0.0],
                # [0.0, 1.0, 0.0],
                # [0.0, 0.0, 1.0],
                # [1.0, 0.0, 0.0],
                # [0.0, 1.0, 0.0],
                # [0.0, 0.0, 1.0],
                # [1.0, 0.0, 0.0],
                # [0.0, 1.0, 0.0],
                # [0.0, 0.0, 1.0],
                # [1.0, 0.0, 0.0],
                # [0.0, 1.0, 0.0],
                # [0.0, 0.0, 1.0],
            ],
        ),
    ]
    constants = []
    description = "copy the tensor torch.eye(3), 4 times"
    target_program = "torch.tile(torch.eye(in1), (in2, 1))"
    source = "https://stackoverflow.com/questions/53602691/duplicate-a-tensor-n-times"
    return benchmark.Benchmark(
        examples=examples,
        constants=constants,
        description=description,
        target_program=target_program,
        source=source,
        name="stackoverflow_25",
    )