Skip to content

[BE] Don't print 12 triton not found on import#172614

Closed
malfet wants to merge 1 commit intogh/malfet/654/basefrom
gh/malfet/654/head
Closed

[BE] Don't print 12 triton not found on import#172614
malfet wants to merge 1 commit intogh/malfet/654/basefrom
gh/malfet/654/head

Conversation

@malfet
Copy link
Copy Markdown
Contributor

@malfet malfet commented Jan 16, 2026

Stack from ghstack (oldest at bottom):

If one attempts to import torch.utils.flop_count on MacOS (or any other CPU system), they'll be greeted with the following repeated warning

% python -c "import torch.utils.flop_counter"
W0115 18:52:55.246000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.246000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.246000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels

which was introduced by #169876

Move import to top of flop_counter utils and only warn if system is compiled with GPU support that requires triton (i.e. CUDA/ROCM or XPU)

cc @mlazos

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jan 16, 2026

🔗 Helpful Links

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

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

✅ No Failures

As of commit 701a9c0 with merge base 8103dba (image):
💚 Looks good so far! There are no failures yet. 💚

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

malfet added a commit that referenced this pull request Jan 16, 2026
If one attempts to import `torch.utils.flop_count` on MacOS (or any
other CPU system), they'll be greated with the following repeated
warning
```
% python -c "import torch.utils.flop_counter"
W0115 18:52:55.246000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.246000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.246000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
W0115 18:52:55.247000 34027 torch/utils/flop_counter.py:45] triton not found; flop counting will not work for triton kernels
```
which was introduced by #169876

Move import to top of flop_counter utils and only warn if system is
compiled with GPU support that requires triton (i.e. CUDA/ROCM or XPU)


ghstack-source-id: d2f3c83
Pull-Request: #172614
@malfet malfet added topic: improvements topic category release notes: dynamo ciflow/trunk Trigger trunk jobs on your pull request labels Jan 16, 2026
Copy link
Copy Markdown
Contributor

@Lucaskabela Lucaskabela left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@malfet
Copy link
Copy Markdown
Contributor Author

malfet commented Jan 16, 2026

@pytorchbot merge -f "Pull should be sufficient here"

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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

DustyL pushed a commit to DustyL/pytorch that referenced this pull request Jan 17, 2026
Cherry-picked from upstream main:

- [SymmMem] Back symm_mem.empty() with implicit pool (pytorch#172292)
  Automatic memory reuse for symmetric memory allocations

- [SymmMem] Add multimem support for NCCL and NVSHMEM (pytorch#172185)
  Enhanced multi-GPU memory support

- [inductor] Basic Comm Buffer Reuse for Symmetric Memory (pytorch#171909)
  Memory optimization for torch.compile with symmetric buffers

- [BE] Don't print 12 `triton not found` on import (pytorch#172614)
  QoL fix for flop_counter imports

- [inductor] Use custom triton kernel subclass when available (pytorch#167456)
  Enables custom backend heuristics for Triton kernels

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pytorchmergebot pushed a commit that referenced this pull request Jan 27, 2026
Summary:
D90903684 is breaking our torchstream tests and this should fix it.
see https://www.internalfb.com/intern/test/562950222982678.

Test Plan: buck test -j 18 fbsource//arvr/mode/mac-arm/opt fbcode//frl/ctrl/src2-main/platform/torchstream_ctrl/torchstream_ctrl/prod/tests:test_modules-arvr -- --exact 'fbcode//frl/ctrl/src2-main/platform/torchstream_ctrl/torchstream_ctrl/prod/tests:test_modules-arvr - test_ptq_compatibility (torchstream_ctrl.prod.tests.test_modules.Test_TdsBlock)' --stress-runs 20 --record-results

Reviewed By: ogbiggles

Differential Revision: D91038779

Regression caused by #172614
Pull Request resolved: #173397
Approved by: https://github.com/malfet
riccardofelluga pushed a commit to riccardofelluga/pytorch that referenced this pull request Jan 27, 2026
Summary:
D90903684 is breaking our torchstream tests and this should fix it.
see https://www.internalfb.com/intern/test/562950222982678.

Test Plan: buck test -j 18 fbsource//arvr/mode/mac-arm/opt fbcode//frl/ctrl/src2-main/platform/torchstream_ctrl/torchstream_ctrl/prod/tests:test_modules-arvr -- --exact 'fbcode//frl/ctrl/src2-main/platform/torchstream_ctrl/torchstream_ctrl/prod/tests:test_modules-arvr - test_ptq_compatibility (torchstream_ctrl.prod.tests.test_modules.Test_TdsBlock)' --stress-runs 20 --record-results

Reviewed By: ogbiggles

Differential Revision: D91038779

Regression caused by pytorch#172614
Pull Request resolved: pytorch#173397
Approved by: https://github.com/malfet
@github-actions github-actions bot deleted the gh/malfet/654/head branch February 16, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: dynamo topic: improvements topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants