benchmarks/layer_benchmark/core_benchmark.py/benchmark_einsum_dense
def benchmark_einsum_dense(
    num_samples,
    batch_size,
    jit_compile=True,
):
    layer_name = "EinsumDense"
    init_args = {
        "equation": "abc,cd->abd",
        "output_shape": (None, 256),
    }
    benchmark = LayerBenchmark(
        layer_name,
        init_args,
        input_shape=[256, 256],
        jit_compile=jit_compile,
    )

    benchmark.benchmark_predict(
        num_samples=num_samples,
        batch_size=batch_size,
    )

    benchmark.benchmark_train(
        num_samples=num_samples,
        batch_size=batch_size,
    )