Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cudaq/lib/Target/Yaml/TargetConfigYaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,16 @@ std::string cudaq::config::processRuntimeArgs(
const auto iter = std::find_if(
config.TargetArguments.begin(), config.TargetArguments.end(),
[&](const cudaq::config::TargetArgument &argConfig) {
// Here, we handle both cases: the config key as is (python kwargs)
// or prefixed with the target name or "target".
// Handle the config and platform keys (Python kwargs), or the config
// key prefixed with the target name or "target" (nvq++ arguments).
const std::string nvqppArgKey =
"--" + config.Name + "-" + argConfig.KeyName;
const std::string targetPrefixArgKey =
"--target-" + argConfig.KeyName;
return llvm::is_contained<llvm::StringRef>(
{nvqppArgKey, targetPrefixArgKey, argConfig.KeyName}, argKey);
{nvqppArgKey, targetPrefixArgKey, argConfig.KeyName,
argConfig.PlatformArgKey},
argKey);
});
if (iter != config.TargetArguments.end()) {
if (iter->Type != cudaq::config::ArgumentType::FeatureFlag) {
Expand Down