8000 Update Triton by bhack · Pull Request #119457 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Update Triton #119457

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

Closed
wants to merge 1 commit into from
Closed

Update Triton #119457

wants to merge 1 commit into from

Conversation

bhack
Copy link
Contributor
@bhack bhack commented Feb 8, 2024

Copy link
pytorch-bot bot commented Feb 8, 2024

🔗 Helpful Links

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

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

✅ You can merge normally! (4 Unrelated Failures)

As of commit 51bc5fb with merge base c4a1570 (image):

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@github-actions github-actions bot added ciflow/trunk Trigger trunk jobs on your pull request ciflow/inductor labels Feb 8, 2024
Copy link
pytorch-bot bot commented Feb 8, 2024

Please seek CI approval before scheduling CIFlow labels

1 similar comment

This comment was marked as duplicate.

@pytorch-bot pytorch-bot bot removed ciflow/trunk Trigger trunk jobs on your pull request ciflow/inductor labels Feb 8, 2024
@bhack
Copy link
Contributor Author
bhack commented Feb 8, 2024

More details at:
triton-lang/triton#3053

Why have we not detected this with the tests on our side last time we have updated the pin?

Skylion007
Skylion007 previously approved these changes Feb 8, 2024
@bhack
Copy link
Contributor Author
bhack commented Feb 8, 2024

Can we wait for this before we cut the next nightly?

@bhack
Copy link
Contributor Author
bhack commented Feb 8, 2024

Do I need to do something specific for:
https://github.com/pytorch/pytorch/actions/runs/7832512037/job/21371840351 or it was already failing?

@bhack
Copy link
Contributor Author
bhack commented Feb 8, 2024

It seems it was just an http failure right?

@shunting314
Copy link
Contributor

There seems to be some real failure caused by interface change of AttrsDescriptor.

Bert also wants to try out the OSS triton pin update process. So cc @bertmaher

@github-actions github-actions bot added ciflow/trunk Trigger trunk jobs on your pull request module: inductor ciflow/inductor labels Feb 8, 2024

This comment was marked as duplicate.

1 similar comment

This comment was marked as duplicate.

@pytorch-bot pytorch-bot bot removed the ciflow/trunk Trigger trunk jobs on your pull request label Feb 8, 2024
@shunting314
Copy link
Contributor
shunting314 commented Mar 5, 2024

In even newer triton, divisible_by_8 is gone: https://github.com/openai/triton/blob/0f74acc4d92ea506105d25b2724439df85133b19/python/triton/compiler/compiler.py#L21-L22 . Not sure if this is what @aakhundov mean

@bhack
Copy link
Contributor Author
bhack commented Mar 5, 2024

@shunting314 is it still used here?

'configs': [AttrsDescriptor(divisible_by_16=(0, 1, 2, 3), equal_to_1=(), ids_of_folded_args=(), divisible_by_8=(2, 3))]},

@aakhundov
Copy link
Contributor
aakhundov commented Mar 5, 2024

@bertmaher @bhack re. broken test_triton_kernel_equal_to_1_arg, yeah, so ids_of_folded_args seems to be gone in the Triton version this PR updates to (can't find it if grep jit.py). An easy fix would be removing the lines 1002 and 1005 from the unit test below:

if dynamic:
# when half_n_elements passed to the Triton kernel is
# dynamic, equal_to_1 specializaiton can't be enforced
self.assertTrue("equal_to_1=()" in sources[0])
self.assertTrue("ids_of_folded_args=()" in sources[0])
else:
self.assertTrue("equal_to_1=(3,)" in sources[0])
self.assertTrue("ids_of_folded_args=(3,)" in sources[0])

I see we're already skipping ids_of_folded_args in the Inductor code if unavailable, so this part should be good:

# Conditionally add 'ids_of_folded_args' if it's available in AttrsDescriptor
if ids_of_folded_args_available:
kwargs["ids_of_folded_args"] = ids_of_folded_args

I'm wondering why we didn't catch this error, though. Was the PR not rebased before landing? I've added the test mid-last week.

@aakhundov
Copy link
Contributor

In even newer triton, divisible_by_8 is gone:

In the Triton version that this PR updates to, divisible_by_8 is still in: https://github.com/openai/triton/blob/a9bc1a36470eefafe0e2ab2503b8698f1e89e7e3/python/triton/runtime/jit.py#L227-L231

@bhack
Copy link
Contributor Author
bhack commented Mar 5, 2024

When I've adapted the interface divisible_by_8 was still available #119636. It was only removed ids_of_folded_args. Are we talking about different triton shas?

aakhundov added a commit that referenced this pull request Mar 5, 2024
Summary: Due to the Triton pin update in #119457, `test_triton_kernel_equal_to_1_arg` started to break, as `ids_of_folded_args` has vanished from the upstream Triton codebase.

Test Plan:

```
$ python test/inductor/test_triton_kernels.py -k test_triton_kernel_equal_to_1_arg
...
----------------------------------------------------------------------
Ran 6 tests in 6.790s

OK
```

[ghstack-poisoned]
aakhundov added a commit that referenced this pull request Mar 5, 2024
Summary: Due to the Triton pin update in #119457, `test_triton_kernel_equal_to_1_arg` started to break, as `ids_of_folded_args` has vanished from the upstream Triton codebase.

Test Plan:

```
$ python test/inductor/test_triton_kernels.py -k test_triton_kernel_equal_to_1_arg
...
----------------------------------------------------------------------
Ran 6 tests in 6.790s

OK
```

ghstack-source-id: 1a7ef6f
Pull Request resolved: #121192
@aakhundov
Copy link
Contributor

When I've adapted the interface divisible_by_8 was still available #119636. It was only removed ids_of_folded_args. Are we talking about different triton shas?

@bhack yeah, it's just ids_of_folded_args. Here's a forward fix for this test: #121192

pytorchmergebot pushed a commit that referenced this pull request Mar 5, 2024
…1192)

Summary: Due to the Triton pin update in #119457, `test_triton_kernel_equal_to_1_arg` started to break, as `ids_of_folded_args` has vanished from the upstream Triton codebase.

Test Plan:

```
$ python test/inductor/test_triton_kernels.py -k test_triton_kernel_equal_to_1_arg
...
----------------------------------------------------------------------
Ran 6 tests in 6.790s

OK
```

Pull Request resolved: #121192
Approved by: https://github.com/oulgen, https://github.com/bertmaher
@lezcano
Copy link
Collaborator
lezcano commented Mar 5, 2024

@pytorchbot merge -r main

Copy link
pytorch-bot bot commented Mar 5, 2024

This PR needs to be approved by an authorized maintainer before merge.

@lezcano
Copy link
Collaborator
lezcano commented Mar 5, 2024

@pytorchbot merge -r main

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Rebase failed due to Command git -C /home/runner/work/pytorch/pytorch rebase refs/remotes/origin/main pull/119457/head returned non-zero exit code 1

Rebasing (1/1)
Auto-merging .ci/docker/ci_commit_pins/triton.txt
CONFLICT (content): Merge conflict in .ci/docker/ci_commit_pins/
628C
triton.txt
error: could not apply 4554a5a53cb... Update triton
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 4554a5a53cb... Update triton

Raised by https://github.com/pytorch/pytorch/actions/runs/8153738367

@lezcano
Copy link
Collaborator
lezcano commented Mar 5, 2024

Given the revert, it needs a manual rebase. Oh well.

@peterbell10
Copy link
Collaborator

@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

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: inductor open source Reverted topic: not user facing 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.

0