diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9a7b005 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,71 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + build-pure: + name: Build pure-Python wheel + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Build wheel (no CUDA) + run: | + pip wheel . --no-deps -w dist/ + + - uses: actions/upload-artifact@v4 + with: + name: pure-wheel + path: dist/*.whl + + build-cuda-linux: + name: Build CUDA wheel (Linux) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install torch (CUDA 12.8) + run: | + pip install torch --index-url https://download.pytorch.org/whl/cu128 + + - name: Setup CUDA + uses: Jimver/cuda-toolkit@v0.2.35 + with: + cuda: "12.8.0" + + - name: Build wheel (with CUDA kernels) + run: | + CSRC_KERNELS=true pip wheel . --no-deps --no-build-isolation -w dist/ + + - uses: actions/upload-artifact@v4 + with: + name: cuda-wheel-linux + path: dist/*.whl + + release: + name: Attach wheels to release + needs: [build-pure, build-cuda-linux] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/download-artifact@v4 + with: + pattern: "*-wheel" + merge-multiple: true + + - name: Create release & upload assets + uses: softprops/action-gh-release@v2 + with: + files: ./*.whl + tag_name: ${{ github.ref_name }} + generate_release_notes: true diff --git a/astrai/__init__.py b/astrai/__init__.py index 49432c7..49be9cd 100644 --- a/astrai/__init__.py +++ b/astrai/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.3.8" +__version__ = "1.3.9" __author__ = "ViperEkura" from astrai.config import ( diff --git a/csrc/build.py b/csrc/build.py index 8e18529..540f978 100644 --- a/csrc/build.py +++ b/csrc/build.py @@ -20,7 +20,7 @@ def _arch_flags() -> list[str]: _kernels_dir = Path("csrc/kernels") REGISTRY: dict[str, dict] = {} -CXX_FLAGS = ["-O3", "-march=native", "-funroll-loops"] +CXX_FLAGS = ["-O3", "-funroll-loops"] NVCC_FLAGS = [ "-O3", "--expt-relaxed-constexpr",