Skip to content

Silence loud error on torchao cpu builds - #1808

Merged
msaroufim merged 2 commits into
mainfrom
msaroufim/silenceloudwarning
Mar 3, 2025
Merged

Silence loud error on torchao cpu builds#1808
msaroufim merged 2 commits into
mainfrom
msaroufim/silenceloudwarning

Conversation

@msaroufim

@msaroufim msaroufim commented Mar 1, 2025

Copy link
Copy Markdown
Contributor

before this fix, just importing torchao in a cpu only environment would print import error: triton not found

Came up live in this talk by @manuelcandales https://www.youtube.com/watch?v=0vv9K0RvOfo&ab_channel=GPUMODE

To repro on your M1 laptop

USE_CPP=0 pip install .
python
import torchao

@pytorch-bot

pytorch-bot Bot commented Mar 1, 2025

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 11 Pending

As of commit 77e2b3f with merge base 7963f9c (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 1, 2025
@msaroufim msaroufim changed the title Silence loud commit Silence loud error Mar 1, 2025
@msaroufim
msaroufim requested a review from manuelcandales March 1, 2025 20:49
@msaroufim msaroufim added the module: not user facing Use this tag if you don't want this PR to show up in release notes label Mar 1, 2025
@msaroufim msaroufim changed the title Silence loud error Silence loud error on torchao cpu builds Mar 1, 2025
@msaroufim

Copy link
Copy Markdown
Contributor Author

Errors seem like flakes

@msaroufim
msaroufim requested a review from drisspg March 3, 2025 18:51
Comment thread torchao/kernel/intmm.py

from torchao.utils import TORCH_VERSION_AT_LEAST_2_2, TORCH_VERSION_AT_LEAST_2_6

logger = logging.getLogger(__name__)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think its recommend to have null handlers for library logging

logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

And then users can turn them on w/
https://github.com/drisspg/transformer_nuggets/blob/d04895f4adb17a7db1cd99be405019501dcb3ecf/transformer_nuggets/__init__.py#L4

@drisspg drisspg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

`

@msaroufim
msaroufim merged commit 3bc1dd4 into main Mar 3, 2025
@msaroufim
msaroufim deleted the msaroufim/silenceloudwarning branch March 3, 2025 20:36
liangel-02 pushed a commit that referenced this pull request Aug 25, 2025
* Silence loud commit

* Update intmm.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: not user facing Use this tag if you don't want this PR to show up in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants