Skip to content

feat(deps): gate blake3/p64/fractal behind hpc-extras feature (sprint A1)#116

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/burn-A1-dep-gating
Apr 30, 2026
Merged

feat(deps): gate blake3/p64/fractal behind hpc-extras feature (sprint A1)#116
AdaWorldAPI merged 1 commit into
masterfrom
claude/burn-A1-dep-gating

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

@AdaWorldAPI AdaWorldAPI commented Apr 30, 2026

Summary

Sprint A1 of burn-ndarray parity sprint v1. Closes item (15) of the parity list shared by the burn-side review session.

Makes blake3, p64, fractal optional dependencies pulled in only when the hpc-extras feature is enabled. hpc-extras is in the default features so existing consumers see no change. Downstream crates (notably burn-ndarray) that only need the core array layer can opt out:

[dependencies]
ndarray = { version = "0.17", default-features = false, features = ["std"] }

What changed

Cargo.toml

# blake3, p64, fractal: now optional
blake3  = { version = "1", optional = true }
p64     = { path = "crates/p64", optional = true }
fractal = { path = "crates/fractal", default-features = false, optional = true }

# default features now include hpc-extras (preserves prior behavior)
default = ["std", "hpc-extras"]

# std no longer drags in fractal/std (moved into hpc-extras)
std = ["num-traits/std", "matrixmultiply/std"]

# new feature
hpc-extras = ["std", "dep:blake3", "dep:p64", "dep:fractal", "fractal/std"]

src/lib.rs: cfg(feature = "std")cfg(feature = "hpc-extras") on the pub mod hpc; declaration so the hpc tree only compiles when its deps are present.

Verification

  • cargo build (default = std + hpc-extras) — clean, only pre-existing warnings
  • cargo build --no-default-features — clean; ndarray crate compiles without blake3/p64/fractal
  • cargo tree -p ndarray --no-default-features | grep -E "blake3|p64|fractal"empty (gating proven)
  • cargo tree -p ndarray (default) — shows blake3, p64, fractal as expected
  • cargo test --lib --no-run — compiles cleanly
  • cargo test --lib — 1667 tests pass, then SIGILL in simd_avx512 tests on this CI host (pre-existing — .cargo/config.toml forces target-cpu=x86-64-v4 / AVX-512; sandbox lacks it). 0 FAILED. This crash exists on master too.

Plan reference

  • .claude/plans/burn-ndarray-parity-sprint-v1.md (in lance-graph repo) — Item (15)
  • Sister PRs to follow: A2-A12 (8 more agents in flight in worktree-isolated mode)

Companion sprint

This is the first of 9 PRs targeting the burn parity list. Items 1-14 + 16 still in flight or queued. See plan doc for full breakdown.

https://claude.ai/code/session_01NYGrxVopyszZYgLBxe4hgj

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5207d7881

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib.rs
/// Gated behind the `hpc-extras` feature (enabled by default) because the
/// module pulls in `blake3`, `p64`, and `fractal`. Disable default features to
/// drop those dependencies (e.g. burn-ndarray's polyfill-only build).
#[cfg(feature = "hpc-extras")]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep hpc available for std-only builds

Gating pub mod hpc; behind feature = "hpc-extras" breaks the advertised --no-default-features --features std configuration because simd is still compiled under std and unconditionally re-exports symbols from crate::hpc (see src/simd.rs around the pub use crate::hpc::... block). In that feature set, hpc is absent and these imports become unresolved, so downstream std-only consumers cannot compile.

Useful? React with 👍 / 👎.

Make blake3, p64, and fractal optional dependencies pulled in only when
the hpc-extras feature is enabled. hpc-extras is enabled by default so
existing consumers see no change. Downstream crates (notably burn-ndarray)
that only need the core array layer can opt out via:

    [dependencies]
    ndarray = { version = "0.17", default-features = false, features = ["std"] }

This keeps cargo build (default) and cargo build --no-default-features
both clean while removing ~200 transitive deps from minimal builds.

Sprint A1 of burn-ndarray parity sprint.

https://claude.ai/code/session_01NYGrxVopyszZYgLBxe4hgj
@AdaWorldAPI AdaWorldAPI force-pushed the claude/burn-A1-dep-gating branch from e5207d7 to 4f62643 Compare April 30, 2026 09:49
@AdaWorldAPI AdaWorldAPI merged commit 1bc6cd0 into master Apr 30, 2026
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants