Skip to content

Commit 1b9100b

Browse files
* Addressing review comments
Signed-off-by: Pradnya Khalate <[email protected]>
1 parent a079c6b commit 1b9100b

File tree

5 files changed

+18
-19
lines changed

5 files changed

+18
-19
lines changed

targettests/execution/cudaq_run.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ int main() {
114114
}
115115
}
116116

117-
/// TODO: this currently fails due to a missing support for tuple copy
117+
// TODO: this currently fails due to a missing support for tuple copy
118118
// constructor in ConvertExpr.cpp
119119
// {
120120
// std::tuple<int, bool> t{13, true};

targettests/execution/cudaq_run_emulation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int main() {
6565
printf("%d: %d %d\n", c++, (bool)i[0], (bool)i[1]);
6666
}
6767
if (c == shots)
68-
printf("success!\n");
68+
printf("success async!\n");
6969
}
7070
}
7171

@@ -74,4 +74,4 @@ int main() {
7474

7575
// FAIL: `run` is not yet supported on this target
7676
// CHECK: success!
77-
// CHECK: success!
77+
// CHECK: success async!

targettests/execution/cudaq_run_unsupported_ret_ty_2.cpp renamed to test/AST-error/run_struct_of_vec.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
/*******************************************************************************
2-
* Copyright (c) 2025 NVIDIA Corporation & Affiliates. *
2+
* Copyright (c) 2022 - 2025 NVIDIA Corporation & Affiliates. *
33
* All rights reserved. *
44
* *
55
* This source code and the accompanying materials are made available under *
66
* the terms of the Apache License 2.0 which accompanies this distribution. *
77
******************************************************************************/
88

9-
// clang-format off
10-
// RUN: nvq++ %cpp_std %s |& FileCheck %s -check-prefix=FAIL
11-
// clang-format on
9+
// RUN: cudaq-quake -verify %s
1210

1311
#include <cudaq.h>
1412
#include <iostream>
1513

14+
__qpu__ std::vector<std::vector<int>> vec_of_vec() {
15+
return {{1, 2}, {3, 4}};
16+
}
17+
1618
struct Foo {
1719
int bar;
1820
std::vector<bool> baz;
1921
};
2022

2123
struct Quark {
22-
Foo operator()() __qpu__ {
24+
Foo operator()() __qpu__ { // expected-error{{kernel result type not supported}}
2325
cudaq::qvector q(3);
2426
return {747, mz(q)};
2527
}
2628
};
2729

2830
int main() {
29-
const auto results = cudaq::run(3, Quark{});
31+
auto const result1 = cudaq::run(10, vec_of_vec);
32+
auto const result2 = cudaq::run(10, Quark{});
3033
return 0;
3134
}
32-
33-
// FAIL: error: kernel result type not supported
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
/*******************************************************************************
2-
* Copyright (c) 2025 NVIDIA Corporation & Affiliates. *
2+
* Copyright (c) 2022 - 2025 NVIDIA Corporation & Affiliates. *
33
* All rights reserved. *
44
* *
55
* This source code and the accompanying materials are made available under *
66
* the terms of the Apache License 2.0 which accompanies this distribution. *
77
******************************************************************************/
88

9-
// clang-format off
10-
// RUN: nvq++ %cpp_std %s |& FileCheck %s -check-prefix=FAIL
11-
// clang-format on
9+
// RUN: cudaq-quake -verify %s
1210

1311
#include <cudaq.h>
1412
#include <iostream>
1513

16-
__qpu__ std::vector<std::vector<int>> vec_of_vec() { return {{1, 2}, {3, 4}}; }
14+
__qpu__ std::vector<std::vector<int>> vec_of_vec() {
15+
return {{1, 2}, {3, 4}}; // expected-error{{unhandled vector element type is not yet supported}} // expected-error{{statement not supported in qpu kernel}}
16+
}
1717

1818
int main() {
19-
const auto results = cudaq::run(100, vec_of_vec);
19+
auto const result1 = cudaq::run(10, vec_of_vec);
2020
return 0;
2121
}
22-
23-
// FAIL: unhandled vector element type is not yet supported

0 commit comments

Comments
 (0)