How can topi.generic.schedule_reduce run succesfully?

c = tvm.compute( (K,N), lambda i,j: tvm.intrin.power((f[i,j]-m),2) , name=‘C’)
g = topi.sum(c2)
sg = topi.generic.schedule_reduce(g)

the code above error, it seems c and g can’t fuse automatically, but it code fails to work.

What should I do to make the code work successfully ?

I am not sure what is happening here, but to me it seems like some part of the pattern matching in schedule_reduce doesn’t work with an op here (something is missing a tag?).

Manually inlining seems produces reasonable IR:

import tvm
import topi
K = 1024
N = 1024
f = tvm.placeholder((K, N))
m = 0.1
c = tvm.compute( (K,N), lambda i,j: tvm.intrin.power((f[i,j]-m),2) , name='C')
g = topi.sum(c)
sg = tvm.create_schedule(g.op)
sg[c].compute_inline()
print(tvm.lower(sg, [g,f], simple_mode=True))

I know this seams reasonable, but it can’t schedule automatically.