Skip to content

Commit

Permalink
Merge pull request #8 from BQSKit/0.3-dev
Browse files Browse the repository at this point in the history
0.3 Update
  • Loading branch information
edyounis authored Jan 19, 2023
2 parents 4467ef3 + cef5488 commit 707c12a
Show file tree
Hide file tree
Showing 92 changed files with 1,092 additions and 1,578 deletions.
123 changes: 123 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Build Wheels

on: [push]
# release:
# types: [published]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
linux:
name: Manylinux Wheel Build

runs-on: ubuntu-latest
steps:
- name: Setup Repo
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Build Manylinux Wheels
run: >
docker run -e OPENBLAS_ARGS="DYNAMIC_ARCH=1" --rm -v $(pwd):/io
edyounis/bqskitrs-manylinux:1.1 build --release
--features=openblas --compatibility=manylinux2014
- name: Upload Wheel Artifacts
uses: actions/upload-artifact@v3
with:
name: linux-wheels
path: target/wheels

windows:
name: Windows Wheel Build

runs-on: windows-latest
steps:
- name: Setup Repo
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Install Python Dependencies
run: pip install -U setuptools wheel maturin

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install Other Dependencies (Windows)
run: >
cargo install cargo-vcpkg && vcpkg install
ceres:x64-windows-static-md
eigen3:x64-windows-static-md
openblas:x64-windows-static-md
glog:x64-windows-static-md
gflags:x64-windows-static-md
clapack:x64-windows-static-md
&& vcpkg integrate install
- name: Build Windows Wheels
run: maturin build --features="openblas,openblas-src/system" --release

- name: Upload Wheel Artifacts
uses: actions/upload-artifact@v3
with:
name: windows-wheels
path: target/wheels

macos:
name: macOS Wheel Build

runs-on: macOS-11
steps:
- name: Setup Repo
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Install Python Dependencies
run: pip install -U setuptools wheel maturin

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install Apple Intel Target
run: rustup target add x86_64-apple-darwin

- name: Install Apple Silicon Target
run: rustup target add aarch64-apple-darwin

- name: Install Other Dependencies (macOS)
run: brew install gcc ceres-solver eigen lapack

- name: Build macOS x86_64 Wheels
run: MACOSX_DEPLOYMENT_TARGET=11.0 maturin build --features="accelerate" --release --target x86_64-apple-darwin

- name: Build macOS aarch64 Wheels
run: maturin build --features="accelerate" --release --target aarch64-apple-darwin

- name: Upload Wheel Artifacts
uses: actions/upload-artifact@v3
with:
name: macos-wheels
path: target/wheels
89 changes: 0 additions & 89 deletions .github/workflows/main.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/pre-commit.yml

This file was deleted.

108 changes: 32 additions & 76 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,112 +1,68 @@
[package]
name = "bqskitrs"
version = "0.2.3"
authors = ["Ethan Smith <ethanhs@lbl.gov>"]
version = "0.3.0"
authors = [
"Ethan Smith <ethanhs@lbl.gov>",
"Ed Younis <edyounis@lbl.gov>",
]
publish = false
license = "LGPL-2.1 AND BSD-3-Clause"
edition = "2018"
edition = "2021"
build = "build.rs"
publish = false
include = [
"src/**/*",
"LICENSE",
"README.md",
"build.rs",
"Dockerfile",
"pyproject.toml",
"squaremat/**/*",
"ceres/**/*",
]

[features]
python = ["numpy", "pyo3"]
static = [

openblas = [
"openblas-src",
"blas-src/openblas",
"openblas-src/static",
"openblas-src/cblas",
"openblas-src/lapacke",
"ndarray-linalg/openblas-static",
"squaremat/openblas-static",
"ceres/static",
]
default = [
"python",
"mimalloc/local_dynamic_tls",
"openblas-src",
"blas-src/openblas",
"openblas-src/system",
"openblas-src/cblas",
"openblas-src/lapacke",
"ndarray-linalg/openblas-system",
"squaremat/openblas-system",
accelerate = [
"accelerate-src",
]
mkl = [
"intel-mkl-src",
"ndarray-linalg/intel-mkl-static"
]
accelerate = ["accelerate-src", "blas-src/accelerate", "squaremat/accelerate"]
mkl = ["intel-mkl-src", "blas-src/intel-mkl", "squaremat/mkl", "ndarray-linalg/intel-mkl-system"]

[dependencies]
num-complex = { version = "0.4.0", features = ["serde"] }
ndarray = { version = "0.15.4", features = ["blas"] }
ndarray-linalg = "0.14.1"
blas-src = { version = "0.8.0", default-features = false }
openblas-src = { version = "0.10.4", default-features = false, optional = true }
ndarray = { version = "0.15.6", features = ["blas"] }
ndarray-linalg = "0.16.0"

openblas-src = { version = "0.10.5", optional = true }
accelerate-src = { version = "0.3.2", optional = true }
intel-mkl-src = { version = "0.6.0", optional = true, features = ["mkl-static-lp64-seq"] }
intel-mkl-src = { version = "0.8.1", optional = true }

ndarray_einsum_beta = "0.7.0"
nlopt = "0.6.0"

enum_dispatch = "0.3.8"
numpy = { version = "0.16.2", optional = true }
libc = "0.2.122"
num-traits = "0.2.14"
better-panic = "0.3.0"
squaremat = { path="./squaremat" }
md5 = "0.7.0"
rand = "0.8.5"
nlopt = "0.5.4"
ceres = { path="./ceres" }
itertools = "0.10.3"
pyo3 = { version = "0.16.3", optional = true, features = ["extension-module", "abi3-py37"] }
lax = "0.2.0"
itertools = "0.10.5"
derive_more = "0.99.17"
mimalloc = { version = "0.1.28", optional = true, default-features = false, features = ["local_dynamic_tls"] }
ndarray_einsum_beta = "0.7.0"
mimalloc = { version = "0.1.30", optional = true, default-features = false, features = ["local_dynamic_tls"] }

ceres = { path="./ceres", features = ["static"] }

[patch.crates-io]
# remove once https://github.com/blas-lapack-rs/blas-src/pull/9 is merged
blas-src = { git="https://github.com/ethanhs/blas-src", branch="patch-1" }
# Waiting on openblas-src to make a new 0.11 release...
openblas-src = { git="https://github.com/blas-lapack-rs/openblas-src" }
numpy = "0.17.2"
pyo3 = { version = "0.17.2", features = ["extension-module", "abi3-py38"] }

[target.'cfg(target_os = "windows")'.build-dependencies]
vcpkg = "0.2.15"

[lib]
name = "bqskitrs"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]

[dev-dependencies]
criterion = "0.3.5"
ndarray-npy = { version = "0.8.1", default-features = false, features = ["num-complex-0_4"] }
num-complex = { version = "0.4.0", features = ["serde"] }

[[bench]]
name = "bench_opt"
harness = false
crate-type = ["cdylib"]

[profile.release]
lto = "fat"
codegen-units = 1
opt-level = 3
debug = true

[profile.bench]
lto = "fat"
codegen-units = 1
opt-level = 3
debug = true


[package.metadata.vcpkg]
git = "https://github.com/microsoft/vcpkg"
rev = "2021.05.12"
rev = "2022.09.27"

[package.metadata.vcpkg.target]
x86_64-pc-windows-msvc = { triplet="x64-windows-static-md", install=[
Expand Down
Loading

0 comments on commit 707c12a

Please sign in to comment.