Skip to content

Tracking Issue for batching #135283

Open
Open
@ZuseZ4

Description

@ZuseZ4
Member

This is a tracking issue for the batching feature of llvm/enzyme.
The feature gate for the issue is #![feature(batching)].

This is the second out of three features that were approved as experiments in a project goal. It allows merging N function calls (e.g. from looping over a call) into a single call, with N being a compile-time constant. This allows better vectorization and other optimizations.

We reuse almost all of the infrastructure from the autodiff macro, with a slightly different syntax both in the user facing macro, as well as the llvm-ir we generate. We intend to later extend the autodiff macro to optionally include the batching feature, however some users might want to use batching without automatic differentiation, which is the motivation for this independent batch macro. It also seems wise to experiment with both independently before trying to merge them.

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.

Steps

  • Get compiler MCP approved.
  • Get lang experiment approved.
    • We approved this in the lang triage meeting on 2024-05-01.
  • Land the experimental implementation in nightly.
  • Accept an RFC.
  • Add documentation to the dev guide.
  • Add documentation to the reference.
  • Add formatting for new syntax to the style guide.

Unresolved Questions

XXX --- list all the "unresolved questions" found in the RFC to ensure they are
not forgotten

Implementation history

Activity

added
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
on Jan 9, 2025
added 3 commits that reference this issue on Apr 4, 2025

Rollup merge of rust-lang#137880 - EnzymeAD:autodiff-batching, r=oli-obk

c2e6e72

Rollup merge of rust-lang#137880 - EnzymeAD:autodiff-batching, r=oli-obk

0745003

Rollup merge of rust-lang#137880 - EnzymeAD:autodiff-batching, r=oli-obk

c6bf3a0
added a commit that references this issue on Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-batching`#![feature(batching)]`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ZuseZ4@jieyouxu

        Issue actions

          Tracking Issue for batching · Issue #135283 · rust-lang/rust