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

Support Specified Base Profile #50

Open
kalzoo opened this issue Sep 12, 2022 · 1 comment
Open

Support Specified Base Profile #50

kalzoo opened this issue Sep 12, 2022 · 1 comment

Comments

@kalzoo
Copy link
Contributor

kalzoo commented Sep 12, 2022

The QIR Base Profile specification is nearing completion, and requires support from this SDK. While this is close to the Unitary pattern, it has some notable differences:

  • Version strings
  • Entrypoint specification
  • Function block structure
  • Use of attributes

These must be supported, likely by a new pattern.

@swernli
Copy link

swernli commented Apr 4, 2024

As we work on supporting Base Profile on the client side, we ran into an early issue related to this:

// validate that the function returns void, as a requirement of the Unitary format
let void_func_ty = context.base_context.void_type().fn_type(&[], false);
let func_ty = function.get_type();
if func_ty.ne(&void_func_ty) {
return Err(eyre::eyre!(
"expected function to return void; found {}",
func_ty.print_to_string()
));
}

This code treats it as an error when the entry point is non-void, but with profile compliant QIR the entry point should be i64 and have a hard-coded ret i64 0.

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

No branches or pull requests

2 participants