diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml deleted file mode 100644 index c2d320c5..00000000 --- a/.github/workflows/claude-code-review.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Claude Code Review - -on: - pull_request: - types: [opened, synchronize, ready_for_review, reopened] - # Optional: Only run on specific file changes - # paths: - # - "src/**/*.ts" - # - "src/**/*.tsx" - # - "src/**/*.js" - # - "src/**/*.jsx" - -jobs: - claude-review: - # Optional: Filter by PR author - # if: | - # github.event.pull_request.user.login == 'external-contributor' || - # github.event.pull_request.user.login == 'new-developer' || - # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' - - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - issues: read - id-token: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Run Claude Code Review - id: claude-review - uses: anthropics/claude-code-action@v1 - with: - anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' - plugins: 'code-review@claude-code-plugins' - prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' - # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md - # or https://code.claude.com/docs/en/cli-reference for available options - diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml deleted file mode 100644 index fef98739..00000000 --- a/.github/workflows/claude.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Claude Code - -on: - issue_comment: - types: [created] - pull_request_review_comment: - types: [created] - issues: - types: [opened, assigned] - pull_request_review: - types: [submitted] - -jobs: - claude: - if: | - (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || - (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - issues: write - id-token: write - actions: read # Required for Claude to read CI results on PRs - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Run Claude Code - id: claude - uses: anthropics/claude-code-action@v1 - with: - anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - show_full_output: true - - # This is an optional setting that allows Claude to read CI results on PRs - additional_permissions: | - actions: read - - # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. - # prompt: 'Update the pull request description to include a summary of changes.' - - # Optional: Add claude_args to customize behavior and configuration - # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md - # or https://code.claude.com/docs/en/cli-reference for available options - # claude_args: '--allowed-tools Bash(gh pr:*)' - diff --git a/src/runners/modal_runner.py b/src/runners/modal_runner.py index 695c96d3..310fdb6d 100644 --- a/src/runners/modal_runner.py +++ b/src/runners/modal_runner.py @@ -14,7 +14,24 @@ operating_sys = "ubuntu24.04" tag = f"{cuda_version}-{flavor}-{operating_sys}" -# Move this to another file later: +# === Image Definition === +# +# Adding new C++ library dependencies: +# 1. Add a .run_commands() step that installs headers to /opt/ +# Use `git clone --depth 1 --branch ` for header-only libs to keep the image small. +# 2. Add the include paths to CPLUS_INCLUDE_PATH in the .env() block at the bottom +# so that nvcc finds them automatically without -I flags. +# 3. Test changes with test_cutlass_image.py (or a similar script) before deploying: +# cd src/runners && modal run test_cutlass_image.py +# +# For users writing submissions with torch.utils.cpp_extension.load_inline: +# C++ headers installed on the image (like CUTLASS) require explicit include paths: +# load_inline( +# ... +# extra_include_paths=["/opt/cutlass/include", "/opt/cutlass/tools/util/include"], +# ) +# For raw nvcc compilation, CPLUS_INCLUDE_PATH is set so includes work automatically. +# cuda_image = ( Image.from_registry(f"nvidia/cuda:{tag}", add_python="3.13") .run_commands("ln -sf $(which python) /usr/local/bin/python3") @@ -52,6 +69,14 @@ # "nvmath-python[cu13]~=0.4", # "numba-cuda[cu13]~=0.15", ) + # CUTLASS C++ headers for #include + .run_commands( + "git clone --depth 1 --branch v4.3.5 https://github.com/NVIDIA/cutlass.git /opt/cutlass", + ) + .env({ + "CUTLASS_PATH": "/opt/cutlass", + "CPLUS_INCLUDE_PATH": "/opt/cutlass/include:/opt/cutlass/tools/util/include", + }) ) cuda_image = cuda_image.add_local_python_source(