提交 ea0e6bf3 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Clean up ifelse test

上级 865099c2
...@@ -621,26 +621,22 @@ class NotImplementedOp(Op): ...@@ -621,26 +621,22 @@ class NotImplementedOp(Op):
raise NotImplementedError() raise NotImplementedError()
def test_ifelse(): @aesara.config.change_flags(vm__lazy=True)
def test_ifelse_lazy_c():
a = scalar() a = scalar()
b = generic() b = generic()
c = generic() c = generic()
notimpl = NotImplementedOp() notimpl = NotImplementedOp()
lazys = [True]
# We need lazy to end up being True for this test.
if aesara.config.vm__lazy in [True, None]:
lazys = [True, None]
cloops = [True, False] cloops = [True, False]
if aesara.config.cxx == "": if aesara.config.cxx == "":
cloops = [False] cloops = [False]
for cloop in cloops: for use_cloop in cloops:
for lazy in lazys: for lazy in [True, None]:
linker = aesara.link.vm.VMLinker(use_cloop=cloop, lazy=lazy) linker = aesara.link.vm.VMLinker(use_cloop=use_cloop, lazy=lazy)
f = function( f = function(
[a, b, c], [a, b, c],
ifelse(a, notimpl(b), c), ifelse(a, notimpl(b), c),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论