How to quantize torch.zeros_like(x)?

I am getting all kind of errors like:

RuntimeError: Could not run ‘aten::empty.memory_format’ with arguments from the ‘QuantizedCPUTensorId’ backend. ‘aten::empty.memory_format’ is only available for these backends: [CUDATensorId, SparseCPUTensorId, VariableTensorId, CPUTensorId, MkldnnCPUTensorId, SparseCUDATensorId].

when using hacky solutions like nn.quantized.FloatFunctional().mul(x,0)

What is the correct way to quantize this operation?

sorry, it seems that nn.quantized.FloatFunctional().mul_scalar(x,0) hacky solutions work in pytorch 1.5 (I was using 1.4).