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

[benchmarks] Default to functionalization disabled. #8093

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ysiraichi
Copy link
Collaborator

This PR defaults benchmarks execution to PyTorch/XLA without the functionalization layer. In summary:

  • Add --enable-functionalization command-line argument
  • By default, set XLA_DISABLE_FUNCTIONALIZATION=1

Reasoning: after running experiments, it became clear that disabling functionalization reduced overhead, improving performance of, mainly, non-dynamo configurations. The speedup we get from this is:

Inference Training
Dynamo 1.11x 1.14x
Non-Dynamo 1.3x 1.44x

Note: since functionalization is required for correctly supporting aliasing and in-place mutation on views. Turning this option off means that there will be more model failures. Specifically:

Inference + NonDynamo:

  • hf_Longformer: execution failure
  • llama: execution failure
  • pytorch_stargan: execution failure

Inference + Dynamo:

  • hf_Longformer: execution failure
  • llama: execution failure
  • pyhpc_turbulent_kinetic_energy: verifier failure
  • pytorch_stargan: execution failure

Training + NonDynamo:

  • hf_Longformer: execution failure
  • pytorch_stargan: execution failure

Training + Dynamo:

  • hf_Longformer: execution failure
  • pytorch_stargan: execution failure

cc @miladm @JackCaoG @zpcore

Copy link
Collaborator

@zpcore zpcore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM, those hard coded tests are really annoying when it comes to adding new option to the benchmarking script.

@zpcore
Copy link
Collaborator

zpcore commented Oct 1, 2024

Can you fix the benchmark test? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants