diku-dk / futhark

:boom::computer::boom: A data-parallel functional programming language
http://futhark-lang.org
ISC License
2.37k stars 164 forks source link

'futhark autotune' should accept an option for which entry point to tune #1063

Open athas opened 4 years ago

athas commented 4 years ago

This should be -e like the other tools.

Munksgaard commented 4 years ago

It currently tunes all entrypoints, doesn't it?

Also, when given a tuning file that doesn't contain all the tuning parameters for a program, it fails, right? If we were to implement something like this, we'd have to consider what to do about the other tuning parameters. For instance, we could keep any existing tuning parameters not related to the chosen entry point in place, or replace them with default values.

athas commented 4 years ago

Philip Munksgaard notifications@github.com writes:

It currently tunes all entrypoints, doesn't it?

Yes.

Also, when given a tuning file that doesn't contain all the tuning parameters for a program, it fails, right? If we were to implement something like this, we'd have to consider what to do about the other tuning parameters. For instance, we could keep any existing tuning parameters not related to the chosen entry point in place, or replace them with default values.

Keep them as they are in any already present tuning file.

-- \ Troels /\ Henriksen

mortvest commented 3 years ago

Currently, only the entry point named "main" is tuned. The threshold parameters irrelevant to main are set to 1. Hence, it becomes rather tedious to tune a program with multiple entry points.

Munksgaard commented 3 years ago

Currently, only the entry point named "main" is tuned. The threshold parameters irrelevant to main are set to 1. Hence, it becomes rather tedious to tune a program with multiple entry points.

Really? That's a bug. Do you have an example I can try?

mortvest commented 3 years ago

It says so in the official documentation. So it is more of a feature than a bug. You can try this gist.

Munksgaard commented 3 years ago

It says so in the official documentation. So it is more of a feature than a bug. You can try this gist.

I see. The documentation is wrong, you just need to specify the other entrypoints as well. Just replace the top of the file with the following:

-- BFAST-irregular: version handling obscured observations (e.g., clouds)
-- ==
-- entry: main mainDetailed mainMagnitude
-- compiled input @ peru.in.gz
mortvest commented 3 years ago

I see. The documentation is wrong, you just need to specify the other entrypoints as well. Just replace the top of the file with the following:

-- BFAST-irregular: version handling obscured observations (e.g., clouds)
-- ==
-- entry: main mainDetailed mainMagnitude
-- compiled input @ peru.in.gz

This works, thanks! I didn't know this was possible. The documentation should probably be updated