Skip to content

release: 0.2.0 - #189

Merged
chaoming0625 merged 1 commit into
mainfrom
worktree-release-0.2.0
Aug 7, 2026
Merged

chaoming0625 merged 1 commit into
mainfrom
worktree-release-0.2.0

Conversation

@chaoming0625

@chaoming0625 chaoming0625 commented Aug 7, 2026 •

Copy link
Copy Markdown
Collaborator

Prepares the 0.2.0 release: bumps brainevent/_version.py to 0.2.0 and turns the existing [Unreleased] section of changelog.md into a full [0.2.0] entry covering everything landed since v0.1.2.

Why a minor bump

Breaking changes since v0.1.2:

  • Bare todense() / tocsr() / tocsc() / tocoo() on the JITC families now raise NotImplementedError; callers go through the new mat.mv / mat.mm materialization views, because the mv (32-lane) and mm (AW-T4) light kernels draw different matrices.
  • jits / jitn / jitu require the new matrix_mode keyword.
  • CSR / CSC now validate their structure at construction, and index_dtype=int64 is rejected.
  • Re-registering an FFI target with changed content raises KernelRegistrationError.
  • 154 explicit CUDA entry points and the brainevent.pararnn subpackage are removed.

Plus a behavioural change worth flagging loudly: the JITC numba kernels were rebuilt on the CUDA light-RNG walk, so CPU and GPU finally draw bit-identical matrices — but CPU results recorded against 0.1.x will not reproduce.

Scope covered

PR
#179 jit normal/uniform/scalar CPU/GPU parity, f64 indptr in CSR, Dense, hybrid scheduler config
#188 CUDA source scan: shared-memory OOB, INT32_MAX index wrap, restored CSRMV warp tier
#187 operator-registration hardening (19 audit findings)
#185 unused CUDA operators, orphan headers, dead dispatch paths
#184 / #186 test co-location + the AGENTS.md rule
#183 package-wide dead-code removal and duplicate consolidation
#182 CONTRIBUTING/SECURITY/CoC rewrite, jax 0.11.x validated
#181 CLAUDE.md → AGENTS.md
#177 remove the pararnn module
#175 / #180 mypy 2.3.0, init pytest fix

Verification

  • python -c "import brainevent" reports 0.2.0; __all__ stable at 165 (4 additions since 0.1.2: Dense, HybridConfig, get_hybrid_config, init_csr_config)
  • pytest brainevent/_deprecation_test.py — 55 passed

🤖 Generated with Claude Code

@sourcery-ai

sourcery-ai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Prepares the 0.2.0 release by bumping the library version and adding a detailed 0.2.0 section to the changelog that documents breaking changes, new features (Dense representation, int64 indptr support, tunable CSR hybrid scheduler, cublas backend, JITC materialization views, numba CPU kernels, light-RNG helpers, matrix_mode), structural validations, and removal of the pararnn subpackage.

Flow diagram for CSR hybrid config resolution order

flowchart TD
    Start([init_csr_config / get_hybrid_config invoked])
    Env{BRAINEVENT_CSR_HYBRID_CONFIG set?}
    Cache{csr_hybrid_config.json has device_kind entry?}
    Default[Use defaults baked into .cu sources]
    UseEnv[Use config from BRAINEVENT_CSR_HYBRID_CONFIG]
    UseCache[Load per-GPU HybridConfig from cache]
    Benchmark[Benchmark candidate configs with production CSR kernel]
    Save[Persist winning HybridConfig to csr_hybrid_config.json]
    Output([HybridConfig and task capacity returned])

    Start --> Env
    Env -- Yes --> UseEnv
    Env -- No --> Cache
    Cache -- Yes --> UseCache
    Cache -- No --> Default
    UseEnv --> Output
    UseCache --> Output
    Default --> Benchmark
    Benchmark --> Save
    Save --> Output
Loading

File-Level Changes

Change Details Files
Add detailed 0.2.0 release notes describing breaking changes, new features, and internal updates.
  • Document JITC CPU/GPU parity and resulting non-reproducibility for 0.1.x CPU results.
  • Document new mat.mv / mat.mm materialization views and required matrix_mode argument on JITC APIs.
  • Describe added Dense representation, int64 indptr support for CSR/CSC, tunable CSR hybrid scheduler configuration, and cublas dense backend.
  • Describe structural validation for CSR/CSC, index coercions, CSR task capacity single-sourcing, and removal of the pararnn subpackage.
  • Record updated dependency requirements and internal mypy and test-suite changes.
changelog.md
Bump package version from 0.1.2 to 0.2.0 for the new release.
  • Update __version__ string to 0.2.0.
  • Ensure __version_info__ is derived from the new version string.
brainevent/_version.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Bump __version__ to 0.2.0 and add the 0.2.0 changelog entry.

The minor bump reflects two breaking changes since 0.1.2: bare
todense()/tocsr() on the JITC families now raise in favour of the
explicit mat.mv / mat.mm materialization views, and jits/jitn/jitu
require the new matrix_mode keyword. The numba JITC kernels also
draw the CUDA matrix now, so CPU results from 0.1.x do not reproduce.

Alongside these: the new Dense representation, int64 indptr support
for CSR/CSC, the tunable CSR hybrid scheduler config, and the removal
of the pararnn subpackage.
@chaoming0625
chaoming0625 force-pushed the worktree-release-0.2.0 branch from 22f0dbc to 33a8442 Compare August 7, 2026 16:08
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@chaoming0625
chaoming0625 merged commit 9ef42d8 into main Aug 7, 2026
6 checks passed
@chaoming0625
chaoming0625 deleted the worktree-release-0.2.0 branch August 7, 2026 16:36
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.

1 participant