Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(hlapi): ciphertext list decompress after safe_deser
After a safe_serialize/safe_deserialize, the CompressedCiphertextList was on Cpu. As the `get` method looked at the device of the data and not the device of the server_key to know where computation needs to happen, it meant that in this case decompressing using Gpu was impossible, only Cpu was usable (as data was always onlu on Cpu) The fix is twofold: * First, when deserializing, the data will use the current serverkey (if any) as a hint on where data should be placed * the `get` method now uses the server_key to know where computations needs to be done, which may incur a temporary copy/transfer on every call to `get` if the device is not correct. The API to move data has also been added Note that this was not the case when using regular serialize/deserialize as this would store the device, so that deserialize was able to restore into the same device (hence why the test which use serialie/deserialize did not fail). In hindsight, the ser/de impl should not save which device the data originated from
- Loading branch information