如何在 GPU 上使用 Numba 到 运行 z3py 求解器
how to use Numba to run z3py solver on GPU
我想 运行 z3 求解器方法,例如 'solver.check()' 在 GPU 上使用 Numba 来加速求解。
可能吗?我该怎么做?
我测试了“@jit”,但无法得到结果。
编辑:
这是我的代码:
@jit
def solve(self, goal):
solver = z3.Solver()
solver.reset()
solver.add(goal.as_expr())
satisfiability = solver.check() # Check satisfiability
目标参数为 z3 目标对象
不,这不可能。 Numba 不支持所有 Python 功能,也不支持所有 Python 库。请阅读 the documentation for more information about this. Besides this, this is also not possible to run a CPU code on the GPUs because they are completely different hardware architectures (and even if this would be possible, the resulting code would be certainly much slower on GPUs). For more information please read: this and this.
目前这既不可能,也不清楚要在 SMT 求解器中利用 GPU 究竟需要做什么。有关详细信息,请参阅此讨论:https://github.com/Z3Prover/z3/issues/1795
我想 运行 z3 求解器方法,例如 'solver.check()' 在 GPU 上使用 Numba 来加速求解。 可能吗?我该怎么做?
我测试了“@jit”,但无法得到结果。
编辑:
这是我的代码:
@jit
def solve(self, goal):
solver = z3.Solver()
solver.reset()
solver.add(goal.as_expr())
satisfiability = solver.check() # Check satisfiability
目标参数为 z3 目标对象
不,这不可能。 Numba 不支持所有 Python 功能,也不支持所有 Python 库。请阅读 the documentation for more information about this. Besides this, this is also not possible to run a CPU code on the GPUs because they are completely different hardware architectures (and even if this would be possible, the resulting code would be certainly much slower on GPUs). For more information please read: this and this.
目前这既不可能,也不清楚要在 SMT 求解器中利用 GPU 究竟需要做什么。有关详细信息,请参阅此讨论:https://github.com/Z3Prover/z3/issues/1795