Skip to content

Commit 7c90426

Browse files
authored
fix lint; fix gin file comment (#143)
* fix lint; fix gin file comment * fix lint; fix gin file comment; fix test failure
1 parent ad5513c commit 7c90426

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

compiler_opt/rl/corpus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def _build_modulespecs_from_datapath(
183183
logging.warning('Additional flags are specified together with override.')
184184
if len(delete_flags) > 0:
185185
logging.warning('Delete flags are specified together with override.')
186-
if len(replace_flags) > 0:
186+
if replace_flags:
187187
logging.warning('Replace flags are specified together with override.')
188188

189189
module_specs: List[ModuleSpec] = []

compiler_opt/rl/inlining/gin_configs/common.gin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ runners.InliningRunner.launcher_path=%launcher_path
1010

1111
problem_config.flags_to_add.add_flags=()
1212
problem_config.flags_to_delete.delete_flags=('-split-dwarf-file','-split-dwarf-output',)
13-
# For AFDO profile reinjection elide overlapping flags from delete_flags and set
13+
# For AFDO profile reinjection set:
1414
# problem_config.flags_to_replace.replace_flags={'-fprofile-sample-use':'/path/to/gwp.afdo','-fprofile-remapping-file':'/path/to/prof_remap.txt'}
1515
problem_config.flags_to_replace.replace_flags={}

compiler_opt/rl/regalloc/gin_configs/common.gin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ runners.RegAllocRunner.launcher_path=%launcher_path
88

99
problem_config.flags_to_add.add_flags=()
1010
problem_config.flags_to_delete.delete_flags=('-split-dwarf-file','-split-dwarf-output',)
11-
# For AFDO profile reinjection elide overlapping flags from delete_flags and set
11+
# For AFDO profile reinjection set:
1212
# problem_config.flags_to_replace.replace_flags={'-fprofile-sample-use':'/path/to/gwp.afdo','-fprofile-remapping-file':'/path/to/prof_remap.txt'}
1313
problem_config.flags_to_replace.replace_flags={}

compiler_opt/rl/train_locally.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ def train_eval(agent_name=constant.AgentName.PPO,
100100

101101
logging.info('Loading module specs from corpus at %s.', FLAGS.data_path)
102102
cps = corpus.Corpus(
103-
FLAGS.data_path,
104-
additional_flags=problem_config.flags_to_add(),
105-
delete_flags=problem_config.flags_to_delete(),
106-
replace_flags=problem_config.flags_to_replace())
103+
FLAGS.data_path,
104+
additional_flags=problem_config.flags_to_add(),
105+
delete_flags=problem_config.flags_to_delete(),
106+
replace_flags=problem_config.flags_to_replace())
107107
logging.info('Done loading module specs from corpus.')
108108

109109
dataset_fn = data_reader.create_sequence_example_dataset_fn(

0 commit comments

Comments
 (0)