@@ -12,7 +12,6 @@ static void quantize_per_channel_4d_contiguous(benchmark::State& state) {
12
12
at::Tensor a = at::rand ({batches, channels, height, width});
13
13
at::Tensor scales = at::rand ({channels});
14
14
at::Tensor zero_points = at::randint (
15
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
16
15
0 , 10 , {channels}, at::TensorOptions ().dtype (at::ScalarType::Int));
17
16
18
17
at::Tensor qa;
@@ -33,7 +32,6 @@ static void quantize_per_channel_4d_channels_last(benchmark::State& state) {
33
32
at::TensorOptions ().memory_format (at::MemoryFormat::ChannelsLast));
34
33
at::Tensor scales = at::rand ({channels});
35
34
at::Tensor zero_points = at::randint (
36
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
37
35
0 , 10 , {channels}, at::TensorOptions ().dtype (at::ScalarType::Int));
38
36
39
37
at::Tensor qa;
@@ -50,7 +48,6 @@ static void quantize_per_channel_2d(benchmark::State& state) {
50
48
at::Tensor a = at::rand ({channels, nelem});
51
49
at::Tensor scales = at::rand ({channels});
52
50
at::Tensor zero_points = at::randint (
53
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
54
51
0 , 10 , {channels}, at::TensorOptions ().dtype (at::ScalarType::Int));
55
52
56
53
at::Tensor qa;
@@ -63,11 +60,8 @@ static void quantize_per_channel_2d(benchmark::State& state) {
63
60
static void GenerateSizes4d (benchmark::internal::Benchmark* b) {
64
61
b->ArgNames ({" N" , " C" , " H" , " W" });
65
62
66
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
67
63
for (size_t n = 16 ; n < 256 ; n *= 2 ) {
68
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
69
64
for (size_t c = 4 ; c < 256 ; c *= 2 ) {
70
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
71
65
for (size_t hw = 4 ; hw < 256 ; hw *= 2 ) {
72
66
b->Args ({n, c, hw, hw});
73
67
}
@@ -78,9 +72,7 @@ static void GenerateSizes4d(benchmark::internal::Benchmark* b) {
78
72
static void GenerateSizes2d (benchmark::internal::Benchmark* b) {
79
73
b->ArgNames ({" C" , " N" });
80
74
81
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
82
75
for (size_t c = 4 ; c < 512 ; c *= 2 ) {
83
- // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
84
76
for (size_t n = 4 ; n < 512 ; n *= 2 ) {
85
77
b->Args ({c, n});
86
78
}
0 commit comments