Stochastic pooling

Hello, everyone. Who has been implemented stochastic pooling op in tvm dsl?
I am write this dsl according to caffe https://github.com/BVLC/caffe/blob/master/src/caffe/layers/pooling_layer.cu,
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!