Skip to content

Commit

Permalink
V0.3.2 dev #1 (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
FL03 authored Dec 3, 2024
2 parents d5d6d99 + 3f47aaf commit ee0b91f
Show file tree
Hide file tree
Showing 152 changed files with 938 additions and 9,150 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ updates:
schedule:
interval: daily
- package-ecosystem: cargo
directory: /tensor
directory: /math
schedule:
interval: daily
interval: daily
2 changes: 1 addition & 1 deletion .github/workflows/crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
features: [ derive, graphs, macros, tensor ]
features: [ derive, graphs, macros, math ]
env:
CARGO_PACKAGE_NAME: ${{ github.event.repository.name }}-${{ matrix.features }}
steps:
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ default-members = [
]

exclude = [
"exp/container",
]

members = [
"acme",
"core",
"derive",
"graphs",
"macros",
"tensor",
"macros",
"math",

]
resolver = "2"

[workspace.dependencies]
paste = "1"
scsys = "0.2.1"
strum = { features = ["derive"], version = "0.26" }
smart-default = "0.7"

Expand Down
38 changes: 20 additions & 18 deletions acme/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ version.workspace = true
[features]
default = [
"core",
"tensor",
"math",
"graph",
]

full = [
"core",
"default",
"derive",
"graph",
"serde",
"tensor",
"trace",
]

Expand All @@ -37,34 +36,39 @@ graph = [
"dep:acme-graphs"
]

io = [
"acme-tensor/io"
]

macros = [
"dep:acme-macros"
]

math = [
"dep:acme-math"
]

serde = [
"acme-core/serde",
"acme-graphs/serde",
"acme-tensor/serde"
]

std = [
"acme-core/std",
"acme-tensor/std"
"acme-graphs/std",
]

tensor = [
"dep:acme-tensor"
]

trace = [
"acme-core/trace",
"acme-graphs/trace",
]

wasi = [
"acme-core/wasi",
"acme-graphs/wasi",
]

wasm = [
"acme-core/wasm",
"acme-graphs/wasm",
]



Expand All @@ -74,9 +78,6 @@ crate-type = ["cdylib", "rlib"]
doctest = true
test = true

[[bench]]
name = "tensor"
required-features = ["tensor"]

[[example]]
doc = true
Expand Down Expand Up @@ -104,12 +105,13 @@ acme-core = { path = "../core", version = "0.3.2" }
acme-derive = { optional = true, path = "../derive", version = "0.3.2" }
acme-graphs = { optional = true, path = "../graphs", version = "0.3.2" }
acme-macros = { optional = true, path = "../macros", version = "0.3.2" }
acme-tensor = { optional = true, path = "../tensor", version = "0.3.2" }
acme-math = { optional = true, path = "../math", version = "0.3.2" }

# acme-core = { path = "../core", version = "0.3.2-nightly" }
# acme-derive = { optional = true, path = "../derive", version = "0.3.2-nightly" }
# acme-graphs = { optional = true, path = "../graphs", version = "0.3.2-nightly" }
# acme-macros = { optional = true, path = "../macros", version = "0.3.2-nightly" }
# acme-tensor = { optional = true, path = "../tensor", version = "0.3.2-nightly" }
# acme-math = { optional = true, path = "../math", version = "0.3.2-nightly" }

[dev-dependencies]
approx = "0.5"
Expand Down
33 changes: 0 additions & 33 deletions acme/benches/tensor.rs

This file was deleted.

3 changes: 1 addition & 2 deletions acme/examples/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use num::Float;

fn main() -> acme::prelude::BoxResult {
let x = 5f64;
let lex = sigmoid_lex();
println!("{}", sigmoid(x));
println!("{}", sigmoid_lex());
let dx = sigmoid_prime(x);
Expand All @@ -19,7 +18,7 @@ fn main() -> acme::prelude::BoxResult {
Ok(())
}

#[operator(lexical = sigmoid_lex)]
#[operator(lex = sigmoid_lex)]
pub fn sigmoid<T>(x: T) -> T
where
T: Float,
Expand Down
103 changes: 0 additions & 103 deletions acme/examples/tensor.rs

This file was deleted.

13 changes: 6 additions & 7 deletions acme/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,26 @@
#[doc(inline)]
pub use acme_core::*;
#[cfg(feature = "derive")]
#[doc(inline)]
pub use acme_derive::*;
#[cfg(feature = "graph")]
#[doc(inline)]
pub use acme_graphs as graph;
#[cfg(feature = "macros")]
#[doc(inline)]
pub use acme_macros::*;
#[cfg(feature = "tensor")]
#[cfg(feature = "math")]
#[doc(inline)]
pub use acme_tensor as tensor;
pub use acme_math as math;

pub mod prelude {
#[cfg(feature = "tensor")]
#[doc(inline)]
pub use crate::tensor::prelude::*;
#[doc(inline)]
pub use acme_core::prelude::*;
#[cfg(feature = "derive")]
pub use acme_derive::*;
#[cfg(feature = "graph")]
#[doc(inline)]
pub use acme_graphs::prelude::*;
#[cfg(feature = "macros")]
pub use acme_macros::*;
#[cfg(feature = "math")]
pub use acme_math::prelude::*;
}
18 changes: 18 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ default = [
"std",
]

full = [
"default",
"approx",
"serde",
"trace"
]

approx = [
"dep:approx"
]

serde = [
"dep:serde",
"serde-ext",
Expand All @@ -29,6 +40,10 @@ trace = [
"dep:tracing",
]

wasi = []

wasm = []

[lib]
bench = false
crate-type = ["cdylib", "rlib"]
Expand All @@ -38,14 +53,17 @@ test = true
[build-dependencies]

[dependencies]
approx = { optional = true, version = "0.5" }
num = "0.4"
paste.workspace = true
serde = { optional = true, features = ["derive"], version = "1" }
serde_json = { optional = true, version = "1" }
smart-default.workspace = true
strum.workspace = true
tracing = { optional = true, version = "0.1" }

[dev-dependencies]
approx = "0.5"
lazy_static = "1"

[package.metadata.docs.rs]
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions core/src/exp/structural.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Appellation: structural <mod>
Contrib: FL03 <jo3mccain@icloud.com>
*/
use crate::ops::{Op, Params};

pub struct Adder<A, B = A> {
args: BinaryArgs<A, B>
}

impl<A, B> Adder<A, B> {
pub fn new(lhs: A, rhs: B) -> Self {
Self {
args: BinaryArgs::new(lhs, rhs)
}
}
}

pub trait StructuralFn {
type Output;
}
Loading

0 comments on commit ee0b91f

Please sign in to comment.