### What this PR does / why we need it? Fix the bug in torch 2.5.1 that raising segment fault when enable `pin_memory` while creating a tensor using `torch.tensor`. ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? --------- Signed-off-by: shen-shanshan <467638484@qq.com>