-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Enable async_io for squad. #617
Conversation
@@ -940,6 +940,9 @@ def main(_): | |||
else: | |||
os.environ["TF_XLA_FLAGS"] = "--tf_xla_enable_lazy_compilation=false" | |||
|
|||
# Enable async_io to speed up multi-gpu training with XLA and Horovod. | |||
os.environ["TF_XLA_FLAGS"] += "--tf_xla_async_io_level=1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no " " separator?
same on line 939
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I was misled by line 939. I wonder why it worked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did some tests. So, the line 939 never worked...
I updated the PR. Thanks @bas-aarts for the catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
@@ -940,6 +940,9 @@ def main(_): | |||
else: | |||
os.environ["TF_XLA_FLAGS"] = "--tf_xla_enable_lazy_compilation=false" | |||
|
|||
# Enable async_io to speed up multi-gpu training with XLA and Horovod. | |||
os.environ["TF_XLA_FLAGS"] += "--tf_xla_async_io_level=1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Enable async_io for squad.
This reduces Horovod overhead when XLA is enabled.
~7-9% speedup is observed for BERT Squad fp32 and ~3-4% speedup for fp16.