Skip to content

Commit

Permalink
Apply clang-format 18
Browse files Browse the repository at this point in the history
Summary: Previously this code conformed from clang-format 12.

Reviewed By: igorsugak

Differential Revision: D56065247

fbshipit-source-id: f5a985dd8f8b84f2f9e1818b3719b43c5a1b05b3
  • Loading branch information
zertosh authored and facebook-github-bot committed Apr 14, 2024
1 parent c095046 commit c61ef44
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
3 changes: 1 addition & 2 deletions backends/vulkan/runtime/api/Adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,7 @@ std::string Adapter::stringize() const {
ss << " Memory Info {" << std::endl;
ss << " Memory Types [" << std::endl;
for (size_t i = 0; i < mem_props.memoryTypeCount; ++i) {
ss << " "
<< " [Heap " << mem_props.memoryTypes[i].heapIndex << "] "
ss << " " << " [Heap " << mem_props.memoryTypes[i].heapIndex << "] "
<< get_memory_properties_str(mem_props.memoryTypes[i].propertyFlags)
<< std::endl;
}
Expand Down
10 changes: 5 additions & 5 deletions backends/vulkan/runtime/graph/ops/glsl/indexing_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
// describe sizes. As an example, let's say we want to swap dimensions 0,1 for a
// tensor of shape {4,3,2,24} to obtain {3,4,2,24}. Then, x=4, y=3 and
// plane=2*24=48.
#define SWAP_ADJ_DIMS(cur, x, y, plane) \
cur + \
plane*( \
(1 - y) * ((cur % (x * y * plane)) / (y * plane)) + \
(x - 1) * ((cur % (y * plane)) / plane))
#define SWAP_ADJ_DIMS(cur, x, y, plane) \
cur + \
plane * \
((1 - y) * ((cur % (x * y * plane)) / (y * plane)) + \
(x - 1) * ((cur % (y * plane)) / plane))
3 changes: 1 addition & 2 deletions examples/models/llama2/runner/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,7 @@ std::string statsToJsonString(const Runner::Stats& stats) {
<< "\"prompt_eval_end_ms\":" << stats.prompt_eval_end_ms << ","
<< "\"first_token_ms\":" << stats.first_token_ms << ","
<< "\"aggregate_sampling_time_ms\":" << stats.aggregate_sampling_time_ms
<< ","
<< "\"SCALING_FACTOR_UNITS_PER_SECOND\":"
<< "," << "\"SCALING_FACTOR_UNITS_PER_SECOND\":"
<< stats.SCALING_FACTOR_UNITS_PER_SECOND << "}";
return ss.str();
}
Expand Down
4 changes: 2 additions & 2 deletions kernels/portable/cpu/op_cumsum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <executorch/runtime/platform/assert.h>
#include <cmath>
#include <cstddef>
//#include <cstdint>
//#include <type_traits>
// #include <cstdint>
// #include <type_traits>

namespace torch {
namespace executor {
Expand Down
4 changes: 2 additions & 2 deletions runtime/core/portable_type/optional.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class optional final {
}

optional& operator=(optional&& rhs) noexcept(
std::is_nothrow_move_assignable<T>::value&&
std::is_nothrow_move_constructible<T>::value) {
std::is_nothrow_move_assignable<T>::value &&
std::is_nothrow_move_constructible<T>::value) {
if (init_ && !rhs.init_) {
clear();
} else if (!init_ && rhs.init_) {
Expand Down
3 changes: 2 additions & 1 deletion sdk/etdump/etdump_flatcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ ETDumpGen::ETDumpGen(Span<uint8_t> buffer) {
alloc.set_buffer(
(uint8_t*)buffer_with_builder,
buffer_size,
(size_t)((buffer_size / 4 > max_alloc_buf_size) ? max_alloc_buf_size : buffer_size / 4));
(size_t)((buffer_size / 4 > max_alloc_buf_size) ? max_alloc_buf_size
: buffer_size / 4));
et_flatcc_custom_init(builder, &alloc);
} else {
builder = (struct flatcc_builder*)malloc(sizeof(struct flatcc_builder));
Expand Down

0 comments on commit c61ef44

Please sign in to comment.