Skip to content
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

Enable ruff-pre-commit for third_party/nvidia #5587

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

anmyachev
Copy link
Contributor

No description provided.

@anmyachev anmyachev requested a review from ptillet as a code owner January 12, 2025 21:29
@@ -313,7 +313,7 @@ def make_llir(src, metadata, options, capability):
llvm.init_targets()
context = llvm.context()
if os.environ.get("TRITON_ENABLE_ASAN", "0") == "1":
raise ASANError(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ASANError is not defined

@@ -239,7 +239,7 @@ def make_ttgir(mod, metadata, opt, capability):
# Set up Diagnostic
if os.environ.get("MLIR_ENABLE_REMARK", "0") == "1":
srcMgr = llvm.source_mgr()
diag = ir.source_mgr_diag(srcMgr, mod.context)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not used

Copy link
Contributor

Choose a reason for hiding this comment

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

Test failure looks real, probably the lifetime of this variable controls the diagnostics setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will take a look

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you rerun CI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Everything seems to be fine now :)

Copy link
Contributor

@sfzhu93 sfzhu93 Jan 13, 2025

Choose a reason for hiding this comment

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

I refactored this in my PR as well #5581. I guess it doesn't depend on the lifetime of the variable. Previously it calls a constructor for the SourceMgrDiagnosticHandler, which registers the handler into the MLIRContext.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I refactored this in my PR as well #5581...

Hi @sfzhu93!

I see you are removing these sections in your PR. My changes, I think, will just introduce a small conflict (if they are merged earlier) that will have to be fixed, but that should be easy.

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@peterbell10 peterbell10 merged commit 6aa2df9 into triton-lang:main Jan 13, 2025
7 checks passed
@anmyachev anmyachev deleted the ruff-for-nvidia branch January 13, 2025 20:11
sfzhu93 pushed a commit to sfzhu93/triton that referenced this pull request Jan 13, 2025
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants