Skip to content

Commit a56f4e2

Browse files
dzdangpytorchmergebot
authored andcommitted
[quant][core][better-engineering] Rename files in quantized directory to conform with non-quantized countertpart filenames
Summary: Names of analogous files in quantized directory (previously snake case) were inconsistent with their non-quantized filename counterparts (pascal case). This is the first of a series of PRs that changes all files in quantized (and sub-directories) dir to have pascal case. `aten/src/ATen/native/quantized/qconv_unpack.cpp` has not been renamed yet because (for reasons currently unknown) after making the name change, `import torch` produces the below error (`qlinear_unpack.cpp` renaming also seems to fail some phabricator CI tests for similar reasons). We suspect that these may be undefined errors and will revisit naming these files in a future PR. ``` terminate called after throwing an instance of 'c10::Error' what(): Type c10::intrusive_ptr<ConvPackedParamsBase<2> > could not be converted to any of the known types. Exception raised from operator() at ../aten/src/ATen/core/jit_type.h:1735 (most recent call first): frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x55 (0x7f26745c0c65 in /data/users/dzdang/pytorch/torch/lib/libc10.so) frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0xb1 (0x7f26745bdcd1 in /data/users/dzdang/pytorch/torch/lib/libc10.so) frame #2: <unknown function> + 0x1494e24 (0x7f2663b14e24 in /data/users/dzdang/pytorch/torch/lib/libtorch_cpu.so) frame #3: <unknown function> + 0xfed0bc (0x7f266366d0bc in /data/users/dzdang/pytorch/torch/lib/libtorch_cpu.so) frame #4: c10::detail::infer_schema::make_function_schema(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, c10::ArrayRef<c10::detail::infer_schema::ArgumentDef>, c10::ArrayRef<c10::detail::infer_schema::ArgumentDef>) + 0x5a (0x7f266366d71a in /data/users/dzdang/pytorch/torch/lib/libtorch_cpu.so) frame #5: c10::detail::infer_schema::make_function_schema(c10::ArrayRef<c10::detail::infer_schema::ArgumentDef>, c10::ArrayRef<c10::detail::infer_schema::ArgumentDef>) + 0x7b (0x7f266366e06b in /data/users/dzdang/pytorch/torch/lib/libtorch_cpu.so) frame #6: <unknown function> + 0x1493f32 (0x7f2663b13f32 in /data/users/dzdang/pytorch/torch/lib/libtorch_cpu.so) frame #7: <unknown function> + 0xe227dd (0x7f26634a27dd in /data/users/dzdang/pytorch/torch/lib/libtorch_cpu.so) frame #8: <unknown function> + 0x14e0a (0x7f268c934e0a in /lib64/ld-linux-x86-64.so.2) ..........................truncated............. ``` Test Plan: ``` python test/test_quantization.py ``` Pull Request resolved: pytorch#77037 Approved by: https://github.com/jerryzh168
1 parent 0d176be commit a56f4e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+48
-49
lines changed

aten/src/ATen/cpu/vec/vec256/vec256_qint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <ATen/cpu/vec/intrinsics.h>
77
#include <ATen/cpu/vec/vec_base.h>
8-
#include <ATen/native/quantized/affine_quantizer_base.h>
8+
#include <ATen/native/quantized/AffineQuantizerBase.h>
99

1010
#include <c10/util/irange.h>
1111
#include <c10/util/qint32.h>

aten/src/ATen/cpu/vec/vec512/vec512_qint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <ATen/cpu/vec/intrinsics.h>
77
#include <ATen/cpu/vec/vec_base.h>
8-
#include <ATen/native/quantized/affine_quantizer_base.h>
8+
#include <ATen/native/quantized/AffineQuantizerBase.h>
99

1010
#include <c10/util/irange.h>
1111
#include <c10/util/qint32.h>

aten/src/ATen/native/QuantizedLinear.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <ATen/WrapDimUtilsMulti.h>
1414
#include <ATen/cpp_custom_type_hack.h>
1515
#include <ATen/native/quantized/cpu/fbgemm_utils.h>
16-
#include <ATen/native/quantized/packed_params.h>
16+
#include <ATen/native/quantized/PackedParams.h>
1717

1818
#include <c10/util/irange.h>
1919

aten/src/ATen/native/RNN.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <ATen/ATen.h>
44
#include <ATen/NativeFunctions.h>
55
#include <ATen/core/op_registration/op_registration.h>
6-
#include <ATen/native/quantized/packed_params.h>
6+
#include <ATen/native/quantized/PackedParams.h>
77
#include <ATen/native/quantized/cpu/fbgemm_utils.h>
88
#include <ATen/native/quantized/cpu/QnnpackUtils.h>
99
#include <c10/util/irange.h>

aten/src/ATen/native/quantized/affine_quantizer.cpp renamed to aten/src/ATen/native/quantized/AffineQuantizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <ATen/native/quantized/affine_quantizer.h>
1+
#include <ATen/native/quantized/AffineQuantizer.h>
22
#include <cfenv>
33

44
#ifdef USE_FBGEMM

aten/src/ATen/native/quantized/affine_quantizer.h renamed to aten/src/ATen/native/quantized/AffineQuantizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <ATen/ATen.h>
44
#include <ATen/native/DispatchStub.h>
5-
#include <ATen/native/quantized/affine_quantizer_base.h>
5+
#include <ATen/native/quantized/AffineQuantizerBase.h>
66

77
namespace at {
88
namespace native {

aten/src/ATen/native/quantized/affine_quantizer_base.cpp renamed to aten/src/ATen/native/quantized/AffineQuantizerBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <ATen/native/quantized/affine_quantizer_base.h>
1+
#include <ATen/native/quantized/AffineQuantizerBase.h>
22
#include <c10/util/irange.h>
33
#include <cfenv>
44
#include <climits>
File renamed without changes.

aten/src/ATen/native/quantized/Copy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <ATen/native/quantized/Copy.h>
22

33
#include <ATen/ATen.h>
4-
#include <ATen/native/quantized/affine_quantizer.h>
4+
#include <ATen/native/quantized/AffineQuantizer.h>
55
#include <c10/util/irange.h>
66

77
namespace at {
File renamed without changes.

0 commit comments

Comments
 (0)