implement a function to convert a storage to copy-on-write (#100819)
implement a function to convert a storage to copy-on-write
Summary:
This will be used in the _lazy_clone() operator as well as reshape().
Test Plan: 100% coverage of reachable lines.
---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/pytorch/pytorch/pull/100819).
* #100821
* #100820
* __->__ #100819
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100819
Approved by: https://github.com/ezyang