You could profile both workloads using e.g. torch.utils.benchmark in the nightly release or profile it manually. I guess the 2D layer would be faster, but ymmv depending on the used hardware and system setup.