[sparsity] Moving only the C++ files from internal to OSS (#56553)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56553
This splits the previous diff into multiple parts. This introduces only the c++ files.
The unittests pass as part of the internal build. Will be put in the OSS in the later PRs
Test Plan:
`buck test mode/opt //caffe2/torch/fb/model_optimization:sparsity_test`
```
Parsing buck files: finished in 2.0 sec
Creating action graph: finished in 16.4 sec
Building: finished in 55.0 sec (100%) 20264/20264 jobs, 16 updated
Total time: 01:13.6 min
More details at https://www.internalfb.com/intern/buck/build/c9c5e69e-ce00-4560-adce-58b68bc43e47
Tpx test run coordinator for Facebook. See https://fburl.com/tpx for details.
Running with tpx session id: 1e678a07-0689-45b4-96f3-54d0a3181996
Trace available for this run at /tmp/tpx-20210415-161113.966600/trace.log
Started reporting to test run: https://www.internalfb.com/intern/testinfra/testrun/3096224795029304
✓ ListingSuccess: caffe2/torch/fb/model_optimization:sparsity_test - main (4.186)
✓ Pass: caffe2/torch/fb/model_optimization:sparsity_test - test_sparse_qlinear (caffe2.torch.fb.model_optimization.test.sparsity.quantized_test.TestQuantizedSparseLayers) (1.752)
✓ Pass: caffe2/torch/fb/model_optimization:sparsity_test - test_sparse_qlinear (caffe2.torch.fb.model_optimization.test.sparsity.quantized_test.TestQuantizedSparseKernels) (1.884)
✓ Pass: caffe2/torch/fb/model_optimization:sparsity_test - test_sparse_qlinear_serdes (caffe2.torch.fb.model_optimization.test.sparsity.quantized_test.TestQuantizedSparseLayers) (2.013)
Summary
Pass: 3
ListingSuccess: 1
```
Reviewed By: ailzhang
Differential Revision: D27833226
fbshipit-source-id: a47707117de950a9794f79e50a544aa13542c1e1