coreweave / tensorizer

Module, Model, and Tensor Serialization/Deserialization
MIT License
180 stars 25 forks source link

FIX: get_device method lacks MPS judgment branch #137

Open Zihann73 opened 3 months ago

Zihann73 commented 3 months ago

get_device() function in utils.py lacks MPS judgment branch, causing incompatibility on macOS machines.

Also sees https://github.com/coreweave/tensorizer/issues/136

FYI: https://pytorch.org/docs/master/tensor_attributes.html#torch-device

wbrown commented 3 months ago

@Zihann73 Thank you for this PR! I'll stand up a test environment on my MacOS X machine and make sure this works. I'm thinking about how to add a test case for this in GHA, as well.