Make TestEmbeddingNNDeviceTypeCPU::test_EmbeddingBag_per_sample_weights_and_no_offsets_cpu_int32_float32 compatible with TorchDynamo (#120831)
Previously, the test case directly accesses the tensor data via tensor.data which is not supported on FakeTensor. So we manually copy the tensor as a workaround.
Fixes: https://github.com/pytorch/pytorch/issues/119788
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120831
Approved by: https://github.com/janeyx99