is_cuda
FixedRotationKey.is_cuda
- Is
True if the fixed rotation key is stored on the GPU, False otherwise.
from desilofhe import Engine
gpu_engine = Engine(mode="gpu")
gpu_secret_key = gpu_engine.create_secret_key()
gpu_fixed_rotation_key = gpu_engine.create_fixed_rotation_key(
gpu_secret_key, delta=1
)
assert gpu_fixed_rotation_key.is_cuda
cpu_engine = Engine(mode="cpu")
cpu_secret_key = cpu_engine.create_secret_key()
cpu_fixed_rotation_key = cpu_engine.create_fixed_rotation_key(
cpu_secret_key, delta=1
)
assert not cpu_fixed_rotation_key.is_cuda