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 loc info when printing .ttir .ttgir #2736

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

manman-ren
Copy link
Collaborator

Summary: in triton.cc, enable_debug on PM will make sure debugging info is dumped when MLIR_ENABLE_DUMP is on. But for printing .ttir .ttgir, we are using the default OpPrintingFlags for Operation::print: const OpPrintingFlags &flags = std::nullopt

With this patch, we pass in OpPrintingFlags with debug info enabled.

Since the generation of debug info is controlled via env var: TRITON_DISABLE_LINE_INFO, it should be okay to print loc info as long as it exists.

Summary: in triton.cc, enable_debug on PM will make sure debugging info is dumped
when MLIR_ENABLE_DUMP is on. But for printing .ttir .ttgir, we are
using the default OpPrintingFlags for Operation::print:
const OpPrintingFlags &flags = std::nullopt

With this patch, we pass in OpPrintingFlags with debug info enabled.

Since the generation of debug info is controlled via env var:
TRITON_DISABLE_LINE_INFO, it should be okay to print loc info as long as
it exists.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
@manman-ren manman-ren requested a review from ptillet as a code owner November 30, 2023 19:31
@jlebar
Copy link
Collaborator

jlebar commented Nov 30, 2023

Thank you for the patch! LGTM

@jlebar jlebar enabled auto-merge (squash) November 30, 2023 19:41
@jlebar jlebar merged commit 9b4d196 into triton-lang:main Nov 30, 2023
@manman-ren manman-ren deleted the dump-loc-info branch January 23, 2024 18:56
feihugis pushed a commit to feihugis/triton that referenced this pull request Feb 13, 2024
Summary: in triton.cc, enable_debug on PM will make sure debugging info
is dumped when MLIR_ENABLE_DUMP is on. But for printing .ttir .ttgir, we
are using the default OpPrintingFlags for Operation::print: const
OpPrintingFlags &flags = std::nullopt

With this patch, we pass in OpPrintingFlags with debug info enabled.

Since the generation of debug info is controlled via env var:
TRITON_DISABLE_LINE_INFO, it should be okay to print loc info as long as
it exists.

Co-authored-by: Manman Ren <mren@meta.com>
shunting314 pushed a commit to shunting314/triton that referenced this pull request Mar 14, 2024
Summary: in triton.cc, enable_debug on PM will make sure debugging info
is dumped when MLIR_ENABLE_DUMP is on. But for printing .ttir .ttgir, we
are using the default OpPrintingFlags for Operation::print: const
OpPrintingFlags &flags = std::nullopt

With this patch, we pass in OpPrintingFlags with debug info enabled.

Since the generation of debug info is controlled via env var:
TRITON_DISABLE_LINE_INFO, it should be okay to print loc info as long as
it exists.

Co-authored-by: Manman Ren <mren@meta.com>
shunting314 pushed a commit to shunting314/triton that referenced this pull request Mar 14, 2024
Summary: in triton.cc, enable_debug on PM will make sure debugging info
is dumped when MLIR_ENABLE_DUMP is on. But for printing .ttir .ttgir, we
are using the default OpPrintingFlags for Operation::print: const
OpPrintingFlags &flags = std::nullopt

With this patch, we pass in OpPrintingFlags with debug info enabled.

Since the generation of debug info is controlled via env var:
TRITON_DISABLE_LINE_INFO, it should be okay to print loc info as long as
it exists.

Co-authored-by: Manman Ren <mren@meta.com>
shunting314 pushed a commit to shunting314/triton that referenced this pull request Mar 19, 2024
Summary: in triton.cc, enable_debug on PM will make sure debugging info
is dumped when MLIR_ENABLE_DUMP is on. But for printing .ttir .ttgir, we
are using the default OpPrintingFlags for Operation::print: const
OpPrintingFlags &flags = std::nullopt

With this patch, we pass in OpPrintingFlags with debug info enabled.

Since the generation of debug info is controlled via env var:
TRITON_DISABLE_LINE_INFO, it should be okay to print loc info as long as
it exists.

Co-authored-by: Manman Ren <mren@meta.com>
ptillet added a commit that referenced this pull request Mar 19, 2024
Cherry pick a few PRs to make PyTorch 2.3 work with Triton 2.2.x . Also
this makes sure some python bindings needed by user defined triton
kernel exists in the triton branch.

---------

Co-authored-by: Philippe Tillet <phil@openai.com>
Co-authored-by: Manman Ren <manman.ren@gmail.com>
Co-authored-by: Manman Ren <mren@meta.com>
ptillet added a commit that referenced this pull request Apr 1, 2024
Cherry pick a few PRs to make PyTorch 2.3 work with Triton 2.2.x . Also
this makes sure some python bindings needed by user defined triton
kernel exists in the triton branch.

---------

Co-authored-by: Philippe Tillet <phil@openai.com>
Co-authored-by: Manman Ren <manman.ren@gmail.com>
Co-authored-by: Manman Ren <mren@meta.com>
binarman pushed a commit to binarman/triton that referenced this pull request Apr 2, 2024
Summary: in triton.cc, enable_debug on PM will make sure debugging info
is dumped when MLIR_ENABLE_DUMP is on. But for printing .ttir .ttgir, we
are using the default OpPrintingFlags for Operation::print: const
OpPrintingFlags &flags = std::nullopt

With this patch, we pass in OpPrintingFlags with debug info enabled.

Since the generation of debug info is controlled via env var:
TRITON_DISABLE_LINE_INFO, it should be okay to print loc info as long as
it exists.

Co-authored-by: Manman Ren <mren@meta.com>
ptillet added a commit that referenced this pull request Apr 3, 2024
Cherry pick a few PRs to make PyTorch 2.3 work with Triton 2.2.x . Also
this makes sure some python bindings needed by user defined triton
kernel exists in the triton branch.

---------

Co-authored-by: Philippe Tillet <phil@openai.com>
Co-authored-by: Manman Ren <manman.ren@gmail.com>
Co-authored-by: Manman Ren <mren@meta.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.

2 participants