mirror of
https://github.com/jafioti/luminal.git
synced 2026-06-01 21:49:47 +09:00
Remove Modal CUDA clippy job, now handled by T4 runner
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
25
.github/workflows/test-cuda.yml
vendored
25
.github/workflows/test-cuda.yml
vendored
@@ -9,31 +9,6 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cuda_clippy:
|
|
||||||
if: >-
|
|
||||||
github.event_name == 'push'
|
|
||||||
|| github.event_name == 'workflow_dispatch'
|
|
||||||
|| (github.event_name == 'pull_request'
|
|
||||||
&& contains(github.event.pull_request.labels.*.name, 'modal-ready'))
|
|
||||||
name: Cuda Clippy
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: Modal
|
|
||||||
timeout-minutes: 30
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v6
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.11"
|
|
||||||
- name: Install Modal
|
|
||||||
run: pip install modal
|
|
||||||
- name: Run CUDA clippy on Modal
|
|
||||||
env:
|
|
||||||
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
|
|
||||||
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
|
|
||||||
run: modal run ci/modal_cargo_clippy.py
|
|
||||||
|
|
||||||
cuda_unit_test:
|
cuda_unit_test:
|
||||||
if: >-
|
if: >-
|
||||||
github.event_name == 'push'
|
github.event_name == 'push'
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
import modal
|
|
||||||
import subprocess
|
|
||||||
import os
|
|
||||||
|
|
||||||
gpu_type = os.environ.get("GPU_TYPE", "T4")
|
|
||||||
CUDARC_CUDA_VERSION = "12080"
|
|
||||||
|
|
||||||
app = modal.App("luminal-ci-cargo-clippy")
|
|
||||||
|
|
||||||
WORKDIR = "/workspace/luminal"
|
|
||||||
|
|
||||||
cuda_image = (
|
|
||||||
modal.Image.from_registry("nvcr.io/nvidia/pytorch:25.03-py3")
|
|
||||||
.apt_install("protobuf-compiler")
|
|
||||||
.run_commands(
|
|
||||||
"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y",
|
|
||||||
"pip install pre-commit",
|
|
||||||
)
|
|
||||||
.env(
|
|
||||||
{
|
|
||||||
"PATH": "/root/.cargo/bin:$PATH",
|
|
||||||
"CUDARC_CUDA_VERSION": CUDARC_CUDA_VERSION,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.add_local_dir(".", remote_path=WORKDIR, copy=True)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@app.function(
|
|
||||||
image=cuda_image,
|
|
||||||
gpu=gpu_type,
|
|
||||||
timeout=1800, # 30 minutes
|
|
||||||
)
|
|
||||||
def run_cargo_clippy():
|
|
||||||
"""Run cargo clippy for CUDA crates on a Modal GPU."""
|
|
||||||
subprocess.run(["nvidia-smi"], check=True)
|
|
||||||
|
|
||||||
# Detect GPU compute capability
|
|
||||||
result = subprocess.run(
|
|
||||||
["nvidia-smi", "--query-gpu=compute_cap", "--format=csv,noheader"],
|
|
||||||
capture_output=True,
|
|
||||||
text=True,
|
|
||||||
check=True,
|
|
||||||
)
|
|
||||||
compute_cap = result.stdout.strip().replace(".", "")
|
|
||||||
|
|
||||||
subprocess.run(
|
|
||||||
[
|
|
||||||
"pre-commit", "run",
|
|
||||||
"--hook-stage", "manual",
|
|
||||||
"cargo-clippy-cuda-lite",
|
|
||||||
"--all-files",
|
|
||||||
],
|
|
||||||
cwd=WORKDIR,
|
|
||||||
env={
|
|
||||||
**os.environ,
|
|
||||||
"CUDARC_CUDA_VERSION": CUDARC_CUDA_VERSION,
|
|
||||||
"CUDA_COMPUTE_CAP": compute_cap,
|
|
||||||
},
|
|
||||||
check=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@app.local_entrypoint()
|
|
||||||
def main():
|
|
||||||
run_cargo_clippy.remote()
|
|
||||||
Reference in New Issue
Block a user