(tensors)
| 34 | |
| 35 | |
| 36 | def _shared_pointers(tensors): |
| 37 | ptrs = defaultdict(list) |
| 38 | for k, v in tensors.items(): |
| 39 | ptrs[v.data_ptr()].append(k) |
| 40 | failing = [] |
| 41 | for _, names in ptrs.items(): |
| 42 | if len(names) > 1: |
| 43 | failing.append(names) |
| 44 | return failing |
| 45 | |
| 46 | |
| 47 | def convert_bin_to_safetensor_file( |
no outgoing calls
no test coverage detected