KEMBAR78
[ROCm] allow user to override PYTORCH_ROCM_ARCH by jeffdaily · Pull Request #60602 · pytorch/pytorch · GitHub
Skip to content

Conversation

@jeffdaily
Copy link
Collaborator

Restores the ability of a user to call .jenkins/pytorch/build.sh while
also setting PYTORCH_ROCM_ARCH. Otherwise, with IN_CI=1 as the new
default, it will forcibly ignore user settings when build.sh is used
outside of CI.

Restores the ability of a user to call .jenkins/pytorch/build.sh while
also setting PYTORCH_ROCM_ARCH. Otherwise, with IN_CI=1 as the new
default, it will forcibly ignore user settings when build.sh is used
outside of CI.
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 23, 2021

💊 CI failures summary and remediations

As of commit 6e3a9e4 (more details on the Dr. CI page and at hud.pytorch.org/pr/60602):


  • 1/1 failures introduced in this PR

1 failure not recognized by patterns:

Job Step Action
CircleCI pytorch_xla_linux_bionic_py3_6_clang9_test Run tests 🔁 rerun

Preview docs built from this PR

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@jeffdaily
Copy link
Collaborator Author

CC @jithunnair-amd for awareness.

@github-actions github-actions bot added the module: rocm AMD GPU support for Pytorch label Jun 23, 2021
Copy link
Contributor

@janeyx99 janeyx99 left a comment

Choose a reason for hiding this comment

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

Otherwise looks good to me!

if [[ -n "$IN_CI" && -z "$PYTORCH_ROCM_ARCH" ]]; then
# Set ROCM_ARCH to gfx900 and gfx906 for CI builds, if user doesn't override.
echo "Limiting PYTORCH_ROCM_ARCH to gfx90[06] for CI builds"
export PYTORCH_ROCM_ARCH="gfx900;gfx906"
Copy link
Contributor

Choose a reason for hiding this comment

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

So I notice you use PYTORCH_ROCM_ARCH as a conditional, but then also reset it to something else. Would that ever be confusing as the user might not be expecting their input to be immediately overridden?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

IN_CI is now always 1. It is testing for non-zero length string, so always true. Then I'm testing for zero-length, meaning the user has not explicitly set PYTORCH_ROCM_ARCH, therefore CI job should override as it did before.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

IN_CI=1 change was made in 510334f.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What lead me to submit this PR was indeed because I had export PYTORCH_ROCM_ARCH=gfx908 and the build.sh script was overriding what I wanted.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah sorry I misread the -z

@jeffdaily
Copy link
Collaborator Author

@janeyx99 any chance you could finish the review and land, if approved?

@facebook-github-bot
Copy link
Contributor

@janeyx99 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@janeyx99
Copy link
Contributor

Ah my bad--forgot to import it! Thanks for the ping

@facebook-github-bot
Copy link
Contributor

@janeyx99 merged this pull request in d1a4c9e.

jeffdaily added a commit to ROCm/pytorch that referenced this pull request Jul 13, 2021
Summary:
Restores the ability of a user to call .jenkins/pytorch/build.sh while
also setting PYTORCH_ROCM_ARCH. Otherwise, with IN_CI=1 as the new
default, it will forcibly ignore user settings when build.sh is used
outside of CI.

Pull Request resolved: pytorch#60602

Reviewed By: samestep

Differential Revision: D29490791

Pulled By: janeyx99

fbshipit-source-id: b5e8a529b8e0b5020b260b4bf027a37e0c1df8d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants