Skip to content

Commit 7bae230

Browse files
committed
[compiler] Trim trailing whitespace
This commit removes trailing whitespace from all files in the compiler directory. ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
1 parent 5c260fb commit 7bae230

248 files changed

Lines changed: 304 additions & 305 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

compiler/circle-execution-plan/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ In order to record and read this data, we use `luci::CircleNodeExecutionPlan`.
1515
### Execution plan building
1616

1717
In order to build "execution plan" we use `ExecutionPlanner` class.
18-
The main method is `make_execution_plan()` which for each node finds and writes to its annotations
18+
The main method is `make_execution_plan()` which for each node finds and writes to its annotations
1919
"execution plan". For this purpose there are two steps:
2020
- determining the order of execution of nodes, which is stored in `_ordered_nodes` vector.
2121
Now for this purpose there is only one default method `get_default_execution_order_plan()` that uses `loco::postorder_traversal(const std::vector<loco::Node *> &roots)`.
2222
In the future we can add new method and find the most suitable way to graph traversal.
23-
23+
2424
- determining memory offsets for nodes from the beginning of shared memory buffer, which is stored in `_offsets`.
2525
Now for this purpose there is one method `get_offsets_with_greedy_by_size()` that is the implementation of the "Greedy by Size" algorithm, which is described in https://arxiv.org/pdf/2001.03288.pdf article.
2626
The main objective is to minimize the size of the allocated memory block.

compiler/circle-mpqsolver/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# circle-mpqsolver
2-
_circle-mpqsolver_ provides light-weight methods for finding a high-quality mixed-precision model
2+
_circle-mpqsolver_ provides light-weight methods for finding a high-quality mixed-precision model
33
within a reasonable time.
44

55
## Methods
66

