One way to accomplish this would be with the torch.max() function you mentioned:
X = th.FloatTensor([
    [-1, 2],
    [2, -1]
])
scalar = th.FloatTensor([1])

th.max(X, scalar.expand_as(X))

gives you
 1  2
 2  1
[torch.FloatTensor of size 2x2]

Please keep in mind that I’m playing with PyTorch for few days only, so that may not be the optimal solution.
EDIT I remember one of the devs mentioned they’re considering adding a autograd.Scalar, I guess it would make things nicer in this case.