Skip to content

Conversation

@zou3519
Copy link
Contributor

@zou3519 zou3519 commented Apr 2, 2025

Stack from ghstack (oldest at bottom):

On library deletion, we need to clear fx's schema cache.

Test Plan:

  • top PR in the stack, I don't have a good test case for this PR.

On library deletion, we need to clear fx's schema cache.

Test Plan:
- next PR up in the stack, I don't have a good test case for this PR.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Apr 2, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 6a0c206 with merge base 58ede0c (image):
💚 Looks good so far! There are no failures yet. 💚

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

On library deletion, we need to clear fx's schema cache.

Test Plan:
- top PR in the stack, I don't have a good test case for this PR.

[ghstack-poisoned]
On library deletion, we need to clear fx's schema cache.

Test Plan:
- top PR in the stack, I don't have a good test case for this PR.

[ghstack-poisoned]
zou3519 added 2 commits April 2, 2025 11:08
On library deletion, we need to clear fx's schema cache.

Test Plan:
- top PR in the stack, I don't have a good test case for this PR.

[ghstack-poisoned]
On library deletion, we need to clear fx's schema cache.

Test Plan:
- top PR in the stack, I don't have a good test case for this PR.

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #148104

pytorchmergebot pushed a commit that referenced this pull request Apr 9, 2025
This PR:

- cleans up some existing comments that don't make sense anymore
- hooks up the "custom_op_default_layout_constraint" back (that seems to
have broken)
- cleans up the "lazy registration path" which seems to never get hit
anymore
- adds dislike_padding to nodes that require exact strides

Test Plan:
- tests + CI

disable padding

Pull Request resolved: #148104
Approved by: https://github.com/shunting314, https://github.com/eellison
ghstack dependencies: #150495
pytorchmergebot pushed a commit that referenced this pull request Apr 9, 2025
If a tag is not specified on a custom operator, then inductor will
assume that it needs exact strides.

Test Plan:
- tests + CI

Pull Request resolved: #150511
Approved by: https://github.com/eellison, https://github.com/shunting314
ghstack dependencies: #150495, #148104
timocafe pushed a commit to timocafe/pytorch that referenced this pull request Apr 16, 2025
On library deletion, we need to clear fx's schema cache.

Test Plan:
- top PR in the stack, I don't have a good test case for this PR.
Pull Request resolved: pytorch#150495
Approved by: https://github.com/eellison
timocafe pushed a commit to timocafe/pytorch that referenced this pull request Apr 16, 2025
This PR:

- cleans up some existing comments that don't make sense anymore
- hooks up the "custom_op_default_layout_constraint" back (that seems to
have broken)
- cleans up the "lazy registration path" which seems to never get hit
anymore
- adds dislike_padding to nodes that require exact strides

Test Plan:
- tests + CI

disable padding

Pull Request resolved: pytorch#148104
Approved by: https://github.com/shunting314, https://github.com/eellison
ghstack dependencies: pytorch#150495
timocafe pushed a commit to timocafe/pytorch that referenced this pull request Apr 16, 2025
amathewc pushed a commit to amathewc/pytorch that referenced this pull request Apr 17, 2025
On library deletion, we need to clear fx's schema cache.

Test Plan:
- top PR in the stack, I don't have a good test case for this PR.
Pull Request resolved: pytorch#150495
Approved by: https://github.com/eellison
amathewc pushed a commit to amathewc/pytorch that referenced this pull request Apr 17, 2025
This PR:

- cleans up some existing comments that don't make sense anymore
- hooks up the "custom_op_default_layout_constraint" back (that seems to
have broken)
- cleans up the "lazy registration path" which seems to never get hit
anymore
- adds dislike_padding to nodes that require exact strides

Test Plan:
- tests + CI

disable padding

Pull Request resolved: pytorch#148104
Approved by: https://github.com/shunting314, https://github.com/eellison
ghstack dependencies: pytorch#150495
amathewc pushed a commit to amathewc/pytorch that referenced this pull request Apr 17, 2025
@aorenste
Copy link
Contributor

aorenste commented Apr 21, 2025

@zou3519 This seems to have broken something with TORCH_LOGS=help:

(py39) $ TORCH_LOGS=help python test/inductor/test_codecache.py -k test_cache_hot_load_pgo_swap_file_names
<stuff snipped>
Traceback (most recent call last):
  File "/home/aorenste/.conda/envs/py39/lib/python3.9/weakref.py", line 667, in _exitfunc
    f()
  File "/home/aorenste/.conda/envs/py39/lib/python3.9/weakref.py", line 591, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
  File "/home/aorenste/local/pytorch/torch/library.py", line 446, in _del_library
    import torch.fx
  File "/home/aorenste/local/pytorch/torch/__init__.py", line 2643, in <module>
    class _TritonLibrary:
  File "/home/aorenste/local/pytorch/torch/__init__.py", line 2644, in _TritonLibrary
    lib = torch.library.Library("triton", "DEF")
  File "/home/aorenste/local/pytorch/torch/library.py", line 109, in __init__
    self.m: Optional[Any] = torch._C._dispatch_library(
RuntimeError: Only a single TORCH_LIBRARY can be used to register the namespace triton; please put all of your definitions in a single TORCH_LIBRARY block.  If you were trying to specify implementations,
consider using TORCH_LIBRARY_IMPL (which can be duplicated).  If you really intended to define operators for a single namespace in a distributed way, you can use TORCH_LIBRARY_FRAGMENT to explicitly
indicate this.  Previous registration of TORCH_LIBRARY was registered at /dev/null:2643; latest registration was registered at /dev/null:2643

(the error is repeated a bunch of times)

@zou3519
Copy link
Contributor Author

zou3519 commented Apr 21, 2025

We are forward fixing this in #151678

Divigroup-RAP pushed a commit to Divigroup-RAP/PYTORCH that referenced this pull request Apr 22, 2025
On library deletion, we need to clear fx's schema cache.

Test Plan:
- top PR in the stack, I don't have a good test case for this PR.

ghstack-source-id: bd75d3e
Pull Request resolved: pytorch/pytorch#150495
zou3519 added a commit that referenced this pull request Apr 30, 2025
If a tag is not specified on a custom operator, then inductor will
assume that it needs exact strides.

Test Plan:
- tests + CI

Pull Request resolved: #150511
Approved by: https://github.com/eellison, https://github.com/shunting314
ghstack dependencies: #150495, #148104
ghstack-source-id: 7192ed4
zou3519 added a commit that referenced this pull request May 1, 2025
If a tag is not specified on a custom operator, then inductor will
assume that it needs exact strides.

Test Plan:
- tests + CI

Pull Request resolved: #150511
Approved by: https://github.com/eellison, https://github.com/shunting314
ghstack dependencies: #150495, #148104
ghstack-source-id: 923efe0
zou3519 added a commit that referenced this pull request May 2, 2025
If a tag is not specified on a custom operator, then inductor will
assume that it needs exact strides.

Test Plan:
- tests + CI

Pull Request resolved: #150511
Approved by: https://github.com/eellison, https://github.com/shunting314
ghstack dependencies: #150495, #148104
ghstack-source-id: f095c0a
@github-actions github-actions bot deleted the gh/zou3519/1151/head branch May 25, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants