Skip to content

feat: configurable compiler temp file cleanup#1900

Open
LeiWang1999 wants to merge 1 commit intomainfrom
fix/compiler-temp-cleanup-flag
Open

feat: configurable compiler temp file cleanup#1900
LeiWang1999 wants to merge 1 commit intomainfrom
fix/compiler-temp-cleanup-flag

Conversation

@LeiWang1999
Copy link
Member

@LeiWang1999 LeiWang1999 commented Mar 5, 2026

Summary

  • add generic env var TILELANG_CLEANUP_TEMP_FILES to control compiler temp cleanup
  • default to 0 so temp files are kept for debugging/profiling workflows (e.g. ncu)
  • wire nvcc compilation tempdir cleanup behavior to this env flag

Summary by CodeRabbit

Release Notes

  • New Features
    • Introduced a new environment variable to control temporary file cleanup behavior during the compilation process. Developers can now choose to retain temporary build artifacts for debugging and analysis, or automatically remove them to save disk space.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

👋 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
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 562369d2-b1c5-4b28-be3f-21d3f9bc2420

📥 Commits

Reviewing files that changed from the base of the PR and between 00267e4 and f8df439.

📒 Files selected for processing (2)
  • tilelang/contrib/nvcc.py
  • tilelang/env.py

📝 Walkthrough

Walkthrough

This change introduces environment-controlled temporary file cleanup. A new environment variable TILELANG_CLEANUP_TEMP_FILES is added to the environment configuration, along with a method to check this flag. The CUDA compiler integration is updated to conditionally retain temporary files based on this environment setting.

Changes

Cohort / File(s) Summary
Environment Configuration
tilelang/env.py
Added new environment variable TILELANG_CLEANUP_TEMP_FILES (default "0") and accessor method should_cleanup_temp_files() to the Environment class for checking cleanup behavior.
CUDA Compiler Integration
tilelang/contrib/nvcc.py
Updated temp file handling in compile_cuda to use env.should_cleanup_temp_files() to conditionally retain debug files based on environment setting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 ✨ Temp files scattered 'round the warren,
Now with a switch, no more sojourin'!
Debug trails kept when needed most,
Environment whispers, not rules to boast.
Cleanup tamed by flags so bright! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: configurable compiler temp file cleanup' directly and concisely describes the main change: adding configuration for temporary file cleanup behavior in the compiler.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/compiler-temp-cleanup-flag

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 and usage tips.

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.

1 participant