Use ctypes to serialize raw content for tensors. (#108287)
Summary:
There's a deadlock in current storage's implementation if the size of tensor is too large. Use ctypes to do serialization.
Test Plan:
python benchmarks/dynamo/huggingface.py --bfloat16 --accuracy --inference --device cuda --export-aot-inductor --only MT5ForConditionalGeneration
Reviewers:
Subscribers:
Tasks:
Tags:
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108287
Approved by: https://github.com/desertfire, https://github.com/malfet