Skip to content

Faster random number generation in fused_rowwise_random_quantization_ops#10634

Closed
wenwei202 wants to merge 1 commit intopytorch:masterfrom
wenwei202:export-D8849770
Closed

Faster random number generation in fused_rowwise_random_quantization_ops#10634
wenwei202 wants to merge 1 commit intopytorch:masterfrom
wenwei202:export-D8849770

Conversation

@wenwei202
Copy link
Member

Summary:
Depends on D8745940

Trying example: test_speed_of_rand_quantization(self=<caffe2.caffe2.fb.net_transforms.tests.rand_quantization_op_speed_test.TestSpeedFloatToFusedRandRowwiseQuantized testMethod=test_speed_of_rand_quantization>, bitwidth_=2, random_=True
, data_shape_=array([1024, 1224]), gc=, dc=[])
Sub+Scale+Sum time: 1.28631591796875 ms
Quantizing time: 1.3524532318115234 ms (1.0514160735468565X)
De-quantizing time: 0.43795108795166016 ms (0.34046930604982206X)

Differential Revision: D8849770

@zou3519 zou3519 added the caffe2 label Aug 21, 2018
@wenwei202 wenwei202 added the oncall: quantization Quantization support in PyTorch label Aug 21, 2018
@harouwu harouwu self-requested a review August 22, 2018 00:17
Copy link
Contributor

@harouwu harouwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operator LG. Please wait until checks are passed before merging

…ops (pytorch#10634)

Summary:
Pull Request resolved: pytorch#10634

Depends on D9347706

```
Trying example: test_speed_of_rand_quantization(self=<caffe2.caffe2.python.operator_test.rand_quantization_op_speed_test.TestSpeedFloatToFusedRandRowwiseQuantized testMethod=test_speed_of_rand_quantization>, bitwidth_=2, random_=True, data_shape_=array([1024, 1224]), gc=, dc=[, device_type: 1])
Sub+Scale+Sum time: 1.9944190979003908 ms
Quantizing time: 2.080512046813965 ms (1.0431669296609765X)
De-quantizing time: 0.7375001907348633 ms (0.36978195380863577X)
```

```
Trying example: test_speed_of_rand_quantization(self=<caffe2.caffe2.python.operator_test.rand_quantization_op_speed_test.TestSpeedFloatToFusedRandRowwiseQuantized testMethod=test_speed_of_rand_quantization>, bitwidth_=1, random_=True, data_shape_=array([1024, 1224]), gc=device_type: 1, dc=[, device_type: 1])
Sub+Scale+Sum time: 1.6691923141479492 ms
Quantizing time: 7.500243186950684 ms (4.493336761366071X)
De-quantizing time: 1.1209726333618164 ms (0.6715658967876477X)
```

Differential Revision: D8849770

fbshipit-source-id: bf7f306bc085e3160ad5b7a0f81ae8ff823d2a3a
PenghuiCheng pushed a commit to PenghuiCheng/pytorch that referenced this pull request Sep 11, 2018
…ops (pytorch#10634)

Summary:
Pull Request resolved: pytorch#10634

```
Trying example: test_speed_of_rand_quantization(self=<caffe2.caffe2.python.operator_test.rand_quantization_op_speed_test.TestSpeedFloatToFusedRandRowwiseQuantized testMethod=test_speed_of_rand_quantization>, bitwidth_=2, random_=True, data_shape_=array([1024, 1224]), gc=, dc=[, device_type: 1])
Sub+Scale+Sum time: 1.9944190979003908 ms
Quantizing time: 2.080512046813965 ms (1.0431669296609765X)
De-quantizing time: 0.7375001907348633 ms (0.36978195380863577X)
```

```
Trying example: test_speed_of_rand_quantization(self=<caffe2.caffe2.python.operator_test.rand_quantization_op_speed_test.TestSpeedFloatToFusedRandRowwiseQuantized testMethod=test_speed_of_rand_quantization>, bitwidth_=1, random_=True, data_shape_=array([1024, 1224]), gc=device_type: 1, dc=[, device_type: 1])
Sub+Scale+Sum time: 1.6691923141479492 ms
Quantizing time: 7.500243186950684 ms (4.493336761366071X)
De-quantizing time: 1.1209726333618164 ms (0.6715658967876477X)
```

Reviewed By: jspark1105

Differential Revision: D8849770

fbshipit-source-id: 2bb2bac7e633f647f38e419ce980b8958f3bcae2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

caffe2 oncall: quantization Quantization support in PyTorch open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants