Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

nufhe not integrating with gradio #45

@bpradeep508

Description

@bpradeep508

To create a public link, set share=True in launch().
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1']
['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1']
twos completed
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1431, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1109, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 706, in wrapper
response = f(*args, **kwargs)
File "", line 111, in greet
ciX=ctx.encrypt(secret_key, A)
File "/usr/local/lib/python3.10/dist-packages/nufhe/api_high_level.py", line 232, in encrypt
return encrypt(self.thread, self.rng, secret_key, message)
File "/usr/local/lib/python3.10/dist-packages/nufhe/api_low_level.py", line 277, in encrypt
result = empty_ciphertext(thr, key.params, message.shape)
File "/usr/local/lib/python3.10/dist-packages/nufhe/api_low_level.py", line 302, in empty_ciphertext
return LweSampleArray.empty(thr, params.in_out_params, shape)
File "/usr/local/lib/python3.10/dist-packages/nufhe/lwe.py", line 154, in empty
a = thr.array(shape + (params.size,), Torus32)
File "/usr/local/lib/python3.10/dist-packages/reikna/cluda/cuda.py", line 191, in array
return Array(
File "/usr/local/lib/python3.10/dist-packages/reikna/cluda/cuda.py", line 89, in init
gpuarray.GPUArray.init(
File "/usr/local/lib/python3.10/dist-packages/pycuda/gpuarray.py", line 268, in init
self.gpudata = self.allocator(self.size * self.dtype.itemsize)
pycuda._driver.LogicError: cuMemAlloc failed: invalid device context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions