is_cuda
SmallBootstrapKey.is_cuda
- 간이 부트스트랩 키가 GPU에 저장되어 있으면
True이고, 그렇지 않으면 False입니다.
from desilofhe import Engine
gpu_engine = Engine(use_bootstrap=True, mode="gpu")
gpu_secret_key = gpu_engine.create_secret_key()
gpu_small_bootstrap_key = gpu_engine.create_small_bootstrap_key(gpu_secret_key)
assert gpu_small_bootstrap_key.is_cuda
cpu_engine = Engine(use_bootstrap=True, mode="cpu")
cpu_secret_key = cpu_engine.create_secret_key()
cpu_small_bootstrap_key = cpu_engine.create_small_bootstrap_key(cpu_secret_key)
assert not cpu_small_bootstrap_key.is_cuda