KEMBAR78
S390x inductor support by AlekseiNikiforovIBM · Pull Request #111367 · pytorch/pytorch · GitHub
Skip to content

Conversation

@AlekseiNikiforovIBM
Copy link
Collaborator

@AlekseiNikiforovIBM AlekseiNikiforovIBM commented Oct 16, 2023

Use arch compile flags. They are needed for vectorization support on s390x.
Implement new helper functions for inductor.

This change fixes multiple tests in test_cpu_repro.py

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @voznesenskym @penguinwu @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 16, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/111367

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 2ab18d7 with merge base 619ae87 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@github-actions github-actions bot added module: cpu CPU specific problem (e.g., perf, algorithm) module: inductor ciflow/inductor labels Oct 16, 2023
@janeyx99 janeyx99 requested a review from jgong5 October 16, 2023 22:09
@janeyx99 janeyx99 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 16, 2023
Use arch compile flags. They are needed for vectorization support on s390x.

This change fixes multiple tests in test_cpu_repro.py
This change fixes remaining tests in test_cpu_repro.py
Make str return 'zvector' instead of 'vx' since it is used to generate
macros like -DCPU_CAPABILITY=ZVECTOR.
Rework vectorization detection for s390x.
Also rework macros generation to allow more than 1 macro provided.
Provide list of directories instead of -I directives.
Function _write_ninja_file_to_build_library is eventually called
and it expects list of paths. If include directive is provided,
it generates bogus output like:
-I/home/user/pytorch/-I/home/user/pytorch/torch/include
-I/home/user/pytorch/torch/include/torch/csrc/api/include
...
when original input is:
-I/home/user/pytorch/torch/include
-I/home/user/pytorch/torch/include/torch/csrc/api/include ...

Update PCH handling to work with list of paths instead of include directives.

This change fixes most tests in test/inductor/test_cpp_wrapper.py on s390x.
cuda: bool = False,
aot_mode: bool = False,
) -> Tuple[str, str, str, str]:
) -> Tuple[Any, str, str, str, str]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this just a str?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, it's a list of strings.

Copy link
Contributor

Choose a reason for hiding this comment

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

List[str] then, pretty please? :)

@ezyang
Copy link
Contributor

ezyang commented Oct 20, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 20, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@ezyang
Copy link
Contributor

ezyang commented Oct 20, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot pushed a commit that referenced this pull request Oct 23, 2023
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
Use arch compile flags. They are needed for vectorization support on s390x.
Implement new helper functions for inductor.

This change fixes multiple tests in test_cpu_repro.py

Pull Request resolved: pytorch#111367
Approved by: https://github.com/ezyang
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: cpu CPU specific problem (e.g., perf, algorithm) module: inductor open source release notes: inductor topic: new features topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants