diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 594ef0f0..275ce744 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,3 +42,42 @@ jobs: - run: python -m pip install -r benchmarks/requirements.txt - run: python benchmarks/bench.py validate benchmarks/smoke.jsonl - run: python -m unittest discover -s tests/benchmarks -p 'test_*.py' -v + + cuda-contract: + # The CUDA backend contract and its checker. No CUDA toolkit and no GPU: both + # read files as text. + # + # The checker and its tests arrive in #25, so on a tree without them those + # two steps are a skip, not a failure: this job has to be green on the branch + # that carries it before #25 lands, and it has to start running by itself + # once #25 does, in either merge order. Failing instead would redden whichever + # PR arrived second. The backend tests come from the repository tests/ tree, + # which is already in main, so they run either way. + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Check for the checker + id: present + run: | + if [ -f src/backends/cuda/check_contract.py ] && [ -d src/backends/cuda/tests ]; then + echo "ready=true" >> "$GITHUB_OUTPUT" + else + echo "ready=false" >> "$GITHUB_OUTPUT" + echo "::notice::src/backends/cuda/check_contract.py and src/backends/cuda/tests are not in this tree; they arrive in #25. Skipping." + fi + - name: Contract checker tests + if: steps.present.outputs.ready == 'true' + run: python -m unittest discover -s src/backends/cuda/tests -t . -v + - name: Backend tests + # Tests live under the repository-level tests/ tree, not beside the + # kernels they cover (CONTRIBUTING.md, "Adding a model"). Same + # invocation as the benchmarks job: tests/cuda is not a package, so + # discovery has to use the start directory as its own top level. + run: python -m unittest discover -s tests/cuda -p 'test_*.py' -v + - name: Contract check + if: steps.present.outputs.ready == 'true' + run: python src/backends/cuda/check_contract.py --repo-root . diff --git a/src/backends/cuda/qwen3_5/qwen3_5.backend.json b/src/backends/cuda/qwen3_5/qwen3_5.backend.json new file mode 100644 index 00000000..e4dd7cae --- /dev/null +++ b/src/backends/cuda/qwen3_5/qwen3_5.backend.json @@ -0,0 +1,25 @@ +{ + "name": "qwen3_5", + "abi_version": 4, + "status": "experimental", + "sources": [ + "ops.h", + "common.cuh", + "mma.cuh", + "norm.cu", + "elementwise.cu", + "attention.cu", + "gdn_prefill.cu", + "gemm.cu", + "runtime.cu" + ], + "build": { + "script": "build.sh", + "output": "libqwen3_5_cuda.so", + "default_arch": 89, + "architectures": [ + 89 + ], + "min_capability": 80 + } +}