Skip to content

Commit bdca6e3

Browse files
authored
[ET-VK][ez] Use standard quant naming scheme for quantized ops (#10616)
## Context Use standard naming scheme for quantized operators introduced in the previous PR. For weight only quantized linear operators, the names introduced are: `linear_qcsnw`: * q - quantized * c - per-channel / channelswise * s - symmetric * n - number of bits (qcs4w for 4-bit quant, qcs8w for 8-bit quant) * w - weight quantized `linear_qga4w`: * q - quantized * g - per-group / groupwise * a - affine * 4 - quantized to 4 bits * w - weight quantized ## Changes Rename instances of `q_8w_linear` to `linear_qcs8w` or `linear_qcsnw`. Rename instances of `q_4w_linear` to `linear_qga4w`. Rename cpp files to match the new naming convention. Differential Revision: [D73941992](https://our.internmc.facebook.com/intern/diff/D73941992/)
1 parent 19bfbc3 commit bdca6e3

13 files changed

+52
-52
lines changed

backends/vulkan/runtime/graph/ops/glsl/q_8w_linear.yaml renamed to backends/vulkan/runtime/graph/ops/glsl/linear_qcsnw.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
q_8w_linear:
7+
linear_qcsnw:
88
parameter_names_with_default_values:
99
DTYPE: float
1010
STORAGE: texture3d
@@ -18,6 +18,6 @@ q_8w_linear:
1818
- VALUE: texture3d
1919
- VALUE: buffer
2020
shader_variants:
21-
- NAME: q_8w_linear_W_packed_W_packed
22-
- NAME: q_8w_linear_W_packed_H_packed
21+
- NAME: linear_qcs8w_W_packed_W_packed
22+
- NAME: linear_qcs8w_W_packed_H_packed
2323
MAT2_PACKING: H_packed

backends/vulkan/runtime/graph/ops/glsl/q_8w_linear_coop.yaml renamed to backends/vulkan/runtime/graph/ops/glsl/linear_qcsnw_coop.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
q_8w_linear_coop:
7+
linear_qcsnw_coop:
88
parameter_names_with_default_values:
99
DTYPE: float
1010
IN_STORAGE: texture3d
@@ -17,11 +17,11 @@ q_8w_linear_coop:
1717
- VALUE: 1
1818
SUFFIX: o4x1
1919
shader_variants:
20-
- NAME: q_8w_linear_coop_texture3d_texture3d_texture2d_texture2d_float
21-
- NAME: q_8w_linear_coop_buffer_buffer_texture2d_texture2d_float
20+
- NAME: linear_qcs8w_coop_texture3d_texture3d_texture2d_texture2d_float
21+
- NAME: linear_qcs8w_coop_buffer_buffer_texture2d_texture2d_float
2222
IN_STORAGE: buffer
2323
OUT_STORAGE: buffer
24-
- NAME: q_8w_linear_coop_buffer_buffer_buffer_buffer_float
24+
- NAME: linear_qcs8w_coop_buffer_buffer_buffer_buffer_float
2525
IN_STORAGE: buffer
2626
OUT_STORAGE: buffer
2727
WEIGHT_STORAGE: buffer

backends/vulkan/runtime/graph/ops/glsl/q_8w_linear_tiled.yaml renamed to backends/vulkan/runtime/graph/ops/glsl/linear_qcsnw_tiled.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
q_8w_linear_tiled:
7+
linear_qcsnw_tiled:
88
parameter_names_with_default_values:
99
DTYPE: float
1010
IN_STORAGE: texture3d
@@ -21,11 +21,11 @@ q_8w_linear_tiled:
2121
- VALUE: 4
2222
SUFFIX: o4x4
2323
shader_variants:
24-
- NAME: q_8w_linear_tiled_texture3d_texture3d_texture2d_texture2d_float
25-
- NAME: q_8w_linear_tiled_buffer_buffer_texture2d_texture2d_float
24+
- NAME: linear_qcs8w_tiled_texture3d_texture3d_texture2d_texture2d_float
25+
- NAME: linear_qcs8w_tiled_buffer_buffer_texture2d_texture2d_float
2626
IN_STORAGE: buffer
2727
OUT_STORAGE: buffer
28-
- NAME: q_8w_linear_tiled_buffer_buffer_buffer_buffer_float
28+
- NAME: linear_qcs8w_tiled_buffer_buffer_buffer_buffer_float
2929
IN_STORAGE: buffer
3030
OUT_STORAGE: buffer
3131
WEIGHT_STORAGE: buffer

backends/vulkan/runtime/graph/ops/glsl/q_4w_linear_coop.yaml renamed to backends/vulkan/runtime/graph/ops/glsl/linear_qga4w_coop.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
q_4w_linear_coop:
7+
linear_qga4w_coop:
88
parameter_names_with_default_values:
99
DTYPE: float
1010
OUT_STORAGE: texture3d
@@ -13,11 +13,11 @@ q_4w_linear_coop:
1313
PARAMS_STORAGE: buffer
1414
TILE_ROWS: 1
1515
shader_variants:
16-
- NAME: q_4w_linear_coop_texture3d_texture3d_texture2d_float
17-
- NAME: q_4w_linear_coop_buffer_buffer_texture2d_float
16+
- NAME: linear_qga4w_coop_texture3d_texture3d_texture2d_float
17+
- NAME: linear_qga4w_coop_buffer_buffer_texture2d_float
1818
OUT_STORAGE: buffer
1919
IN_STORAGE: buffer
20-
- NAME: q_4w_linear_coop_buffer_buffer_buffer_float
20+
- NAME: linear_qga4w_coop_buffer_buffer_buffer_float
2121
OUT_STORAGE: buffer
2222
IN_STORAGE: buffer
2323
WEIGHT_STORAGE: buffer

backends/vulkan/runtime/graph/ops/glsl/q_4w_linear_tiled.yaml renamed to backends/vulkan/runtime/graph/ops/glsl/linear_qga4w_tiled.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
q_4w_linear_tiled:
7+
linear_qga4w_tiled:
88
parameter_names_with_default_values:
99
DTYPE: float
1010
OUT_STORAGE: texture3d
@@ -13,11 +13,11 @@ q_4w_linear_tiled:
1313
PARAMS_STORAGE: buffer
1414
TILE_ROWS: 3
1515
shader_variants:
16-
- NAME: q_4w_linear_tiled_texture3d_texture3d_texture2d_float
17-
- NAME: q_4w_linear_tiled_buffer_buffer_texture2d_float
16+
- NAME: linear_qga4w_tiled_texture3d_texture3d_texture2d_float
17+
- NAME: linear_qga4w_tiled_buffer_buffer_texture2d_float
1818
OUT_STORAGE: buffer
1919
IN_STORAGE: buffer
20-
- NAME: q_4w_linear_tiled_buffer_buffer_buffer_float
20+
- NAME: linear_qga4w_tiled_buffer_buffer_buffer_float
2121
OUT_STORAGE: buffer
2222
IN_STORAGE: buffer
2323
WEIGHT_STORAGE: buffer

0 commit comments

Comments
 (0)