Thanks for your reply!
I ran the tmp.py script and get the following output:
GeForce RTX 3090
1.7.1
11.0
Segmentation fault (core dumped)

If mean and scale are CPU tensors, everything is fine.
GeForce RTX 3090
1.7.1
11.0
MultivariateNormal(loc: torch.Size([3]), covariance_matrix: torch.Size([3, 3]))

My python environment is created by conda and the python version is 3.6.