sparseml icon indicating copy to clipboard operation
sparseml copied to clipboard

Allow buffers to set modifier's device

Open abhinavnmagic opened this issue 1 year ago • 0 comments

While applying modifiers, we utilize the module's device to set the correct device for the additional modules/buffers like fake quantization modules. Presently, we default to cpu in case the module doesn't have any parameters. This PR adds the capability to utilize the buffer's device in case there are no parameters in the module. The change is based on PyTorch's latest implementation from which the get_device function is adapted from.

abhinavnmagic avatar Dec 04 '23 12:12 abhinavnmagic