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

Update nvq++ script to disallow nvqc submission from non-x86 #1340

Merged
merged 3 commits into from
Mar 6, 2024
Merged
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
9 changes: 9 additions & 0 deletions tools/nvqpp/nvq++.in
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,15 @@ COMPILER_FLAGS="${CPPSTD} -Wno-c++20-extensions ${COMPILER_FLAGS}"
# the resultant binary to target that specified backend.
OBJS_TO_MERGE=""
if [ -n "${TARGET_CONFIG}" ]; then
# Disable compilation on non-x86 machines when targetting NVQC.
# See https://github.com/NVIDIA/cuda-quantum/issues/1345 for current status.
if [ "${TARGET_CONFIG}" == "nvqc" ]; then
LLVM_CONFIG="${LLVMBIN}llvm-config"
HOST_TARGET=$(${LLVM_CONFIG} --host-target)
if [ ${HOST_TARGET:0:6} != "x86_64" ]; then
error_exit "Cannot use nvqc target from non-x86_64 client at this time"
fi
fi
bmhowe23 marked this conversation as resolved.
Show resolved Hide resolved
TARGET_CONFIG_FILE="${install_dir}/targets/${TARGET_CONFIG}.config"
if [ -f "${TARGET_CONFIG_FILE}" ]; then
GEN_TARGET_BACKEND=false
Expand Down
Loading