diff --git a/python/tvm/target.py b/python/tvm/target.py index f55a2d613d05..1bcd1de7d3d9 100644 --- a/python/tvm/target.py +++ b/python/tvm/target.py @@ -56,6 +56,8 @@ def _merge_opts(opts, new_opts): if isinstance(new_opts, str): new_opts = new_opts.split() if new_opts: + opt_set = set(opts) + new_opts = [opt for opt in new_opts if opt not in opt_set] return opts + new_opts return opts