小编clo*_*ayx的帖子

使用 Flask 时 PyCUDA 上下文错误

我正在使用 PyCUDA 来实现 smooth_local_affine,如下所示。当我简单地在Linux上运行该程序时,它运行得很好。但是当我尝试在 Flask 上下文下导入它时:

from smooth_local_affine import smooth_local_affine
from flask import Flask
app = Flask(_name_)
...
Run Code Online (Sandbox Code Playgroud)

出现以下错误:

-------------------------------------------------------------------  
PyCUDA ERROR: The context stack was not empty upon module cleanup.
-------------------------------------------------------------------   
A context was still active when the context stack was being cleaned up.  
At this point in our execution, CUDA may already have been deinitialized, 
so there is no way we can finish cleanly. The program will be aborted now. 
Use Context.pop() to avoid this problem. …
Run Code Online (Sandbox Code Playgroud)

python image-processing flask pycuda server

8
推荐指数
1
解决办法
6946
查看次数

标签 统计

flask ×1

image-processing ×1

pycuda ×1

python ×1

server ×1