Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFC - minor spelling tweaks under lite/micro directory #37420

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def get_data_file(self, data_path, data_type):
return data, label, length

def pad(self, data, seq_length, dim):
"""Get neighboor padding."""
"""Get neighbour padding."""
noise_level = 20
padded_data = []
# Before- Neighbour padding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void Da7212Initialize(void) {
}
}

// Initalization for receiving audio data
// Initialization for receiving audio data
TfLiteStatus InitAudioRecording(tflite::ErrorReporter *error_reporter) {
edma_config_t dma_config = {0};
sai_config_t sai_config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static uint32_t hm01b0_write_reg(hm01b0_cfg_t* psCfg, uint16_t ui16Reg,
Transaction.ui32StatusSetClr = 0;

//
// Execute the transction over IOM.
// Execute the transaction over IOM.
//
if (am_hal_iom_blocking_transfer(psCfg->pIOMHandle, &Transaction)) {
return HM01B0_ERR_I2C;
Expand Down Expand Up @@ -138,7 +138,7 @@ static uint32_t hm01b0_read_reg(hm01b0_cfg_t* psCfg, uint16_t ui16Reg,
Transaction.ui32StatusSetClr = 0;

//
// Execute the transction over IOM.
// Execute the transaction over IOM.
//
if (am_hal_iom_blocking_transfer(psCfg->pIOMHandle, &Transaction)) {
return HM01B0_ERR_I2C;
Expand Down Expand Up @@ -468,7 +468,7 @@ uint32_t hm01b0_get_modelid(hm01b0_cfg_t* psCfg, uint16_t* pui16MID) {
//! @param ui32ScriptCmdNum - No. of commands in HM01B0 initialization
//! script.
//!
//! This function initilizes HM01B0 with a given script.
//! This function initializes HM01B0 with a given script.
//!
//! @return Error code.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ uint32_t hm01b0_get_modelid(hm01b0_cfg_t *psCfg, uint16_t *pui16MID);
//! @param ui32ScriptCmdNum - No. of commands in HM01B0 initialization
//! script.
//!
//! This function initilizes HM01B0 with a given script.
//! This function initializes HM01B0 with a given script.
//!
//! @return Error code.
//
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/kernels/cmsis-nn/pooling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ TfLiteStatus AverageEval(TfLiteContext* context, TfLiteNode* node) {

TF_LITE_ENSURE_STATUS(CalculateOpData(context, params, input, output, &data));

// Inputs and outputs share the same type, guarenteed by the converter.
// Inputs and outputs share the same type, guaranteed by the converter.
switch (input->type) {
case kTfLiteFloat32:
AverageEvalFloat(context, node, params, &data, input, output);
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/kernels/split.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input = GetInput(context, node, 1);

// Dynamic output tensors are needed if axis tensor is not constant.
// But Micro doesn't support dynamic memeory allocation, so we only support
// But Micro doesn't support dynamic memory allocation, so we only support
// constant axis tensor for now.
TF_LITE_ENSURE_MSG(context, IsConstantTensor(axis),
"Non constant axis tensor not supported");
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/memory_planner/memory_planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MemoryPlanner {
int size, int first_time_used,
int last_time_used) = 0;

// The largest contguous block of memory that's needed to hold the layout.
// The largest contiguous block of memory that's needed to hold the layout.
virtual size_t GetMaximumMemorySize() = 0;
// How many buffers have been added to the planner.
virtual int GetBufferCount() = 0;
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/micro_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ int32_t FloatToSymmetricQuantizedInt32(const float value, const float scale);
// uint8 | X | X | |
// int32 | | X | X |
//
// The per-op quantizaiton spec can be found here:
// The per-op quantization spec can be found here:
// https://www.tensorflow.org/lite/performance/quantization_spec

void AsymmetricQuantize(const float* input, int8_t* output, int num_elements,
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/riscv32_mcu/debug_log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
// TODO(b/121324430): Add test for DebugLog fuctions
// TODO(b/121324430): Add test for DebugLog functions
// TODO(b/121275099): Remove dependency on debug_log once the platform supports
// printf

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/simple_memory_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class SimpleMemoryAllocator {
size_t data_size_max_;
uint8_t* data_;
SimpleMemoryAllocator* parent_allocator_ = nullptr;
// The allocator is locaked if it has a child.
// The allocator is locked if it has a child.
bool has_child_allocator_ = false;
};

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/tools/ci_build/test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ make -f tensorflow/lite/micro/tools/make/Makefile \
clean clean_downloads

# Add all the test scripts for the various supported platforms here. This
# emables running all the tests together has part of the continuous integration
# enables running all the tests together has part of the continuous integration
# pipeline and reduces duplication associated with setting up the docker
# environment.

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/tools/make/targets/ecm3531/_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.

/* This is file contains the entry point to the application and is called after
startup.
The GPIOs, Uart and timer are intialized and Tensorflow is invoked with the
The GPIOs, Uart and timer are initialized and Tensorflow is invoked with the
call to main().
Tensorflow will print out if the tests have passed or failed and the
execution time is also
Expand Down
6 changes: 3 additions & 3 deletions tensorflow/lite/micro/tools/make/transform_arduino_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ def check_ino_functions(input_text):
# have to have a setup() and loop() function, just like their IDE expects.
if not re.search(r'void setup\(\) \{', input_text):
raise Exception(
'All examples must have a setup() function for Arduino compatiblity\n' +
input_text)
'All examples must have a setup() function for Arduino compatibility\n'
+ input_text)
if not re.search(r'void loop\(\) \{', input_text):
raise Exception(
'All examples must have a loop() function for Arduino compatiblity')
'All examples must have a loop() function for Arduino compatibility')
return input_text


Expand Down
10 changes: 5 additions & 5 deletions tensorflow/lite/micro/tools/make/transform_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ def check_ino_functions(input_text):
# have to have a setup() and loop() function, just like their IDE expects.
if not re.search(r'void setup\(\) \{', input_text):
raise Exception(
'All examples must have a setup() function for Arduino compatiblity\n' +
input_text)
'All examples must have a setup() function for Arduino compatibility\n'
+ input_text)
if not re.search(r'void loop\(\) \{', input_text):
raise Exception(
'All examples must have a loop() function for Arduino compatiblity')
'All examples must have a loop() function for Arduino compatibility')
return input_text


Expand All @@ -75,7 +75,7 @@ def add_example_ino_library_include(input_text):
input_text, 1)


def replace_ardunio_example_includes(line, _):
def replace_arduino_example_includes(line, _):
"""Updates any includes for local example files."""
# Because the export process moves the example source and header files out of
# their default locations into the top-level 'examples' folder in the Arduino
Expand Down Expand Up @@ -122,7 +122,7 @@ def transform_arduino_sources(input_lines, flags):
for line in input_lines:
line = replace_arduino_includes(line, supplied_headers_list)
if flags.is_example_ino or flags.is_example_source:
line = replace_ardunio_example_includes(line, flags.source_path)
line = replace_arduino_example_includes(line, flags.source_path)
else:
line = replace_arduino_main(line)
output_lines.append(line)
Expand Down