4
4
*
5
5
* This source code is licensed under the BSD-style license found in the
6
6
* LICENSE file in the root directory of this source tree.
7
- */
7
+ */
8
8
9
9
#include < executorch/backends/vulkan/runtime/graph/ops/OperatorRegistry.h>
10
10
@@ -18,20 +18,17 @@ namespace vkcompute {
18
18
using namespace utils ;
19
19
20
20
void resize_tan_node (
21
- ComputeGraph* graph,
22
- const std::vector<ArgGroup>& args,
23
- const std::vector<ValueRef>& extra_args) {
21
+ ComputeGraph* graph,
22
+ const std::vector<ArgGroup>& args,
23
+ const std::vector<ValueRef>& extra_args) {
24
24
(void )extra_args;
25
25
vTensorPtr out = graph->get_tensor (args[0 ].refs [0 ]);
26
26
vTensorPtr self = graph->get_tensor (args[1 ].refs [0 ]);
27
27
28
28
out->virtual_resize (self->sizes ());
29
29
}
30
30
31
- void add_tan_node (
32
- ComputeGraph& graph,
33
- const ValueRef in,
34
- const ValueRef out) {
31
+ void add_tan_node (ComputeGraph& graph, const ValueRef in, const ValueRef out) {
35
32
std::string kernel_name = " tan" ;
36
33
add_dtype_suffix (kernel_name, graph.dtype_of (out));
37
34
add_storage_type_suffix (kernel_name, graph.storage_type_of (out));
@@ -45,8 +42,7 @@ const ValueRef out) {
45
42
graph.create_global_wg_size (out),
46
43
graph.create_local_wg_size (out),
47
44
// Inputs and Outputs
48
- {{out, vkapi::kWrite },
49
- {in, vkapi::kRead }},
45
+ {{out, vkapi::kWrite }, {in, vkapi::kRead }},
50
46
// Shader params buffers
51
47
ubos,
52
48
// Push Constants
@@ -60,10 +56,9 @@ const ValueRef out) {
60
56
}
61
57
62
58
void tan (ComputeGraph& graph, const std::vector<ValueRef>& args) {
63
- return add_tan_node (graph, args[0 ], args[1 ]);
59
+ return add_tan_node (graph, args[0 ], args[1 ]);
64
60
}
65
61
66
-
67
62
REGISTER_OPERATORS {
68
63
VK_REGISTER_OP (aten.tan .default , tan);
69
64
}
0 commit comments