Tag scales for external data#15925
Conversation
| ctypes.POINTER(ctypes.c_char * num_bytes), | ||
| ).contents | ||
| scale_name = hashlib.sha256(bytes(scale_array)).hexdigest() | ||
| scale_name = "scale_" + scale_name |
There was a problem hiding this comment.
add this for debugging purposes
This PR needs a
|
55c015e to
4a1e005
Compare
| ) | ||
| sha256_hash = hashlib.sha256(bytes(array)) | ||
| named_key = sha256_hash.hexdigest() | ||
| named_key = tensor.name + "_" + sha256_hash.hexdigest() |
There was a problem hiding this comment.
Do you plan on landing this PR?
There was a problem hiding this comment.
@metascroy yeah - adding the tensor name to the hash for general debuggability until we can use names instead of hash
4a1e005 to
b56f3cf
Compare
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15925
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit b56f3cf with merge base 92bf722 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Differential Revision: D87579688 Pull Request resolved: pytorch#15925
Summary
Currently scales are only saved to PTE segments (not PTD file). Allow them to be added to PTD as well.
Test plan
Test with linear module quantized with torchao quantize_