From d522f8e5052b2da23d3510aece43ab81ee8f7766 Mon Sep 17 00:00:00 2001 From: Ian Davis Date: Thu, 9 Jan 2025 16:01:36 -0800 Subject: [PATCH] Coerce to Adaptive_RI when submitting to HW --- vscode/src/qirGeneration.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vscode/src/qirGeneration.ts b/vscode/src/qirGeneration.ts index 23c4619203..3d293e836a 100644 --- a/vscode/src/qirGeneration.ts +++ b/vscode/src/qirGeneration.ts @@ -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 @@ -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,