Skip to content

Commit

Permalink
Coerce to Adaptive_RI when submitting to HW
Browse files Browse the repository at this point in the history
  • Loading branch information
idavis committed Jan 10, 2025
1 parent 3b1bab9 commit d522f8e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vscode/src/qirGeneration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export async function getQirForActiveWindow(
const config = program.programConfig;
const targetProfile = config.profile;
const is_unrestricted = targetProfile === "unrestricted";
const is_unsupported_adaptive = targetProfile === "adaptive_rif";
const is_base = targetProfile === "base";

// We differentiate between submission to Azure and on-demand QIR codegen by checking
Expand All @@ -50,7 +51,11 @@ export async function getQirForActiveWindow(
}

// Check that the current target is base or adaptive_ri profile, and current doc has no errors.
if (is_unrestricted || (!is_base && supports_adaptive === false)) {
if (
is_unrestricted ||
(!is_base && supports_adaptive === false) ||
is_unsupported_adaptive
) {
const result = await vscode.window.showWarningMessage(
// if supports_adaptive is undefined, use the generic codegen message
error_msg,
Expand Down

0 comments on commit d522f8e

Please sign in to comment.