Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set compile options from accuracy checker #2298

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion tools/accuracy/accuracy_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,27 @@ def parse_args():
default=False,
help='Turn on ort VERBOSE logging via session options')

parser.add_argument(
'--disable-offload-copy',
umangyadav marked this conversation as resolved.
Show resolved Hide resolved
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()

return args
Expand Down Expand Up @@ -177,7 +198,12 @@ def main():
print(model)

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 = {}
test_inputs = {}
Expand Down