MCPcopy Create free account
hub / github.com/ROCm/rocPRIM / get_parser

Method get_parser

tuning/utils/utils.py:42–129  ·  view source on GitHub ↗
(
        default_bytes: Optional[int] = None,
        default_iterations: int = 32,
        default_max_feval: int = 100,
        default_output_dir: str = "../output",
        default_strategy: str = "dual_annealing",
    )

Source from the content-addressed store, hash-verified

40class Parser:
41 @staticmethod
42 def get_parser(
43 default_bytes: Optional[int] = None,
44 default_iterations: int = 32,
45 default_max_feval: int = 100,
46 default_output_dir: str = "../output",
47 default_strategy: str = "dual_annealing",
48 ):
49 parser = argparse.ArgumentParser()
50
51 parser.add_argument(
52 "--size",
53 type=int,
54 default=default_bytes,
55 help=f"Size in bytes (default: {default_bytes})",
56 )
57 parser.add_argument(
58 "--iterations",
59 type=int,
60 default=default_iterations,
61 help=f"Number of iterations (default: {default_iterations})",
62 )
63 parser.add_argument(
64 "--max-fevals",
65 type=int,
66 default=default_max_feval,
67 help=f"Maximum number of unique valid function evaluations (default: {default_max_feval})",
68 )
69 parser.add_argument(
70 "--output-dir",
71 type=str,
72 default=default_output_dir,
73 help=f"Output directory for JSON files (default: {default_output_dir})",
74 )
75 parser.add_argument(
76 "--include-default-config",
77 action="store_true",
78 default=True,
79 help="Include default configs of previous tuning in the new results",
80 )
81 parser.add_argument(
82 "--no-include-default-config",
83 action="store_false",
84 dest="include-default-config",
85 help="Do not include default configs",
86 )
87 parser.add_argument(
88 "--strategy",
89 type=str,
90 default=default_strategy,
91 help=f"Strategy Kernel Tuner will use (default: {default_strategy})",
92 )
93 parser.add_argument(
94 "--simulation-mode",
95 action="store_true",
96 default=False,
97 help="Run strategy in simulation mode (you need the cache files of the full searchspace)",
98 )
99 parser.add_argument(

Callers 2

get_run_tuning_parserMethod · 0.80

Calls 1

add_argumentMethod · 0.80

Tested by

no test coverage detected