Skip to content

Commit a2ce747

Browse files
authored
Revert "Add an option to remove debug info from the module (#6837)" (#6840)
This reverts #6837. This option is redundant with the existing `TRITON_DISABLE_LINE_INFO=1` which results in identical IR. However, that option wasn't included in the readme, so I've kept the documentation but just changed the variable name.
1 parent a7d0af6 commit a2ce747

File tree

5 files changed

+1
-7
lines changed

5 files changed

+1
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ See [`python/triton/knobs.py`](python/triton/knobs.py) for the full list of conf
212212
- `TRITON_OVERRIDE_DIR` specifies the directory from which to load the IR/ptx/amdgcn files when `TRITON_KERNEL_OVERRIDE` is set to 1.
213213
- `TRITON_F32_DEFAULT` sets the default input precision of `tl.dot` when using 32-bit floats, which can be either `ieee`, `tf32`, or `tf32x3`.
214214
- `TRITON_FRONT_END_DEBUGGING=1` disables exception wrapping when an error occurs in the compiler frontend, allowing the full stack trace to be seen.
215-
- `TRITON_STRIP_DEBUG_INFO` removes all debug information from the module, including location information
215+
- `TRITON_DISABLE_LINE_INFO=1` removes all line information from the module
216216

217217
N.B. Some of these environment variables don't have a knob in `knobs.py`-- those are only relevant to the C++ layer(s), hence they don't exist in the python layer.
218218

python/src/passes.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ void init_triton_analysis(py::module &&m) {
2525

2626
void init_triton_passes_common(py::module &&m) {
2727
using namespace mlir;
28-
ADD_PASS_WRAPPER_0("add_strip_debug_info", createStripDebugInfoPass);
2928
ADD_PASS_WRAPPER_0("add_sccp", createSCCPPass);
3029
ADD_PASS_WRAPPER_0("add_symbol_dce", createSymbolDCEPass);
3130
ADD_PASS_WRAPPER_0("add_inliner", createInlinerPass);

python/triton/knobs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ class compilation_knobs(base_knobs):
358358
disable_line_info: env_bool = env_bool("TRITON_DISABLE_LINE_INFO")
359359
front_end_debugging: env_bool = env_bool("TRITON_FRONT_END_DEBUGGING")
360360
allow_non_constexpr_globals: env_bool = env_bool("TRITON_ALLOW_NON_CONSTEXPR_GLOBALS")
361-
strip_debug_info: env_bool = env_bool("TRITON_STRIP_DEBUG_INFO")
362361
listener: Union[CompilationListener, None] = None
363362

364363

third_party/amd/backend/compiler.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ def path_to_rocm_lld():
195195
def make_ttir(mod, metadata, options):
196196
pm = ir.pass_manager(mod.context)
197197
pm.enable_debug()
198-
if knobs.compilation.strip_debug_info:
199-
passes.common.add_strip_debug_info(pm)
200198
passes.common.add_inliner(pm)
201199
passes.ttir.add_rewrite_tensor_pointer(pm)
202200
passes.ttir.add_rewrite_tensor_descriptor_to_pointer(pm)

third_party/nvidia/backend/compiler.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ def load_dialects(self, ctx):
207207
def make_ttir(mod, metadata, opt, capability):
208208
pm = ir.pass_manager(mod.context)
209209
pm.enable_debug()
210-
if knobs.compilation.strip_debug_info:
211-
passes.common.add_strip_debug_info(pm)
212210
passes.common.add_inliner(pm)
213211
passes.ttir.add_rewrite_tensor_pointer(pm)
214212
if capability // 10 < 9:

0 commit comments

Comments
 (0)