Skip to content

[Bug] _reconstruct_from_deprecated_options creates incorrect executor #12409

@mehrdadh

Description

@mehrdadh

example:

target = tvm.target.Target("llvm -link-params=1")
executor = Executor("aot")

This will result in this executor: graph{"link-params": 1}

I looked at the logic of _reconstruct_from_deprecated_options, the issue is that if the executor config is not part of the target it will assume graph by default. This is obviously incorrect.

Possible solutions

  • Pass executor to _reconstruct_from_deprecated_options and derive the final executor considering the original executor that was passed to build.
  • Remove this function and instead show runtime error when wrong config is passed.

I suggest the second approach because the first approach is fairly complicated considering the number of configs and most likely it will result in wrong combination. This could be really annoying considering the fact that you could end up building with incorrect executor without noticing.

thoughts?

cc @areusch @Mousius

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions