提交 b9554e34 authored 作者: James Bergstra's avatar James Bergstra

small improvement to debugmode

上级 d9eebdd5
...@@ -276,7 +276,7 @@ class OptCheckLinker(OpWiseCLinker): ...@@ -276,7 +276,7 @@ class OptCheckLinker(OpWiseCLinker):
if not numpy.allclose(new_r_val, r_val): if not numpy.allclose(new_r_val, r_val):
problem = True problem = True
else: else:
print >> sys.stderr, 'WARNING: OptCheck Ignoring comparison of instances of', type(new_r_val) print >> sys.stderr, 'WARNING: OptCheck comparison of', type(new_r_val), 'NotImplementedError'
if problem: if problem:
print "OPTCHECK FAILURE" print "OPTCHECK FAILURE"
...@@ -299,8 +299,9 @@ class OptCheckLinker(OpWiseCLinker): ...@@ -299,8 +299,9 @@ class OptCheckLinker(OpWiseCLinker):
# because the incorrect result detected here will cause # because the incorrect result detected here will cause
# subsequent outputs to be incorrect. # subsequent outputs to be incorrect.
raise Exception("OptCheckFailure") raise Exception("OptCheckFailure")
print >> sys.stderr, 'OptCheck PASS'
if 0: if 0: #OLD CODE
#print out the summary of the first problematic equivalence group #print out the summary of the first problematic equivalence group
min_member = [] min_member = []
for problem_r in problematic: for problem_r in problematic:
......
...@@ -446,8 +446,7 @@ class GemmLocalOptimizer(LocalOptimizer): ...@@ -446,8 +446,7 @@ class GemmLocalOptimizer(LocalOptimizer):
gemm_of_sM_list = beta_L_plus_alpha_M(sL, mL, sR, mR) gemm_of_sM_list = beta_L_plus_alpha_M(sL, mL, sR, mR)
if gemm_of_sM_list: if gemm_of_sM_list:
assert len(gemm_of_sM_list) == 1 assert len(gemm_of_sM_list) == 1
inputs_without_ij = \ inputs_without_ij = [input for k, input in enumerate(sM_orig) if k not in (i,j)]
[input for k, input in enumerate(sM_orig) if k not in (i,j)]
new_add_inputs = (inputs_without_ij + gemm_of_sM_list + other_inputs) new_add_inputs = (inputs_without_ij + gemm_of_sM_list + other_inputs)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论