Commit 9da3032
committed
Add a test for map_location="cpu"
Summary:
torchtune is using torch.load(file_name, map_location="cpu", mmap=True), so we add a test
to make sure this works with tensor subclass API
Test Plan:
python test/quantization/test_quant_api.py -k test_quantized_tensor_subclass_save_load_map_location
Reviewers:
Subscribers:
Tasks:
Tags:1 parent 05038a1 commit 9da3032
1 file changed
+22
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
638 | 660 | | |
639 | 661 | | |
640 | 662 | | |
0 commit comments