Skip to content

Commit

Permalink
Merge branch 'main' into optimize_sample
Browse files Browse the repository at this point in the history
  • Loading branch information
sacpis authored Aug 9, 2024
2 parents 607a9d7 + 06f6df7 commit f22b5c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
5 changes: 3 additions & 2 deletions targettests/execution/mapping_test-1-cpp17.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
******************************************************************************/

// REQUIRES: c++17
// RUN: nvq++ %cpp_std %s -o %t --target oqc --emulate && CUDAQ_DUMP_JIT_IR=1 %t 2> %t.code | FileCheck %s && FileCheck --check-prefix=QUAKE %s < %t.code && rm %t.code
// RUN: nvq++ %cpp_std %s -o %t --target iqm --iqm-machine Adonis --mapping-file "%p/../Adonis Variant.txt" --emulate && %t
// RUN: nvq++ %cpp_std %s -o %t --target oqc --emulate && CUDAQ_DUMP_JIT_IR=1 %t 2> %t.txt | FileCheck %s && FileCheck --check-prefix=QUAKE %s < %t.txt
// RUN: mkdir -p %t.dir && cp "%iqm_test_src_dir/Adonis.txt" "%t.dir/Adonis Variant.txt" && nvq++ %cpp_std %s -o %t --target iqm --iqm-machine Adonis --mapping-file "%t.dir/Adonis Variant.txt" --emulate && %t
// RUN: nvq++ %cpp_std --enable-mlir %s -o %t
// RUN: rm -rf %t.txt %t.dir

#include <cudaq.h>
#include <iostream>
Expand Down
6 changes: 4 additions & 2 deletions targettests/execution/mapping_test-1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
******************************************************************************/

// REQUIRES: c++20
// RUN: nvq++ %cpp_std %s -o %t --target oqc --emulate && CUDAQ_DUMP_JIT_IR=1 %t 2> %t.code | FileCheck %s && FileCheck --check-prefix=QUAKE %s < %t.code && rm %t.code
// RUN: nvq++ %cpp_std %s -o %t --target iqm --iqm-machine Adonis --mapping-file "%p/../Adonis Variant.txt" --emulate && %t
// clang-format off
// RUN: nvq++ %cpp_std %s -o %t --target oqc --emulate && CUDAQ_DUMP_JIT_IR=1 %t 2> %t.txt | FileCheck %s && FileCheck --check-prefix=QUAKE %s < %t.txt
// RUN: mkdir -p %t.dir && cp "%iqm_test_src_dir/Adonis.txt" "%t.dir/Adonis Variant.txt" && nvq++ %cpp_std %s -o %t --target iqm --iqm-machine Adonis --mapping-file "%t.dir/Adonis Variant.txt" --emulate && %t
// RUN: nvq++ %cpp_std --enable-mlir %s -o %t
// RUN: rm -rf %t.txt %t.dir

#include <cudaq.h>
#include <iostream>
Expand Down
7 changes: 1 addition & 6 deletions targettests/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
config.substitutions.append(('%cudaq_plugin_ext', config.cudaq_plugin_ext))
config.substitutions.append(('%cudaq_target_dir', config.cudaq_target_dir))
config.substitutions.append(('%cudaq_src_dir', config.cudaq_src_dir))
config.substitutions.append(('%iqm_test_src_dir', config.cudaq_src_dir + "/runtime/cudaq/platform/default/rest/helpers/iqm"))

llvm_config.use_default_substitutions()

Expand Down Expand Up @@ -71,9 +72,3 @@
# Tweak the PATH to include the tools directory.
llvm_config.with_environment('PATH', config.cudaq_tools_dir, append_path=True)
llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True)

# Create some of the test inputs.
target_config_origin = os.path.join(config.cudaq_src_dir, "runtime/cudaq/platform/default/rest/helpers/iqm")
target_config_dest = os.path.join(config.cudaq_src_dir, "targettests")
shutil.copy(os.path.join(target_config_origin, "Adonis.txt"), os.path.join(target_config_dest, "Adonis Variant.txt"))
shutil.copy(os.path.join(target_config_origin, "Apollo.txt"), os.path.join(target_config_dest, "Apollo Variant.txt"))

0 comments on commit f22b5c5

Please sign in to comment.