Skip to content

Create a profile option for autodiff to replace RUSTFLAGS requirement. #150345

Description

@ZuseZ4

I'm not sure if you could convince the cargo team to get dedicated profiles. I was referring to a profile option autodiff = true similar to ones like lto = true or opt-level = 3 that you can specify within the [profile.release] and [profile.debug] sections.

[profile.debug]
autodiff = true

[profile.release]
autodiff = true

Originally posted by @bjorn3 in #147487

Right now, we need two options to make autodiff work.
You need to set lto=fat in your cargo.toml, and add RUSTFLAGS=-Zautodiff=Enable.
It would be good to bundle both in the same place, preferably Cargo.toml.
As a result, each compiler invocation would also become shorter, which makes autodiff much nicer to use.

Creating this issue since the main issue from the thread linked above has ben solved, so I'm closing that one. This would still be good to solve. I'm not experienced with how we parse Cargo.toml, but I assume it's a sufficiently nice beginner issue, if someone is interested.

Activity

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

    F-autodiff`#![feature(autodiff)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions