Skip to content

Commit c61ef44

Browse files
zertoshfacebook-github-bot
authored andcommitted
Apply clang-format 18
Summary: Previously this code conformed from clang-format 12. Reviewed By: igorsugak Differential Revision: D56065247 fbshipit-source-id: f5a985dd8f8b84f2f9e1818b3719b43c5a1b05b3
1 parent c095046 commit c61ef44

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

backends/vulkan/runtime/api/Adapter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,7 @@ std::string Adapter::stringize() const {
401401
ss << " Memory Info {" << std::endl;
402402
ss << " Memory Types [" << std::endl;
403403
for (size_t i = 0; i < mem_props.memoryTypeCount; ++i) {
404-
ss << " "
405-
<< " [Heap " << mem_props.memoryTypes[i].heapIndex << "] "
404+
ss << " " << " [Heap " << mem_props.memoryTypes[i].heapIndex << "] "
406405
<< get_memory_properties_str(mem_props.memoryTypes[i].propertyFlags)
407406
<< std::endl;
408407
}

backends/vulkan/runtime/graph/ops/glsl/indexing_utils.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
// describe sizes. As an example, let's say we want to swap dimensions 0,1 for a
5151
// tensor of shape {4,3,2,24} to obtain {3,4,2,24}. Then, x=4, y=3 and
5252
// plane=2*24=48.
53-
#define SWAP_ADJ_DIMS(cur, x, y, plane) \
54-
cur + \
55-
plane*( \
56-
(1 - y) * ((cur % (x * y * plane)) / (y * plane)) + \
57-
(x - 1) * ((cur % (y * plane)) / plane))
53+
#define SWAP_ADJ_DIMS(cur, x, y, plane) \
54+
cur + \
55+
plane * \
56+
((1 - y) * ((cur % (x * y * plane)) / (y * plane)) + \
57+
(x - 1) * ((cur % (y * plane)) / plane))

examples/models/llama2/runner/runner.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,7 @@ std::string statsToJsonString(const Runner::Stats& stats) {
472472
<< "\"prompt_eval_end_ms\":" << stats.prompt_eval_end_ms << ","
473473
<< "\"first_token_ms\":" << stats.first_token_ms << ","
474474
<< "\"aggregate_sampling_time_ms\":" << stats.aggregate_sampling_time_ms
475-
<< ","
476-
<< "\"SCALING_FACTOR_UNITS_PER_SECOND\":"
475+
<< "," << "\"SCALING_FACTOR_UNITS_PER_SECOND\":"
477476
<< stats.SCALING_FACTOR_UNITS_PER_SECOND << "}";
478477
return ss.str();
479478
}

kernels/portable/cpu/op_cumsum.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#include <executorch/runtime/platform/assert.h>
1212
#include <cmath>
1313
#include <cstddef>
14-
//#include <cstdint>
15-
//#include <type_traits>
14+
// #include <cstdint>
15+
// #include <type_traits>
1616

1717
namespace torch {
1818
namespace executor {

runtime/core/portable_type/optional.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ class optional final {
7474
}
7575

7676
optional& operator=(optional&& rhs) noexcept(
77-
std::is_nothrow_move_assignable<T>::value&&
78-
std::is_nothrow_move_constructible<T>::value) {
77+
std::is_nothrow_move_assignable<T>::value &&
78+
std::is_nothrow_move_constructible<T>::value) {
7979
if (init_ && !rhs.init_) {
8080
clear();
8181
} else if (!init_ && rhs.init_) {

sdk/etdump/etdump_flatcc.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ ETDumpGen::ETDumpGen(Span<uint8_t> buffer) {
103103
alloc.set_buffer(
104104
(uint8_t*)buffer_with_builder,
105105
buffer_size,
106-
(size_t)((buffer_size / 4 > max_alloc_buf_size) ? max_alloc_buf_size : buffer_size / 4));
106+
(size_t)((buffer_size / 4 > max_alloc_buf_size) ? max_alloc_buf_size
107+
: buffer_size / 4));
107108
et_flatcc_custom_init(builder, &alloc);
108109
} else {
109110
builder = (struct flatcc_builder*)malloc(sizeof(struct flatcc_builder));

0 commit comments

Comments
 (0)