pytorch
6c78dc46 - [quant][gpu][core][bug fix] Added memset to CacheKey for quantized cudnn conv2d op (#76436)

Commit
2 years ago
[quant][gpu][core][bug fix] Added memset to CacheKey for quantized cudnn conv2d op (#76436) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/76436 In `quantized/cudnn/Conv.cpp`, memset was added for CacheKey. Memset is needed here because there is implicit padding added for CacheKey, and this can result in uninitialized padded values that are used for hashing ((see how at::native::ParamsHash is defined)). without memset, we can potentially come across a situation where two CacheKey objects have the same user defined parameters, but different padded values, resulting in different hash outputs. Test Plan: ``` python test/test_quantization.py -k test_qconv2d_cudnn ``` Reviewed By: jerryzh168 Differential Revision: D35965241 Pulled By: dzdang fbshipit-source-id: bdeab6c3d6d6066b71b2fb313ac851fe30ae5510 (cherry picked from commit 4ac2b7a858ac62f78b49da3cf43c76d9a7371d29)
Author
Committer
Parents
Loading