Skip to content

Commit d13b1ef

Browse files
authored
Fix behavioral change in extract_ir logging introduced in 846df06 (#41)
1 parent 30841a4 commit d13b1ef

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

compiler_opt/rl/inlining/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ def observation_processing_layer(obs_spec):
9898

9999
return observation_processing_layer
100100

101+
101102
def get_nonnormalized_features():
102103
return ['reward', 'inlining_default', 'inlining_decision']
103-

compiler_opt/rl/problem_configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,6 @@ def get_nonnormalized_features(self) -> Iterable[str]:
100100
def get_runner_type(self) -> 'type[compilation_runner.CompilationRunner]':
101101
raise NotImplementedError
102102

103+
103104
def is_thinlto(module_paths: Iterable[str]) -> bool:
104105
return tf.io.gfile.exists(next(iter(module_paths)) + '.thinlto.bc')

compiler_opt/rl/regalloc/config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ def observation_processing_layer(obs_spec):
9898
first_non_zero = x
9999
break
100100

101-
normalize_fn = feature_ops.get_normalize_fn(quantile,
102-
with_sqrt,
101+
normalize_fn = feature_ops.get_normalize_fn(quantile, with_sqrt,
103102
with_z_score_normalization,
104103
eps)
105104
log_normalize_fn = feature_ops.get_normalize_fn(
@@ -142,8 +141,9 @@ def progress_processing_fn(obs):
142141

143142
return observation_processing_layer
144143

144+
145145
def get_nonnormalized_features():
146-
return ['mask', 'nr_urgent',
147-
'is_hint', 'is_local',
148-
'is_free', 'max_stage',
149-
'min_stage', 'reward']
146+
return [
147+
'mask', 'nr_urgent', 'is_hint', 'is_local', 'is_free', 'max_stage',
148+
'min_stage', 'reward'
149+
]

compiler_opt/tools/extract_ir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def main(argv):
271271
f.write(path + '\n')
272272

273273
logging.info('Converted %d files out of %d',
274-
len(objs) - len(relative_output_paths), len(objs))
274+
len(objs) - relative_output_paths.count(None), len(objs))
275275

276276

277277
if __name__ == '__main__':

0 commit comments

Comments
 (0)