is_cuda

MergeBootstrapKey.is_cuda
Is True if the merge bootstrap key is stored on the GPU, False otherwise.
  • Output
    • boolean
from desilofhe import Engine

gpu_engine = Engine(use_bootstrap=True, mode="gpu")
gpu_secret_key = gpu_engine.create_secret_key()
gpu_merge_bootstrap_key = gpu_engine.create_merge_bootstrap_key(gpu_secret_key)

assert gpu_merge_bootstrap_key.is_cuda

cpu_engine = Engine(use_bootstrap=True, mode="cpu")
cpu_secret_key = cpu_engine.create_secret_key()
cpu_merge_bootstrap_key = cpu_engine.create_merge_bootstrap_key(cpu_secret_key)

assert not cpu_merge_bootstrap_key.is_cuda