Skip to content

Resolve Issue #226 - Saving the example's config#277

Draft
thisisjube wants to merge 6 commits into
slothy-optimizer:mainfrom
thisisjube:resolve-226-copy-config
Draft

Resolve Issue #226 - Saving the example's config#277
thisisjube wants to merge 6 commits into
slothy-optimizer:mainfrom
thisisjube:resolve-226-copy-config

Conversation

@thisisjube

Copy link
Copy Markdown
Contributor

While executing the example, write the configuration to a file in the same location as the optimized code to track the settings.

Closes #226

@mkannwischer

Copy link
Copy Markdown
Collaborator

Thanks @thisisjube for looking into this!
Some comments:

  • Can this be a draft please until you have completed it, please?
  • Note that SLOTHY can also be used using the slothy-cli in which case you won't have the Python configuration file. I think it would be better to rely on the effective configuration when optimize() is called and dump that rather than reading other files.

@thisisjube thisisjube marked this pull request as draft July 16, 2025 12:34
@thisisjube

Copy link
Copy Markdown
Contributor Author

Thanks @thisisjube for looking into this! Some comments:

  • Can this be a draft please until you have completed it, please?
  • Note that SLOTHY can also be used using the slothy-cli in which case you won't have the Python configuration file. I think it would be better to rely on the effective configuration when optimize() is called and dump that rather than reading other files.
  • Yes sure, this was actually meant to be a draft
  • Fair point. I will discuss details with Amin :)

@dop-amin

dop-amin commented Jul 16, 2025

Copy link
Copy Markdown
Collaborator

Thanks @thisisjube for looking into this! Some comments:

* Note that SLOTHY can also be used using the slothy-cli in which case you won't have the Python configuration file. I think it would be better to rely on the effective configuration when optimize() is called and dump that rather than reading other files.

I think it would be good if we could have one, common interface between the Python examples and the CLI. @mkannwischer What do you think about making the CLI "transfer" the config into an OptimizationRunner instance internally?

@mkannwischer

Copy link
Copy Markdown
Collaborator

Thanks @thisisjube for looking into this! Some comments:

* Note that SLOTHY can also be used using the slothy-cli in which case you won't have the Python configuration file. I think it would be better to rely on the effective configuration when optimize() is called and dump that rather than reading other files.

I think it would be good if we could have one, common interface between the Python examples and the CLI. @mkannwischer What do you think about making the CLI "transfer" the config into an OptimizationRunner instance internally?

What is wrong with just dumping the properties of the Config object (maybe ignoring those that have default values) at each call to optimize/optimize_loop?

@thisisjube

thisisjube commented Jul 23, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @thisisjube for looking into this! Some comments:

* Note that SLOTHY can also be used using the slothy-cli in which case you won't have the Python configuration file. I think it would be better to rely on the effective configuration when optimize() is called and dump that rather than reading other files.

I think it would be good if we could have one, common interface between the Python examples and the CLI. @mkannwischer What do you think about making the CLI "transfer" the config into an OptimizationRunner instance internally?

What is wrong with just dumping the properties of the Config object (maybe ignoring those that have default values) at each call to optimize/optimize_loop?

That would work too, of course. I think the advantage of sticking to a common OptimizationRunner interface would be that this allows to reproduce the more complex examples (including e.g. a fusion and several calls to optimize). In addition, you could easily create an example file from CLI input. @dop-amin please correct me if I missed any of our thoughts about that.

EDIT: Amin told me that you already discussed that offline, sorry.

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.

Dump SLOTHY config alongside/inside optimized asm file

3 participants