knl = lp.make_kernel(
"{ [i, j, k, k1]: 0<=i, j, k, k1<256 }",
"""
temp_cnst[k] = 2.0 {id=insn_1}
temp_cnst_2[k1] = 2*temp_cnst[k1] {id=insn_4}
c[i, j] = reduce(sum, k, a[i,k]*b[k,j]*temp_cnst_2[k]) {id=insn_2}
c[i, j] = reduce(sum, k1, a[i,k1]*b[k1,j]*temp_cnst_2[k1]) {id=insn_3}
""")
processed_knl = lp.preprocess.preprocess_kernel(knl)
fixed_knl = processed_knl.copy()
while not lp.has_schedulable_iname_nesting(fixed_knl):
iname, insn = next(lp.get_iname_duplication_options(fixed_knl))
fixed_knl = lp.duplicate_inames(fixed_knl, iname, insn)
print('After all this duplication business, we have'
' has_schedulable_iname_nesting =',
lp.has_schedulable_iname_nesting(fixed_knl))
knl = fixed_knlI am receiving the error message: ERROR: Sorry--loo.py did not find a schedule for your kernel..
In the case of the smaller kernel the lp.has_schedulable_iname_nesting directly returns True hence it does not enter the while loop. But in mixed kernel case, after doing some duplications it succesfully enters and exits the while loop and still gives out the same scheduling error and performing some iname_duplication transformations.