Skip to content

Use TILELANG_VERBOSE environment var to control the compile output info#2453

Merged
LeiWang1999 merged 2 commits into
tile-ai:mainfrom
bucket-xv:xch/feat-env-verbose
Jun 26, 2026
Merged

Use TILELANG_VERBOSE environment var to control the compile output info#2453
LeiWang1999 merged 2 commits into
tile-ai:mainfrom
bucket-xv:xch/feat-env-verbose

Conversation

@bucket-xv

@bucket-xv bucket-xv commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Switched PTXAS compile verbosity from a pass-config toggle to the TILELANG_VERBOSE environment-driven verbosity path.
  • Removed the tl.enable_ptxas_verbose_output pass config / attr definitions from the C++ frontend and Python pass config enum.
  • Updated CUDA compile flows so verbose NVCC/PTXAS output is enabled from the active verbosity setting, and PTXAS output is logged instead of printed directly.

C++ style / lint notes

  • This PR touches C++ source in src/op/builtin.cc and src/op/builtin.h, but it does not appear to change rules documented in docs/developer_guide/cpp_style.md.
  • No new concerns were introduced for the “C++ API Style Audit (warning only)” CI step from the provided diff summary.
  • The changes are behavior-focused rather than style-driven; no blocking build/test issues were indicated.

@github-actions

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the TileLang project.

Please remember to run pre-commit run --all-files in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.

We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR removes the PTXAS verbose output pass-config key and updates CUDA compilation paths to use environment or instance verbosity, while logging verbose NVCC/PTXAS output through the logger.

Changes

PTXAS verbosity control changes

Layer / File(s) Summary
Remove PTXAS verbose config
tilelang/transform/pass_config.py, src/op/builtin.h, src/op/builtin.cc
The PTXAS verbose output key, attribute constant, and pass-config registration are removed from the public declarations.
Lower CUDA verbosity source
tilelang/engine/lower.py
CUDA option assembly in lowering now reads environment verbosity instead of the removed pass-config flag.
Update CUDA library logging
tilelang/jit/adapter/libgen.py, tilelang/contrib/nvcc.py
CUDA library generation switches its PTXAS verbose condition to instance verbosity, and NVCC verbose output is logged through the logger.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped where PTXAS flags once shone,
and logger lanterns lit the zone.
The env said “verbose,” soft and bright,
so kernels purred through the night.
Thump thump—my carrots taste just right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: compile verbosity is now driven by the TILELANG_VERBOSE environment variable.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tilelang/contrib/nvcc.py`:
- Around line 155-156: The NVCC compilation and PTXAS verbose logs in nvcc.py
should remain visible through the configured module logger. Verify that the
existing logger.info calls in the compilation path continue to use the package
logger initialized by tilelang/__init__.py with TqdmLoggingHandler and INFO
level, and avoid changing them to lower-priority or direct stdout/stderr output
so the command and verbose ptxas output stay readable alongside progress bars.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f9a85016-932b-45ff-bc42-2d4e1253dca8

📥 Commits

Reviewing files that changed from the base of the PR and between ddc4813 and 00a73cb.

📒 Files selected for processing (6)
  • src/op/builtin.cc
  • src/op/builtin.h
  • tilelang/contrib/nvcc.py
  • tilelang/engine/lower.py
  • tilelang/jit/adapter/libgen.py
  • tilelang/transform/pass_config.py
💤 Files with no reviewable changes (3)
  • src/op/builtin.cc
  • tilelang/transform/pass_config.py
  • src/op/builtin.h

Comment thread tilelang/contrib/nvcc.py
Comment on lines +155 to +156
logger.info("NVCC compilation command: %s", " ".join(cmd))
logger.info("PTXAS verbose output:\n%s", py_str(out))

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.

🩺 Stability & Availability | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== tilelang logger definition/config =="
rg -n "logger|logging|getLogger|basicConfig|setLevel" tilelang/__init__.py tilelang 2>/dev/null || true

echo
echo "== callsites enabling verbose compile paths =="
rg -n "compile_cuda\\(|verbose\\s*=\\s*True|LibraryGenerator\\(.*verbose" tilelang

Repository: tile-ai/tilelang

Length of output: 23933


Confirm verbose output visibility via configured logger.

The logger.info calls in tilelang/contrib/nvcc.py are safe. The tilelang module initializes a custom TqdmLoggingHandler in tilelang/__init__.py and sets the default log level to INFO, ensuring that compilation commands and verbose ptxas output are emitted to the console even in the presence of progress bars.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tilelang/contrib/nvcc.py` around lines 155 - 156, The NVCC compilation and
PTXAS verbose logs in nvcc.py should remain visible through the configured
module logger. Verify that the existing logger.info calls in the compilation
path continue to use the package logger initialized by tilelang/__init__.py with
TqdmLoggingHandler and INFO level, and avoid changing them to lower-priority or
direct stdout/stderr output so the command and verbose ptxas output stay
readable alongside progress bars.

@LeiWang1999 LeiWang1999 merged commit 946ba1b into tile-ai:main Jun 26, 2026
6 of 7 checks passed
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