Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
apex
Commits
c3bcf18e
Commit
c3bcf18e
authored
Jun 17, 2019
by
Michael Carilli
Browse files
More helpful message for unexpected opt_level
parent
a9f5f711
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
apex/amp/frontend.py
apex/amp/frontend.py
+2
-1
No files found.
apex/amp/frontend.py
View file @
c3bcf18e
...
@@ -320,7 +320,8 @@ def initialize(
...
@@ -320,7 +320,8 @@ def initialize(
if
opt_level
not
in
opt_levels
:
if
opt_level
not
in
opt_levels
:
raise
RuntimeError
(
raise
RuntimeError
(
"Unexpected optimization level {}. "
.
format
(
opt_level
)
+
"Unexpected optimization level {}. "
.
format
(
opt_level
)
+
"Options are 'O0', 'O1', 'O2', 'O3'."
)
"Options are 'O0', 'O1', 'O2', 'O3'. Note that in `O0`, `O1`, etc., the prefix O is the letter O, "
+
"not the number zero."
)
else
:
else
:
_amp_state
.
opt_properties
=
opt_levels
[
opt_level
](
_amp_state
.
opt_properties
)
_amp_state
.
opt_properties
=
opt_levels
[
opt_level
](
_amp_state
.
opt_properties
)
maybe_print
(
"Selected optimization level {}"
.
format
(
opt_levels
[
opt_level
].
brief
),
True
)
maybe_print
(
"Selected optimization level {}"
.
format
(
opt_levels
[
opt_level
].
brief
),
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment