is_cuda
ConjugationKey.is_cuda
- Is
True if the conjugation 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_conjugation_key = gpu_engine.create_conjugation_key(gpu_secret_key)
assert gpu_conjugation_key.is_cuda
cpu_engine = Engine(mode="cpu")
cpu_secret_key = cpu_engine.create_secret_key()
cpu_conjugation_key = cpu_engine.create_conjugation_key(cpu_secret_key)
assert not cpu_conjugation_key.is_cuda