skip_opt_set support list (#14845)

* test=develop

* fix tests. test=develop
for_weibo
dzhwinter 7 years ago committed by GitHub
parent 0f085f0a5a
commit acd4b75923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -484,7 +484,10 @@ def memory_optimize(input_program,
if level != 0 and level != 1:
raise ValueError("only support opt_level 0 or 1.")
if skip_opt_set is not None and not isinstance(skip_opt_set, set):
if skip_opt_set is not None:
if isinstance(skip_opt_set, set) or isinstance(skip_opt_set, list):
skip_opt_set = set(skip_opt_set)
else:
raise ValueError("only support skip_opt_set as set.")
global PRINT_LOG
PRINT_LOG = print_log

Loading…
Cancel
Save