Skip to content

Commit 6a704bf

Browse files
SS-JIAfacebook-github-bot
authored andcommitted
Switch to per-shader YAML files (#2459)
Summary: Pull Request resolved: #2459 ## Context Instead of having an `all_shaders.yaml` file that defines variants for all shaders, switch to having a YAML file for each shader template. This serves two purposes: 1. Makes it easy to find the variants that will be generated for each shader template 2. Reduces the number of potential conflicts of multiple developers adding individual operators. Reviewed By: copyrightly, jorgep31415 Differential Revision: D54960165 fbshipit-source-id: 0f92a61c404e5be1e2a1304d089bfbadf9f6c518
1 parent 90f6fa4 commit 6a704bf

File tree

3 files changed

+42
-32
lines changed

3 files changed

+42
-32
lines changed

backends/vulkan/runtime/graph/ops/glsl/all_shaders.yaml renamed to backends/vulkan/runtime/graph/ops/glsl/binary_op.yaml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,3 @@ binary_op:
2828
OPERATOR: pow(X, Y)
2929
- NAME: binary_floor_divide
3030
OPERATOR: floor(X / Y)
31-
32-
image_to_nchw:
33-
parameter_names_with_default_values:
34-
NDIM: 3
35-
DTYPE: float
36-
PACKING: CHANNELS_PACKED
37-
generate_variant_forall:
38-
DTYPE:
39-
- VALUE: "half"
40-
SUFFIX: "half"
41-
- VALUE: "float"
42-
SUFFIX: "float"
43-
shader_variants:
44-
- NAME: image3d_to_nchw_C_packed
45-
- NAME: image2d_to_nchw_C_packed
46-
NDIM: 2
47-
48-
nchw_to_image:
49-
parameter_names_with_default_values:
50-
NDIM: 3
51-
DTYPE: float
52-
PACKING: CHANNELS_PACKED
53-
generate_variant_forall:
54-
DTYPE:
55-
- VALUE: "half"
56-
SUFFIX: "half"
57-
- VALUE: "float"
58-
SUFFIX: "float"
59-
shader_variants:
60-
- NAME: nchw_to_image3d_C_packed
61-
- NAME: nchw_to_image2d_C_packed
62-
NDIM: 2
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
image_to_nchw:
8+
parameter_names_with_default_values:
9+
NDIM: 3
10+
DTYPE: float
11+
PACKING: CHANNELS_PACKED
12+
generate_variant_forall:
13+
DTYPE:
14+
- VALUE: "half"
15+
SUFFIX: "half"
16+
- VALUE: "float"
17+
SUFFIX: "float"
18+
shader_variants:
19+
- NAME: image3d_to_nchw_C_packed
20+
- NAME: image2d_to_nchw_C_packed
21+
NDIM: 2
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
nchw_to_image:
8+
parameter_names_with_default_values:
9+
NDIM: 3
10+
DTYPE: float
11+
PACKING: CHANNELS_PACKED
12+
generate_variant_forall:
13+
DTYPE:
14+
- VALUE: "half"
15+
SUFFIX: "half"
16+
- VALUE: "float"
17+
SUFFIX: "float"
18+
shader_variants:
19+
- NAME: nchw_to_image3d_C_packed
20+
- NAME: nchw_to_image2d_C_packed
21+
NDIM: 2

0 commit comments

Comments
 (0)