77
### Bisection
8-
A model is split into two parts: front and back. One of them is quantized in uint8 and another in
9-
int16. The precision of front and back is determined by our proxy metric, upperbound of total layer
8+
A model is split into two parts: front and back. One of them is quantized in uint8 and another in
9+
int16. The precision of front and back is determined by our proxy metric, upperbound of total layer
1010
errors. (See https://github.com/Samsung/ONE/pull/10170#discussion_r1042246598 for more details)
1111

12-
The boundary between the front and the back is decided by the depth of operators (depth: distance
13-
from input to the operator), i.e., given a depth d, layers with a depth less than d are included
14-
in front, and the rest are included in back. Bisection performs binary search to find a proper
12+
The boundary between the front and the back is decided by the depth of operators (depth: distance
13+
from input to the operator), i.e., given a depth d, layers with a depth less than d are included
14+
in front, and the rest are included in back. Bisection performs binary search to find a proper
1515
depth which achieves a qerror less than target_qerror.
1616

17-
In case front is quantized into Q16 the pseudocode is the following:
17+
In case front is quantized into Q16 the pseudocode is the following:
1818
```
1919
until |_depth_max_ - _depth_min_| <=1 do
2020
_current_depth_ = 0.5 * (_depth_max_ + _depth_min_)
@@ -23,12 +23,12 @@ In case front is quantized into Q16 the pseudocode is the following:
2323
else
2424
_depth_min_ = _current_depth_
2525
```
26-
, where Loss(current_depth) is the qerror of the mixied-precision model split at current_depth.
27-
As every iteration halves the remaining range (|depth_max - depth_min|), it converges in
26+
, where Loss(current_depth) is the qerror of the mixied-precision model split at current_depth.
27+
As every iteration halves the remaining range (|depth_max - depth_min|), it converges in
2828
_~log2(max_depth)_ iterations.
2929

30-
## Usage
31-
Run _circle-mpqsolver_ with the following arguments.
30+
## Usage
31+
Run _circle-mpqsolver_ with the following arguments.
3232

3333
--data: .h5 file with test data
3434

@@ -63,8 +63,8 @@ $./circle-mpqsolver
6363
--bisection true
6464
```
6565

66-
It will produce _model.q_opt.circle_, which is _model.recorded.circle_ quantized to mixed precision
67-
using _dataset.h5_, with input nodes set to _Q16_ precision and quantization error (_qerror_) of
66+
It will produce _model.q_opt.circle_, which is _model.recorded.circle_ quantized to mixed precision
67+
using _dataset.h5_, with input nodes set to _Q16_ precision and quantization error (_qerror_) of
6868
_model.q_opt.circle_ will be less than
6969
```
7070
_qerror(full_q16) + qerror_ratio * (qerror(full_q8) - qerror(full_q16))_

compiler/circle-part-value-test/part_eval_all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ for TESTCASE in "$@"; do
2525

2626
# for simplicity, folder uses same ${TESTCASE}
2727
TESTCASE_FOLDER="${WORKDIR}/${TESTCASE}"
28-
28+
2929
PASSED_TAG="${TESTCASE_FOLDER}.passed"
3030
rm -f "${PASSED_TAG}"
3131

compiler/circle-quantizer-dredd-recipe-test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ macro(Add RECIPE)
5252
--quantize_with_minmax float32 ${ARG_DTYPE} ${ARG_GRANULARITY}
5353
${QCONFIG_OPT} ${RECORDED_CIRCLE_PATH} ${QUANT_CIRCLE_PATH}
5454
${INPUT_DTYPE_OPT} ${OUTPUT_DTYPE_OPT}
55-
DEPENDS
55+
DEPENDS
5656
circle-quantizer
5757
record-minmax
5858
${CIRCLE_PATH}

compiler/circle-resizer-dredd-recipe-test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ macro(Add RECIPE)
3333
# Generate resized .circle
3434
add_custom_command(OUTPUT ${RESIZED_CIRCLE_PATH}
3535
COMMAND $<TARGET_FILE:circle_resizer> --input_path ${CIRCLE_PATH} --output_path ${RESIZED_CIRCLE_PATH} ${NEW_INPUTS_SIZES}
36-
DEPENDS
36+
DEPENDS
3737
circle_resizer
3838
${CIRCLE_PATH}
3939
COMMENT "Generate ${RECIPE}.resized.circle"

compiler/circle-resizer/app/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ target_link_libraries(circle_resizer PRIVATE arser)
44
target_link_libraries(circle_resizer PRIVATE safemain)
55
target_link_libraries(circle_resizer PRIVATE vconone)
66

7-
set_target_properties(circle_resizer PROPERTIES
8-
OUTPUT_NAME "circle-resizer"
7+
set_target_properties(circle_resizer PROPERTIES
8+
OUTPUT_NAME "circle-resizer"
99
)
1010

1111
install(TARGETS circle_resizer DESTINATION bin)

compiler/circle-tensordump/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dump tensors in circle file
1010

1111
```
1212
$ ./circle-tensordump --tensors ../luci/tests/Conv2D_000.circle
13-
13+
1414
----------------------------------------------------------------------
1515
[ifm]
1616
└── shape : (1, 3, 3, 2)
@@ -21,15 +21,15 @@ $ ./circle-tensordump --tensors ../luci/tests/Conv2D_000.circle
2121
└── buffer
2222
   ├── index : 3
2323
   ├── size : 8
24-
   └── data : 0.727939, 0.320132,
24+
   └── data : 0.727939, 0.320132,
2525
2626
----------------------------------------------------------------------
2727
[bias]
2828
├── shape : (1)
2929
└── buffer
3030
   ├── index : 4
3131
   ├── size : 4
32-
   └── data : -0.794465,
32+
   └── data : -0.794465,
3333
3434
----------------------------------------------------------------------
3535
[ofm]

compiler/circlechef/proto/circlechef.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ message Operation {
129129
optional GRUOptions gru_options = 104;
130130
optional FullyConnectedOptions fullyconnected_options = 105;
131131
optional RmsNormOptions rms_norm_options = 106;
132-
optional RoPEOptions rope_options = 107;
132+
optional RoPEOptions rope_options = 107;
133133
}
134134

135135
// For additional subgraphs

compiler/dredd-rule-lib/rule-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ tensor_shape()
265265
awk -v tensor_name="$1" '{ if ($1 == tensor_name) print $2}'`
266266

267267
check_success_exit_code $? 0
268-
268+
269269
echo ${ACTUAL}
270270
}
271271

compiler/encodump/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ Output:
3030
<Inst>:
3131
Eval (0x10cfa90)
3232
out: 0x10cf960
33-
<op>:
33+
<op>:
3434
Load(0x10cf600, obj: 0x10cd670)
3535
Conv2D(0x10cf8a0, ker obj: 0x10cf2d0, padding [T/B/L/R=0,0,0,0], stride [V/H = 1,1])
3636
<Inst>:
3737
Eval (0x10cff80)
3838
out: 0x10cfb20
39-
<op>:
39+
<op>:
4040
Load(0x10cfe70, obj: 0x10cfcc0)
4141
Load(0x10cfdd0, obj: 0x10cf960)
4242
Add
@@ -51,13 +51,13 @@ Output:
5151
<Input>: bag 0x10ce650, name=ifm
5252
<Output>: bag 0x10ce9c0, name=ofm
5353
<Bag>:
54-
0x10ce650, obj: [0x10cd670], size: 18, input, const, reader: [x], updater: [x],
55-
0x10ce770, obj: [0x10cf2d0], size: 2, const, reader: [x], updater: [x],
56-
0x10ce890, obj: [0x10cfcc0], size: 1, const, reader: [x], updater: [x],
57-
0x10ce9c0, obj: [0x10cf210], size: 9, output, const, reader: [x], updater: [x],
58-
0x10cf9d0, obj: [0x10cf960], size: 9, const, reader: [x], updater: [x],
59-
0x10cfbe0, obj: [0x10cfb20], size: 9, const, reader: [x], updater: [x],
60-
0x10d0060, obj: [0x10cfff0], size: 9, const, reader: [x], updater: [x],
54+
0x10ce650, obj: [0x10cd670], size: 18, input, const, reader: [x], updater: [x],
55+
0x10ce770, obj: [0x10cf2d0], size: 2, const, reader: [x], updater: [x],
56+
0x10ce890, obj: [0x10cfcc0], size: 1, const, reader: [x], updater: [x],
57+
0x10ce9c0, obj: [0x10cf210], size: 9, output, const, reader: [x], updater: [x],
58+
0x10cf9d0, obj: [0x10cf960], size: 9, const, reader: [x], updater: [x],
59+
0x10cfbe0, obj: [0x10cfb20], size: 9, const, reader: [x], updater: [x],
60+
0x10d0060, obj: [0x10cfff0], size: 9, const, reader: [x], updater: [x],
6161
<Object>:
6262
0x10cd670, bag: 0x10ce650, kind: Feature, Shape [H/W/D=3,3,2], producer: x, comsumer: [op: 0x10cf600]
6363
0x10cf210, bag: 0x10ce9c0, kind: Feature, Shape [H/W/D=3,3,1], producer: instr: 0x10d01f0, comsumer: [x]

0 commit comments

Comments
 (0)