24.02.1
|
Data Structures | |
struct | CharPosition |
struct | Token |
Token. More... | |
class | TokenStream |
A stream of token. More... | |
Enumerations | |
enum | ComparatorType { Enum, Num, Var } |
enum | TokenType { L_List = '[', R_List = ']', Int, Float, Text, End } |
Type of Token. More... | |
Functions | |
void | advance (CharPosition &pos, char ch) |
void | rewind (CharPosition &pos) |
void | end (TokenStream &in, bool &valid) |
bool | bool_val (TokenStream &in, bool &valid) |
int | int_val (TokenStream &in, bool &valid) |
unsigned int | uint_val (TokenStream &in, bool &valid) |
float | float_val (TokenStream &in, bool &valid) |
std::string | text_val (TokenStream &in, bool &valid) |
bool | accept_text (TokenStream &in, const std::string &c_str, bool take=true) |
void | expect_text (TokenStream &in, const std::string &str, bool &valid) |
bool | accept_l_list (TokenStream &in) |
void | expect_l_list (TokenStream &in, bool &valid) |
bool | accept_r_list (TokenStream &in) |
void | expect_r_list (TokenStream &in, bool &valid) |
ConditionalOp | conditional_op (TokenStream &in, bool &valid) |
void | gemm_version (TokenStream &in, bool &valid) |
void | ip_type (TokenStream &in, bool &valid) |
void | header (TokenStream &in, bool &valid) |
DataType | data_type (TokenStream &in, bool &valid) |
ComparatorType | comparator_type (TokenStream &in, bool &valid) |
HeuristicType | heuristic_type (TokenStream &in, bool &valid, bool take=true) |
void | expect_heuristic_type (TokenStream &in, HeuristicType expected_ht, bool &valid) |
GEMMType | gemm_type (TokenStream &in, bool &valid) |
GEMMConfigNative | gemm_config_native (TokenStream &in, bool &valid) |
GEMMConfigReshapedOnlyRHS | gemm_config_reshaped_only_rhs (TokenStream &in, bool &valid) |
GEMMConfigReshaped | gemm_config_reshaped (TokenStream &in, bool &valid) |
void | gpu_priority (TokenStream &in, bool &valid) |
void | gpu_behavior (TokenStream &in, bool &valid) |
void | free_vars (TokenStream &in, bool &valid) |
void | heuristics_table_entry (TokenStream &in, MLGOHeuristics &h, bool &valid) |
void | heuristics_table (TokenStream &in, MLGOHeuristics &h, bool &valid) |
Condition | condition (TokenStream &in, bool &valid) |
void | heuristic_tree (TokenStream &in, MLGOHeuristics &h, bool &valid) |
MLGOHeuristics | mlgo (TokenStream &in, bool &valid) |
std::pair< bool, MLGOHeuristics > | parse_mlgo (std::istream &in) |
Parse and construct a MLGOHeuristics from input stream. More... | |
std::ostream & | operator<< (std::ostream &os, const CharPosition &pos) |
|
strong |
Enumerator | |
---|---|
Enum | |
Num | |
Var |
Definition at line 98 of file MLGOParser.cpp.
|
strong |
Type of Token.
Enumerator | |
---|---|
L_List | List open. |
R_List | List close. |
Int | Integral. |
Float | Floating. |
Text | Text/String. |
End | End of stream. |
Definition at line 84 of file MLGOParser.h.
bool arm_compute::mlgo::parser::accept_l_list | ( | TokenStream & | in | ) |
Definition at line 377 of file MLGOParser.cpp.
References L_List, TokenStream::peek(), and TokenStream::take().
Referenced by expect_l_list().
bool arm_compute::mlgo::parser::accept_r_list | ( | TokenStream & | in | ) |
Definition at line 397 of file MLGOParser.cpp.
References TokenStream::peek(), R_List, and TokenStream::take().
Referenced by expect_r_list(), and free_vars().
bool arm_compute::mlgo::parser::accept_text | ( | TokenStream & | in, |
const std::string & | c_str, | ||
bool | take = true |
||
) |
Definition at line 354 of file MLGOParser.cpp.
References TokenStream::peek(), TokenStream::take(), and Text.
Referenced by comparator_type(), conditional_op(), data_type(), expect_text(), gemm_type(), gpu_behavior(), gpu_priority(), heuristic_tree(), heuristic_type(), heuristics_table(), ip_type(), and mlgo().
void arm_compute::mlgo::parser::advance | ( | CharPosition & | pos, |
char | ch | ||
) |
bool arm_compute::mlgo::parser::bool_val | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 293 of file MLGOParser.cpp.
References FAIL_WITH_MSG_DEFAULT, Int, LOG_TOKEN_POS, and TokenStream::take().
Referenced by gemm_config_reshaped(), and gemm_config_reshaped_only_rhs().
ComparatorType arm_compute::mlgo::parser::comparator_type | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 503 of file MLGOParser.cpp.
References accept_text(), Enum, FAIL_WITH_MSG_DEFAULT, LOG_TOKEN_POS, Num, and Var.
Referenced by condition().
Condition arm_compute::mlgo::parser::condition | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 690 of file MLGOParser.cpp.
References CHECK_DEFAULT, comparator_type(), conditional_op(), FAIL_WITH_MSG_DEFAULT, float_val(), LOG_TOKEN_POS, Num, text_val(), and Var.
Referenced by heuristic_tree(), and arm_compute::cpu::select_op().
ConditionalOp arm_compute::mlgo::parser::conditional_op | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 417 of file MLGOParser.cpp.
References accept_text(), arm_compute::mlgo::EQ, FAIL_WITH_MSG_DEFAULT, arm_compute::mlgo::GE, arm_compute::mlgo::GT, arm_compute::mlgo::LE, LOG_TOKEN_POS, and arm_compute::mlgo::LT.
Referenced by condition().
DataType arm_compute::mlgo::parser::data_type | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 482 of file MLGOParser.cpp.
References accept_text(), arm_compute::F16, arm_compute::F32, FAIL_WITH_MSG_DEFAULT, LOG_TOKEN_POS, and arm_compute::QASYMM8.
Referenced by heuristics_table_entry().
void arm_compute::mlgo::parser::end | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 283 of file MLGOParser.cpp.
References End, FAIL_WITH_MSG, LOG_TOKEN_POS, and TokenStream::take().
Referenced by DependencyGraph::all_tensors(), ISimpleLifetimeManager::are_all_finalized(), CpuInfo::build(), arm_compute::graph::detail::call_all_input_node_accessors(), arm_compute::graph::detail::call_all_output_node_accessors(), Window::collapse_if_possible(), arm_compute::helpers::tensor_transform::compute_strided_slice_output_shape(), AccessWindowTranspose::compute_valid_region(), AccessWindowRectangle::compute_valid_region(), ClCrop::configure(), ClCropKernel::configure(), CLRangeKernel::configure(), NERangeKernel::configure(), CLRange::configure(), CLCrop::configure(), NERange::configure(), ClWinogradConv2d::configure(), CLCropResize::configure(), StackLayerNode::configure_output(), ConcatenateLayerNode::configure_output(), arm_compute::create_window_iterator(), arm_compute::test::validation::reference::crop_and_resize(), arm_compute::helpers::fft::digit_reverse_indices(), ISimpleLifetimeManager::end_lifetime(), arm_compute::enqueue(), arm_compute::error_on_invalid_subwindow(), arm_compute::error_on_mismatching_windows(), arm_compute::error_on_window_dimensions_gte(), arm_compute::error_on_window_not_collapsable_at_dimension(), GemvPretransposed< strategy, To, Tr, OutputStage >::execute(), GemmInterleaved< strategy, To, Tr, OutputStage, MergeStep, FixedFormat, ForceThreadColumns, ForceFloatAccumulate >::execute(), GraphManager::execute_graph(), NPYLoader::fill_tensor(), GraphManager::finalize_graph(), CpuArithmeticKernel::get_available_kernels(), CpuComparisonKernel::get_available_kernels(), Framework::init(), GraphContext::insert_memory_management_ctx(), GraphContext::insert_weights_management_ctx(), arm_compute::cpu::instance_normalization_nchw(), GraphManager::invalidate_graph(), NDRange< 4 >::iterator(), arm_compute::test::framework::dataset::make(), OpenCLClock< output_timestamps >::measurements(), GraphContext::memory_management_ctx(), mlgo(), InPlaceOperationMutator::mutate(), arm_compute::num_of_elements_in_range(), arm_compute::cpuinfo::num_threads_hint(), NEGEMMConv2d::prepare(), NEGEMMLowpMatrixMultiplyCore::prepare(), NEGEMM::prepare(), CLGEMM::prepare(), CLGEMMConvolutionLayer::prepare(), GemmHybridIndirect< strategy, To, Tr, OutputStage, SeparateQuantize, FixedFormat >::pretranspose_B_array_part(), GemmInterleaved< strategy, To, Tr, OutputStage, MergeStep, FixedFormat, ForceThreadColumns, ForceFloatAccumulate >::pretranspose_B_array_part(), GemmCommon< TypeInput, TypeOutput >::pretranspose_B_array_part_generic(), arm_compute::read_file(), CPPDetectionOutputLayer::run(), NEDepthToSpaceLayerKernel::run(), CPPNonMaximumSuppressionKernel::run(), Framework::run(), ClWinogradInputTransformKernel::run_op(), Window::shape(), Window::split_window(), ISimpleLifetimeManager::start_lifetime(), SchedulerClock< output_timestamps >::test_start(), SchedulerClock< output_timestamps >::test_stop(), arm_gemm::to_ndcoord(), arm_gemm::to_ndrange(), arm_compute::test::tolower(), arm_compute::utility::tolower(), PoolManager::unlock_pool(), AccessWindowTranspose::update_window_if_needed(), AccessWindowRectangle::update_window_if_needed(), ClCrop::validate(), ClCropKernel::validate(), NERangeKernel::validate(), CLRangeKernel::validate(), CLRange::validate(), NERange::validate(), CLCrop::validate(), Window::validate(), ValidationInputAccessor::ValidationInputAccessor(), ValidationOutputAccessor::ValidationOutputAccessor(), and GraphContext::weights_management_ctx().
void arm_compute::mlgo::parser::expect_heuristic_type | ( | TokenStream & | in, |
HeuristicType | expected_ht, | ||
bool & | valid | ||
) |
Definition at line 549 of file MLGOParser.cpp.
References CHECK, FAIL_WITH_MSG, heuristic_type(), and LOG_TOKEN_POS.
Referenced by heuristic_tree().
void arm_compute::mlgo::parser::expect_l_list | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 388 of file MLGOParser.cpp.
References accept_l_list(), FAIL_WITH_MSG, and LOG_TOKEN_POS.
Referenced by free_vars(), gemm_config_native(), gemm_config_reshaped(), gemm_config_reshaped_only_rhs(), and gemm_version().
void arm_compute::mlgo::parser::expect_r_list | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 408 of file MLGOParser.cpp.
References accept_r_list(), FAIL_WITH_MSG, and LOG_TOKEN_POS.
Referenced by gemm_config_native(), gemm_config_reshaped(), gemm_config_reshaped_only_rhs(), and gemm_version().
void arm_compute::mlgo::parser::expect_text | ( | TokenStream & | in, |
const std::string & | str, | ||
bool & | valid | ||
) |
Definition at line 368 of file MLGOParser.cpp.
References accept_text(), FAIL_WITH_MSG, LOG_TOKEN_POS, and caffe_mnist_image_extractor::str.
Referenced by gemm_version(), header(), heuristic_tree(), heuristics_table(), and ip_type().
float arm_compute::mlgo::parser::float_val | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 330 of file MLGOParser.cpp.
References FAIL_WITH_MSG_DEFAULT, Float, LOG_TOKEN_POS, and TokenStream::take().
Referenced by condition().
void arm_compute::mlgo::parser::free_vars | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 658 of file MLGOParser.cpp.
References accept_r_list(), CHECK, expect_l_list(), and text_val().
Referenced by heuristics_table_entry().
GEMMConfigNative arm_compute::mlgo::parser::gemm_config_native | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 581 of file MLGOParser.cpp.
References CHECK_DEFAULT, expect_l_list(), expect_r_list(), and uint_val().
Referenced by heuristic_tree().
GEMMConfigReshaped arm_compute::mlgo::parser::gemm_config_reshaped | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 607 of file MLGOParser.cpp.
References bool_val(), CHECK_DEFAULT, expect_l_list(), expect_r_list(), and uint_val().
Referenced by heuristic_tree().
GEMMConfigReshapedOnlyRHS arm_compute::mlgo::parser::gemm_config_reshaped_only_rhs | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 592 of file MLGOParser.cpp.
References bool_val(), CHECK_DEFAULT, expect_l_list(), expect_r_list(), and uint_val().
Referenced by heuristic_tree().
GEMMType arm_compute::mlgo::parser::gemm_type | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 560 of file MLGOParser.cpp.
References accept_text(), FAIL_WITH_MSG_DEFAULT, and LOG_TOKEN_POS.
Referenced by heuristic_tree(), arm_compute::operator<<(), arm_compute::cl_gemm::auto_heuristics::select_mlgo_gemm_kernel(), and arm_compute::to_string().
void arm_compute::mlgo::parser::gemm_version | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 446 of file MLGOParser.cpp.
References CHECK, expect_l_list(), expect_r_list(), expect_text(), and uint_val().
Referenced by header().
void arm_compute::mlgo::parser::gpu_behavior | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 641 of file MLGOParser.cpp.
References accept_text(), FAIL_WITH_MSG, and LOG_TOKEN_POS.
Referenced by heuristics_table_entry().
void arm_compute::mlgo::parser::gpu_priority | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 624 of file MLGOParser.cpp.
References accept_text(), FAIL_WITH_MSG, and LOG_TOKEN_POS.
Referenced by heuristics_table_entry().
void arm_compute::mlgo::parser::header | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 474 of file MLGOParser.cpp.
References CHECK, expect_text(), gemm_version(), and ip_type().
Referenced by mlgo(), NPYLoader::open(), arm_compute::utils::parse_npy_header(), arm_compute::utils::save_to_npy(), and arm_compute::test::detail::validate_npy_header().
void arm_compute::mlgo::parser::heuristic_tree | ( | TokenStream & | in, |
MLGOHeuristics & | h, | ||
bool & | valid | ||
) |
Definition at line 709 of file MLGOParser.cpp.
References accept_text(), CHECK, MLGOHeuristics::check_heuristic_tree(), condition(), expect_heuristic_type(), expect_text(), FAIL_WITH_MSG, arm_compute::mlgo::GEMM_Config_Native, gemm_config_native(), arm_compute::mlgo::GEMM_Config_Reshaped, gemm_config_reshaped(), arm_compute::mlgo::GEMM_Config_Reshaped_Only_RHS, gemm_config_reshaped_only_rhs(), arm_compute::mlgo::GEMM_Type, gemm_type(), MLGOHeuristics::get_heuristic_tree(), LOG_TOKEN_POS, tf_frozen_model_extractor::t, and uint_val().
Referenced by mlgo().
HeuristicType arm_compute::mlgo::parser::heuristic_type | ( | TokenStream & | in, |
bool & | valid, | ||
bool | take = true |
||
) |
Definition at line 524 of file MLGOParser.cpp.
References accept_text(), FAIL_WITH_MSG_DEFAULT, arm_compute::mlgo::GEMM_Config_Native, arm_compute::mlgo::GEMM_Config_Reshaped, arm_compute::mlgo::GEMM_Config_Reshaped_Only_RHS, arm_compute::mlgo::GEMM_Type, and LOG_TOKEN_POS.
Referenced by expect_heuristic_type(), and heuristics_table_entry().
void arm_compute::mlgo::parser::heuristics_table | ( | TokenStream & | in, |
MLGOHeuristics & | h, | ||
bool & | valid | ||
) |
Definition at line 681 of file MLGOParser.cpp.
References accept_text(), CHECK, expect_text(), and heuristics_table_entry().
Referenced by mlgo().
void arm_compute::mlgo::parser::heuristics_table_entry | ( | TokenStream & | in, |
MLGOHeuristics & | h, | ||
bool & | valid | ||
) |
Definition at line 667 of file MLGOParser.cpp.
References MLGOHeuristics::add_heuristic_tree(), CHECK, data_type(), dt, free_vars(), gpu_behavior(), gpu_priority(), heuristic_type(), tf_frozen_model_extractor::t, text_val(), and uint_val().
Referenced by heuristics_table().
int arm_compute::mlgo::parser::int_val | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 306 of file MLGOParser.cpp.
References FAIL_WITH_MSG_DEFAULT, Int, LOG_TOKEN_POS, and TokenStream::take().
Referenced by uint_val().
void arm_compute::mlgo::parser::ip_type | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 456 of file MLGOParser.cpp.
References accept_text(), CHECK, expect_text(), FAIL_WITH_MSG, and LOG_TOKEN_POS.
Referenced by header().
MLGOHeuristics arm_compute::mlgo::parser::mlgo | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 778 of file MLGOParser.cpp.
References accept_text(), MLGOHeuristics::check_all(), CHECK_DEFAULT, end(), header(), heuristic_tree(), and heuristics_table().
Referenced by parse_mlgo().
std::ostream & operator<< | ( | std::ostream & | os, |
const CharPosition & | pos | ||
) |
Definition at line 176 of file Utils.cpp.
References CharPosition::col, and CharPosition::ln.
std::pair< bool, MLGOHeuristics > parse_mlgo | ( | std::istream & | in | ) |
Parse and construct a MLGOHeuristics from input stream.
[in] | in | Input stream |
Definition at line 792 of file MLGOParser.cpp.
References mlgo().
Referenced by MLGOHeuristics::reload_from_stream().
void arm_compute::mlgo::parser::rewind | ( | CharPosition & | pos | ) |
Definition at line 153 of file MLGOParser.cpp.
References CharPosition::col.
std::string arm_compute::mlgo::parser::text_val | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 343 of file MLGOParser.cpp.
References FAIL_WITH_MSG_DEFAULT, LOG_TOKEN_POS, TokenStream::take(), and Text.
Referenced by condition(), free_vars(), and heuristics_table_entry().
unsigned int arm_compute::mlgo::parser::uint_val | ( | TokenStream & | in, |
bool & | valid | ||
) |
Definition at line 319 of file MLGOParser.cpp.
References CHECK_DEFAULT, FAIL_WITH_MSG_DEFAULT, int_val(), and LOG_TOKEN_POS.
Referenced by gemm_config_native(), gemm_config_reshaped(), gemm_config_reshaped_only_rhs(), gemm_version(), heuristic_tree(), and heuristics_table_entry().