Skip to content

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

Merged
peterbell10 merged 2 commits into
triton-lang:mainfrom
anmyachev:ruff-for-nvidia
Jan 13, 2025
Merged

Enable ruff-pre-commit for third_party/nvidia#5587
peterbell10 merged 2 commits into
triton-lang:mainfrom
anmyachev:ruff-for-nvidia

Conversation

@anmyachev
Copy link
Copy Markdown
Contributor

No description provided.

@anmyachev anmyachev requested a review from ptillet as a code owner January 12, 2025 21:29
llvm.init_targets()
context = llvm.context()
if os.environ.get("TRITON_ENABLE_ASAN", "0") == "1":
raise ASANError(
Copy link
Copy Markdown
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

# 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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