Unverified Commit c7f0fbc4 authored by Charlie Lin's avatar Charlie Lin Committed by GitHub
Browse files

compile options can be set for MIGX (#2298)

parent 65c37c3d
...@@ -82,6 +82,27 @@ def parse_args(): ...@@ -82,6 +82,27 @@ def parse_args():
default=False, default=False,
help='Turn on ort VERBOSE logging via session options') help='Turn on ort VERBOSE logging via session options')
parser.add_argument(
'--disable-offload-copy',
dest="offload_copy",
action='store_false',
default=True,
help=
'Disable offload copying (user must handle copy to and from device)')
parser.add_argument(
'--disable-fast-math',
dest="fast_math",
action='store_false',
default=True,
help='Disable fast math optimizations (etc: rewrite_gelu)')
parser.add_argument('--exhaustive_tune',
dest="exhaustive_tune",
action='store_true',
default=False,
help='Enable exhaustive tuning for solutions')
args = parser.parse_args() args = parser.parse_args()
return args return args
...@@ -177,7 +198,12 @@ def main(): ...@@ -177,7 +198,12 @@ def main():
print(model) print(model)
if not args.ort_run: if not args.ort_run:
model.compile(migraphx.get_target(args.target)) model.compile(
migraphx.get_target(args.target),
offload_copy=args.offload_copy,
fast_math=args.fast_math,
exhaustive_tune=args.exhaustive_tune,
)
params = {} params = {}
test_inputs = {} test_inputs = {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment