Maybe this will work for you:
import torch 

class RoundNoGradient(torch.autograd.Function):
    @staticmethod
    def forward(ctx, x):
        return x.round()
    @staticmethod
    def backward(ctx, g):
        return g 

m = torch.nn.Conv2d(16, 33, 3, stride=2)
l = torch.nn.L1Loss()
input = torch.autograd.Variable(torch.randn(20, 16, 50, 100), requires_grad=True)
x = RoundNoGradient.apply(input)
#x = input.round()
y = m(x)
output = l(x, torch.autograd.Variable(torch.randn(20, 16, 50, 100)))
output.backward()
print(input.grad)