Skip to content

Commit 104b1a7

Browse files
committed
[ET-VK][EZ] Fix comment style for parameter names
TIL from the linter and ssjia's code that this is bad style ``` get_val_or_inf(graph, args[1], /*max =*/false), ``` and this is good style: ``` get_val_or_inf(graph, args[1], /*max = */ false), ``` Differential Revision: [D55721203](https://our.internmc.facebook.com/intern/diff/D55721203/) ghstack-source-id: 221216590 Pull Request resolved: #2847
1 parent ee3511e commit 104b1a7

File tree

2 files changed

+38
-10
lines changed

2 files changed

+38
-10
lines changed

backends/vulkan/runtime/graph/ops/impl/UnaryOp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ float get_val_or_inf(ComputeGraph& graph, const ValueRef& val, bool max) {
8282
return add_unary_op_node( \
8383
graph, \
8484
args[0], \
85-
get_val_or_inf(graph, args[1], /*max =*/false), \
86-
get_val_or_inf(graph, args[2], /*max =*/true), \
85+
get_val_or_inf(graph, args[1], /*max = */ false), \
86+
get_val_or_inf(graph, args[2], /*max = */ true), \
8787
args[3], \
8888
kClampShaderName); \
8989
}

backends/vulkan/test/vulkan_compute_api_test.cpp

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,11 +1044,39 @@ void test_mm(
10441044
}
10451045

10461046
TEST(VulkanComputeGraphOpsTest, mm_smoke_test) {
1047-
#define RUN_TESTS(dtype, layout, prepack) \
1048-
test_mm(/*B=*/1, /*M=*/31, /*K=*/127, /*N=*/23, dtype, layout, prepack); \
1049-
test_mm(/*B=*/5, /*M=*/31, /*K=*/127, /*N=*/23, dtype, layout, prepack); \
1050-
test_mm(/*B=*/7, /*M=*/13, /*K=*/89, /*N=*/17, dtype, layout, prepack); \
1051-
test_mm(/*B=*/1, /*M=*/13, /*K=*/89, /*N=*/17, dtype, layout, prepack);
1047+
#define RUN_TESTS(dtype, layout, prepack) \
1048+
test_mm( \
1049+
/*B = */ 1, \
1050+
/*M = */ 31, \
1051+
/*K = */ 127, \
1052+
/*N = */ 23, \
1053+
dtype, \
1054+
layout, \
1055+
prepack); \
1056+
test_mm( \
1057+
/*B = */ 5, \
1058+
/*M = */ 31, \
1059+
/*K = */ 127, \
1060+
/*N = */ 23, \
1061+
dtype, \
1062+
layout, \
1063+
prepack); \
1064+
test_mm( \
1065+
/*B = */ 7, \
1066+
/*M = */ 13, \
1067+
/*K = */ 89, \
1068+
/*N = */ 17, \
1069+
dtype, \
1070+
layout, \
1071+
prepack); \
1072+
test_mm( \
1073+
/*B = */ 1, \
1074+
/*M = */ 13, \
1075+
/*K = */ 89, \
1076+
/*N = */ 17, \
1077+
dtype, \
1078+
layout, \
1079+
prepack);
10521080

10531081
CALL_TEST_FN_FOR_W_PACKED(RUN_TESTS);
10541082
CALL_TEST_FN_FOR_C_PACKED(RUN_TESTS);
@@ -1102,7 +1130,7 @@ void test_max_pool2d(
11021130

11031131
// Run graph
11041132

1105-
fill_vtensor(graph, graph.inputs().at(0), base_val, /*iota=*/true);
1133+
fill_vtensor(graph, graph.inputs().at(0), base_val, /*iota = */ true);
11061134

11071135
vTensor& t_in = graph.get_val(in_ioval.value).toTensor();
11081136
std::vector<float> input_data(t_in.gpu_numel());
@@ -1140,7 +1168,7 @@ void test_max_pool2d(
11401168
TEST(VulkanComputeGraphOpsTest, max_pool2d_smoke_test) {
11411169
std::vector<int64_t> kernel = {2, 3};
11421170
test_max_pool2d(
1143-
/*in_size=*/{1, 4, 6},
1144-
/*base_val=*/10.0f,
1171+
/*in_size = */ {1, 4, 6},
1172+
/*base_val = */ 10.0f,
11451173
kernel);
11461174
}

0 commit comments

Comments
 (0)