Skip to content

Conversation

@steven-johnson
Copy link
Contributor

Currently we just emit a warning... which may be hidden by CMake/Bazel. This really needs to be an error, though, because an unscheduled gradient-descent module can be immense and take ~forever to compile. (Addresses part of #8393 but not a complete fix.)

Currently we just emit a warning... which may be hidden by CMake/Bazel. This really needs to be an error, though, because an unscheduled gradient-descent module can be immense and take ~forever to compile.
@steven-johnson steven-johnson changed the title Require an autoschedule for build_gradient_module()/GRADIENT_DESCENT Require an autoscheduler for build_gradient_module()/GRADIENT_DESCENT Dec 19, 2024
@abadams
Copy link
Member

abadams commented Dec 19, 2024

If you're asking for the derivative of an element wise thing (e.g. a generator that just does relu), then requiring an autoscheduler to run is a bit ridiculous. Is there any way to insert a manual schedule somewhere when using this build mode?

Also we should really make cmake not swallow warnings. That defeats the entire purpose of warnings.

@steven-johnson
Copy link
Contributor Author

If you're asking for the derivative of an element wise thing (e.g. a generator that just does relu), then requiring an autoscheduler to run is a bit ridiculous. Is there any way to insert a manual schedule somewhere when using this build mode?

Nope.

Also we should really make cmake not swallow warnings.

I'll defer to Alex on that.

@steven-johnson
Copy link
Contributor Author

Part of the footgun here is that you can ask for this on any arbitrary Generator and we'll try our best; while looking at #8393 I just modified the Python build rules to do gradients for all the Python generators (per the discussion) and found that without an autoscheduler, my system allocated ~250GB of virtual address space.

Comment on lines +477 to +479
passing `-d 1` at the generator command line. Note that you *must* also specify
an autoscheduler (via the `AUTOSCHEDULER` argument) when specifying this
argument.
Copy link
Member

Choose a reason for hiding this comment

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

We should check this in HalideGeneratorHelpers.cmake

Copy link
Contributor Author

Choose a reason for hiding this comment

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

First we should get buy-in from everyone as to whether this change is a good one.

@abadams abadams added the dev_meeting Topic to be discussed at the next dev meeting label Dec 19, 2024
@alexreinking alexreinking self-requested a review December 19, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev_meeting Topic to be discussed at the next dev meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants