Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding FrontendAttributesAttr and BackendConfigAttr #628

Open
burmako opened this issue Nov 25, 2022 · 0 comments
Open

Consider adding FrontendAttributesAttr and BackendConfigAttr #628

burmako opened this issue Nov 25, 2022 · 0 comments
Labels

Comments

@burmako
Copy link
Contributor

burmako commented Nov 25, 2022

Found during the #565 audit in hlo_instruction.cc.

  if (proto.has_frontend_attributes()) {
    instruction->set_frontend_attributes(proto.frontend_attributes());
  }

  // Generic map of attributes used to pass hints / configuration options from
  // the Python frontend to the XLA backend.
  message FrontendAttributes {
    map<string, string> map = 1;
  }
  instruction->backend_config_ = proto.backend_config();

  // Backend configuration for the instruction. Has backend-specific meaning.
  bytes backend_config = 43;

These are some powerful extensibility mechanisms, but it is not immediately obvious that we want extensibility in StableHLO to look like this. Features that allow attaching arbitrary strings to arbitrary ops conflict with StableHLO's focus on crystal clear semantics and strong compatibility guarantees, so this will need a dedicated discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant