Stochastic pooling


Hello, everyone. Who has been implemented stochastic pooling op in tvm dsl?
I am write this dsl according to caffe,
but i found it a little difficult to write the DSL of tvm.compute logic according to caffe stochastic pooling.
Does anyone give me some helps?
Thank you very much!