From d0c6f96bf6b7e600bc353d9f7a6b3b88a696190e Mon Sep 17 00:00:00 2001 From: Udit Kumar Agarwal Date: Thu, 16 Jan 2025 11:21:33 -0800 Subject: [PATCH] [SYCL][E2E] Fix `DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp` (#16664) fixes https://github.com/intel/llvm/issues/16662 Add missing `.wait()` after `queue.submit()`. --- ..._architecture_comparison_on_device_aot.cpp | 332 +++++++++--------- 1 file changed, 166 insertions(+), 166 deletions(-) diff --git a/sycl/test-e2e/DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp b/sycl/test-e2e/DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp index 71da42fa8596..652ece6d8702 100644 --- a/sycl/test-e2e/DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp +++ b/sycl/test-e2e/DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp @@ -25,172 +25,172 @@ int main() { q.submit([&](handler &cgh) { cgh.fill(result, 0, N); }).wait(); q.submit([&](handler &cgh) { - cgh.single_task([=]() { - // test if_architecture_is with category - if_architecture_is([&]() { - result[0] = 1; - }).otherwise([&]() {}); - - // negative test if_architecture_is with category - if_architecture_is([&]() {}).otherwise( - [&]() { result[1] = 1; }); - - // test else_if_architecture_is with category - 1 - if_architecture_is([&]() {}) - .else_if_architecture_is( - [&]() { result[2] = 1; }) - .otherwise([&]() {}); - - // test else_if_architecture_is with category - 2 - if_architecture_is([&]() {}) - .else_if_architecture_is([&]() {}) - .else_if_architecture_is( - [&]() { result[3] = 1; }) - .otherwise([&]() {}); - - // test if_architecture_is_lt - if_architecture_is_lt([&]() { - result[4] = 1; - }).otherwise([&]() {}); - - // negative test if_architecture_is_lt - 1 - if_architecture_is_lt([&]() {}).otherwise( - [&]() { result[5] = 1; }); - - // negative test if_architecture_is_lt - 2 - if_architecture_is_lt([&]() { - }).otherwise([&]() { result[6] = 1; }); - - // test else_if_architecture_is_lt - 1 - if_architecture_is_lt([&]() {}) - .else_if_architecture_is_lt( - [&]() { result[7] = 1; }) - .otherwise([&]() {}); - - // test else_if_architecture_is_lt - 2 - if_architecture_is_lt([&]() { - }).else_if_architecture_is_lt([&]() {}) - .else_if_architecture_is_lt( - [&]() { result[8] = 1; }) - .otherwise([&]() {}); - - // test if_architecture_is_le - if_architecture_is_le([&]() { - result[9] = 1; - }).otherwise([&]() {}); - - // negative test if_architecture_is_le - 1 - if_architecture_is_le([&]() {}).otherwise( - [&]() { result[10] = 1; }); - - // negative test if_architecture_is_le - 2 - if_architecture_is_le([&]() { - }).otherwise([&]() { result[11] = 1; }); - - // test else_if_architecture_is_le - 1 - if_architecture_is_le([&]() {}) - .else_if_architecture_is_le( - [&]() { result[12] = 1; }) - .otherwise([&]() {}); - - // test else_if_architecture_is_le - 2 - if_architecture_is_le([&]() { - }).else_if_architecture_is_le([&]() {}) - .else_if_architecture_is_le( - [&]() { result[13] = 1; }) - .otherwise([&]() {}); - - // test if_architecture_is_gt - if_architecture_is_gt([&]() { - result[14] = 1; - }).otherwise([&]() {}); - - // negative test if_architecture_is_gt - 1 - if_architecture_is_gt([&]() { - }).otherwise([&]() { result[15] = 1; }); - - // negative test if_architecture_is_gt - 2 - if_architecture_is_gt([&]() { - }).otherwise([&]() { result[16] = 1; }); - - // test else_if_architecture_is_gt - 1 - if_architecture_is_gt([&]() {}) - .else_if_architecture_is_gt( - [&]() { result[17] = 1; }) - .otherwise([&]() {}); - - // test else_if_architecture_is_gt - 2 - if_architecture_is_gt([&]() { - }).else_if_architecture_is_gt([&]() {}) - .else_if_architecture_is_gt( - [&]() { result[18] = 1; }) - .otherwise([&]() {}); - - // test if_architecture_is_ge - if_architecture_is_ge([&]() { - result[19] = 1; - }).otherwise([&]() {}); - - // negative test if_architecture_is_ge - 1 - if_architecture_is_ge([&]() { - }).otherwise([&]() { result[20] = 1; }); - - // negative test if_architecture_is_ge - 2 - if_architecture_is_ge([&]() { - }).otherwise([&]() { result[21] = 1; }); - - // test else_if_architecture_is_ge - 1 - if_architecture_is_ge([&]() {}) - .else_if_architecture_is_ge( - [&]() { result[22] = 1; }) - .otherwise([&]() {}); - - // test else_if_architecture_is_ge - 2 - if_architecture_is_ge([&]() { - }).else_if_architecture_is_ge([&]() {}) - .else_if_architecture_is_ge( - [&]() { result[23] = 1; }) - .otherwise([&]() {}); - - // test if_architecture_is_between - if_architecture_is_between([&]() { - result[24] = 1; - }).otherwise([&]() {}); - - // negative test if_architecture_is_between - 1 - if_architecture_is_between([&]() { - }).otherwise([&]() { result[25] = 1; }); - - // negative test if_architecture_is_between - 2 - if_architecture_is_between([&]() { - }).otherwise([&]() { result[26] = 1; }); - - // test else_if_architecture_is_between - 1 - if_architecture_is_between([&]() {}) - .else_if_architecture_is_between( - [&]() { result[27] = 1; }) - .otherwise([&]() {}); - - // test else_if_architecture_is_between - 2 - if_architecture_is_between([&]() {}) - .else_if_architecture_is_between( - [&]() {}) - .else_if_architecture_is_between( - [&]() { result[28] = 1; }) - .otherwise([&]() {}); - - // if adding new test here, don't forget to increment result's index and - // value of N variable - }); - }); + cgh.single_task([=]() { + // test if_architecture_is with category + if_architecture_is([&]() { + result[0] = 1; + }).otherwise([&]() {}); + + // negative test if_architecture_is with category + if_architecture_is([&]() {}).otherwise( + [&]() { result[1] = 1; }); + + // test else_if_architecture_is with category - 1 + if_architecture_is([&]() {}) + .else_if_architecture_is( + [&]() { result[2] = 1; }) + .otherwise([&]() {}); + + // test else_if_architecture_is with category - 2 + if_architecture_is([&]() {}) + .else_if_architecture_is([&]() {}) + .else_if_architecture_is( + [&]() { result[3] = 1; }) + .otherwise([&]() {}); + + // test if_architecture_is_lt + if_architecture_is_lt([&]() { + result[4] = 1; + }).otherwise([&]() {}); + + // negative test if_architecture_is_lt - 1 + if_architecture_is_lt([&]() {}).otherwise( + [&]() { result[5] = 1; }); + + // negative test if_architecture_is_lt - 2 + if_architecture_is_lt([&]() { + }).otherwise([&]() { result[6] = 1; }); + + // test else_if_architecture_is_lt - 1 + if_architecture_is_lt([&]() {}) + .else_if_architecture_is_lt( + [&]() { result[7] = 1; }) + .otherwise([&]() {}); + + // test else_if_architecture_is_lt - 2 + if_architecture_is_lt([&]() { + }).else_if_architecture_is_lt([&]() {}) + .else_if_architecture_is_lt( + [&]() { result[8] = 1; }) + .otherwise([&]() {}); + + // test if_architecture_is_le + if_architecture_is_le([&]() { + result[9] = 1; + }).otherwise([&]() {}); + + // negative test if_architecture_is_le - 1 + if_architecture_is_le([&]() {}).otherwise( + [&]() { result[10] = 1; }); + + // negative test if_architecture_is_le - 2 + if_architecture_is_le([&]() { + }).otherwise([&]() { result[11] = 1; }); + + // test else_if_architecture_is_le - 1 + if_architecture_is_le([&]() {}) + .else_if_architecture_is_le( + [&]() { result[12] = 1; }) + .otherwise([&]() {}); + + // test else_if_architecture_is_le - 2 + if_architecture_is_le([&]() { + }).else_if_architecture_is_le([&]() {}) + .else_if_architecture_is_le( + [&]() { result[13] = 1; }) + .otherwise([&]() {}); + + // test if_architecture_is_gt + if_architecture_is_gt([&]() { + result[14] = 1; + }).otherwise([&]() {}); + + // negative test if_architecture_is_gt - 1 + if_architecture_is_gt([&]() { + }).otherwise([&]() { result[15] = 1; }); + + // negative test if_architecture_is_gt - 2 + if_architecture_is_gt([&]() { + }).otherwise([&]() { result[16] = 1; }); + + // test else_if_architecture_is_gt - 1 + if_architecture_is_gt([&]() {}) + .else_if_architecture_is_gt( + [&]() { result[17] = 1; }) + .otherwise([&]() {}); + + // test else_if_architecture_is_gt - 2 + if_architecture_is_gt([&]() { + }).else_if_architecture_is_gt([&]() {}) + .else_if_architecture_is_gt( + [&]() { result[18] = 1; }) + .otherwise([&]() {}); + + // test if_architecture_is_ge + if_architecture_is_ge([&]() { + result[19] = 1; + }).otherwise([&]() {}); + + // negative test if_architecture_is_ge - 1 + if_architecture_is_ge([&]() { + }).otherwise([&]() { result[20] = 1; }); + + // negative test if_architecture_is_ge - 2 + if_architecture_is_ge([&]() { + }).otherwise([&]() { result[21] = 1; }); + + // test else_if_architecture_is_ge - 1 + if_architecture_is_ge([&]() {}) + .else_if_architecture_is_ge( + [&]() { result[22] = 1; }) + .otherwise([&]() {}); + + // test else_if_architecture_is_ge - 2 + if_architecture_is_ge([&]() { + }).else_if_architecture_is_ge([&]() {}) + .else_if_architecture_is_ge( + [&]() { result[23] = 1; }) + .otherwise([&]() {}); + + // test if_architecture_is_between + if_architecture_is_between([&]() { + result[24] = 1; + }).otherwise([&]() {}); + + // negative test if_architecture_is_between - 1 + if_architecture_is_between([&]() { + }).otherwise([&]() { result[25] = 1; }); + + // negative test if_architecture_is_between - 2 + if_architecture_is_between([&]() { + }).otherwise([&]() { result[26] = 1; }); + + // test else_if_architecture_is_between - 1 + if_architecture_is_between([&]() {}) + .else_if_architecture_is_between( + [&]() { result[27] = 1; }) + .otherwise([&]() {}); + + // test else_if_architecture_is_between - 2 + if_architecture_is_between([&]() {}) + .else_if_architecture_is_between( + [&]() {}) + .else_if_architecture_is_between( + [&]() { result[28] = 1; }) + .otherwise([&]() {}); + + // if adding new test here, don't forget to increment result's index + // and value of N variable + }); + }).wait(); } bool failed = false;