is_cuda
RotationKey.is_cuda- Is
Trueif the rotation key is stored on the GPU,Falseotherwise.
- Output
- boolean
from desilofhe import Engine
gpu_engine = Engine(mode="gpu")
gpu_secret_key = gpu_engine.create_secret_key()
gpu_rotation_key = gpu_engine.create_rotation_key(gpu_secret_key)
assert gpu_rotation_key.is_cuda
cpu_engine = Engine(mode="cpu")
cpu_secret_key = cpu_engine.create_secret_key()
cpu_rotation_key = cpu_engine.create_rotation_key(cpu_secret_key)
assert not cpu_rotation_key.is_cuda