Implement Quantized Version of Threshold Function (#39352)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39352
In this task, the quantized backend of the kernel is implemented for the threshold function, which clamps the entries in a tensor less than or equal to a given threshold to be a specified value.
The corresponding Python implementation and unit test are also added.
Test Plan:
1. On a devserver, build PyTorch from source by running the command `buck build mode/dev //caffe2:torch`
2. Run the unit test throught the command
`buck test mode/dev //caffe2/test:quantization -- test_qthreshold`
Reviewed By: z-a-f
Differential Revision: D21822446
fbshipit-source-id: e8c869664e6d4c664f0e7fa3957762992118c082